[Model] Add LongCat-Flash-Lite (n-gram embedding) (#47857)

Signed-off-by: mgoin <mgoin64@gmail.com>
This commit is contained in:
Michael Goin
2026-07-10 07:17:50 -07:00
committed by GitHub
parent 978a6dfa3f
commit 08dfd68610
16 changed files with 630 additions and 12 deletions
+9 -1
View File
@@ -540,7 +540,15 @@ def init_kv_cache(
shared_kv_cache_layers=shared_kv_cache_layers,
kv_cache_config=kv_cache_config,
)
bind_kv_cache(kv_caches, forward_context, runner_kv_caches)
# Dual-attention models (e.g. LongCat-Flash) put two Attention modules per
# decoder layer, so a layer name carries two integers (layer + module index).
num_attn_module = (
2
if vllm_config.model_config.hf_config.model_type
in ("longcat_flash", "longcat_flash_ngram")
else 1
)
bind_kv_cache(kv_caches, forward_context, runner_kv_caches, num_attn_module)
return kv_caches