Skip to content

Commit efaf895

Browse files
committed
NPUW: Serialize the rerank flag in LLMCompiledModel blobs
m_is_rerank was set at compile time from NPUW_TEXT_RERANK but not included in serialize()/deserialize(), so a rerank model exported and re-imported (e.g. via ov::cache_dir) lost the flag and skipped the batched-scoring wrapper in create_sync_infer_request(). Serialize it alongside m_is_embedding and bump NPUW_SERIALIZATION_VERSION since the blob layout changed.
1 parent 8e41229 commit efaf895

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/plugins/intel_npu/src/plugin/npuw/llm_compiled_model.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,7 +1271,7 @@ void ov::npuw::LLMCompiledModel::serialize(std::ostream& raw_stream, const ov::n
12711271
m_kvcache_desc.dim & m_kvcache_desc.max_generation_token_len & m_kvcache_desc.v_tensors_transposed_pre &
12721272
m_kvcache_desc.v_tensors_transposed_gen & m_prefill_chunk_size & m_use_chunk_prefill & m_max_lora_rank &
12731273
m_enable_prefix_caching & m_prefix_caching_block_size & m_prefix_caching_max_num_blocks & m_is_whisper &
1274-
m_eos_token_id & m_decomposed_sdpa_size & m_is_eagle & m_is_embedding;
1274+
m_eos_token_id & m_decomposed_sdpa_size & m_is_eagle & m_is_embedding & m_is_rerank;
12751275

12761276
// Write config
12771277
stream & m_cfg;
@@ -1491,7 +1491,7 @@ std::shared_ptr<ov::npuw::LLMCompiledModel> ov::npuw::LLMCompiledModel::deserial
14911491
compiled->m_use_chunk_prefill & compiled->m_max_lora_rank & compiled->m_enable_prefix_caching &
14921492
compiled->m_prefix_caching_block_size & compiled->m_prefix_caching_max_num_blocks & compiled->m_is_whisper &
14931493
compiled->m_eos_token_id & compiled->m_decomposed_sdpa_size & compiled->m_is_eagle &
1494-
compiled->m_is_embedding;
1494+
compiled->m_is_embedding & compiled->m_is_rerank;
14951495

14961496
// Deserialize config
14971497
stream & compiled->m_cfg;

src/plugins/intel_npu/src/plugin/npuw/serialization.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const constexpr ov::npuw::s11n::IndicatorType NPUW_LLM_COMPILED_MODEL_INDICATOR
4848
const constexpr ov::npuw::s11n::IndicatorType NPUW_GQA_COMPILED_MODEL_INDICATOR =
4949
{char{0x47}, char{0x51}, char{0x41}, char{0x43}, char{0x4d}, char{0x4f}};
5050

51-
const constexpr char* NPUW_SERIALIZATION_VERSION = "0.27";
51+
const constexpr char* NPUW_SERIALIZATION_VERSION = "0.28";
5252

5353
// Forward declaration
5454
namespace intel_npu {

0 commit comments

Comments
 (0)