OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[NPUW] Disable weights sharing for int8 whisper (#33497)
Ekaterina Shiryaeva04f948ce8c43
diff --git a/src/plugins/intel_npu/src/plugin/npuw/llm_compiled_model.cpp b/src/plugins/intel_npu/src/plugin/npuw/llm_compiled_model.cppindex 1fa6036eaf1..be4165c8efb 100644--- a/src/plugins/intel_npu/src/plugin/npuw/llm_compiled_model.cpp+++ b/src/plugins/intel_npu/src/plugin/npuw/llm_compiled_model.cpp@@ -1158,6 +1158,19 @@ bool is_cw_compressed(const std::shared_ptr<ov::Model>& model) {return false;}+bool is_int8_compressed(const std::shared_ptr<ov::Model>& model) {+ std::vector<std::string> rt_info_path = {"nncf", "weight_compression", "mode"};+ if (!model->has_rt_info(rt_info_path)) {+ // NB: Model isn't compressed by NNCF - skip+ return false;+ }+ auto mode = model->get_rt_info<std::string>(rt_info_path);+ if (mode.find("int8") != std::string::npos) {+ return true;+ }+ return false;+}+struct NPUDesc {std::string arch;int64_t max_tiles = 0;@@ -1348,6 +1361,12 @@ void update_config_for_whisper(ov::AnyMap& config) {config.erase("NPUW_SLICE_OUT");}+void disable_ws_for_whisper(ov::AnyMap& config) {+ config.erase("NPUW_FUNCALL_FOR_ALL");+ config.erase("NPUW_FOLD");+ config.erase("NPUW_CWAI");+}+void update_config_for_text_embed(ov::AnyMap& config) {config.erase("NPUW_SLICE_OUT");}@@ -1977,6 +1996,11 @@ ov::npuw::LLMCompiledModel::LLMCompiledModel(const std::shared_ptr<ov::Model>& mif (m_is_whisper) {update_config_for_whisper(prefill_config);+ if (is_int8_compressed(model)) {+ disable_ws_for_whisper(prefill_config);+ disable_ws_for_whisper(generate_config);+ LOG_INFO(" WS is disabled for Whisper int8 model!");+ }}if (m_is_embedding) {