From a795807cc4eaaeaa052f239a8984562e7cda49b7 Mon Sep 17 00:00:00 2001 From: Anatoliy Talamanov Date: Tue, 10 Dec 2024 13:51:19 +0000 Subject: [PATCH] StaticLLMPipeline: num_key_value_heads not present in config.json (#1355) --- src/cpp/src/llm_pipeline_static.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cpp/src/llm_pipeline_static.cpp b/src/cpp/src/llm_pipeline_static.cpp index 2cf5c22ae2..49dfdc549c 100644 --- a/src/cpp/src/llm_pipeline_static.cpp +++ b/src/cpp/src/llm_pipeline_static.cpp @@ -407,7 +407,8 @@ ov::genai::ModelConfigDesc get_modeldesc_from_json(const std::filesystem::path& if (config_data.contains("_name_or_path")) { desc.name_or_path = config_data["_name_or_path"].get(); } - desc.num_key_value_heads = config_data["num_key_value_heads"].get(); + desc.num_key_value_heads = config_data.contains("num_key_value_heads") + ? config_data["num_key_value_heads"].get() : -1; return desc; }