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: Support generation & prefill configs extension for npuw::LLMCompiledModel (#28413)
Anatoliy Talamanov5c55539e74ef
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 0232811dfb8..853c839ff6f 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@@ -448,6 +448,8 @@ ov::npuw::LLMCompiledModel::LLMCompiledModel(const std::shared_ptr<ov::Model>& m// preserve them somewhere.auto prefill_config_opt = pop_option(npuw_llm_props, std::string("NPUW_LLM_PREFILL_CONFIG"));auto generate_config_opt = pop_option(npuw_llm_props, std::string("NPUW_LLM_GENERATE_CONFIG"));+ auto prefill_config_addition = pop_option(npuw_llm_props, std::string("++NPUW_LLM_PREFILL_CONFIG"));+ auto generate_config_addition = pop_option(npuw_llm_props, std::string("++NPUW_LLM_GENERATE_CONFIG"));m_cfg.update(any_copy(npuw_llm_props));@@ -501,8 +503,15 @@ ov::npuw::LLMCompiledModel::LLMCompiledModel(const std::shared_ptr<ov::Model>& mgenerate_config_opt.value_or(get_default_generate_config(kvcache_model, npudesc, generate_hint)).as<ov::AnyMap>();+ auto prefill_config_addition_value =+ prefill_config_addition.has_value() ? prefill_config_addition.value().as<ov::AnyMap>() : ov::AnyMap{};+ auto generate_config_addition_value =+ generate_config_addition.has_value() ? generate_config_addition.value().as<ov::AnyMap>() : ov::AnyMap{};+merge_config_with(prefill_config, other_props);merge_config_with(generate_config, other_props);+ merge_config_with(prefill_config, prefill_config_addition_value);+ merge_config_with(generate_config, generate_config_addition_value);m_kvcache_compiled = std::dynamic_pointer_cast<ov::npuw::CompiledModel>(ov::npuw::ICompiledModel::create(kvcache_model, plugin, generate_config));