[Model] Support bidirectional (encoder-only) attention for DeepSeek e… (#52948)

Signed-off-by: Egor <erop001@gmail.com>
Signed-off-by: Egor <47443236+Lossfull@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Egor
2026-08-19 16:36:27 +00:00
committed by GitHub
co-authored by Claude
parent 54dd98be28
commit e9e1630e93
4 changed files with 35 additions and 3 deletions
+6
View File
@@ -1877,6 +1877,12 @@ class ModelConfig:
# kv_lora_rank indicates that a Transformers model implementation uses MLA
return getattr(self.hf_text_config, "kv_lora_rank", None) is not None
# Manually maintained list of model types for vLLM model implementations
# Bidirectional DeepSeek variants (is_causal=False, used by some
# embedding models) must use the non-MLA attention path, since the
# MLA kernels only support causal attention.
if not getattr(self.hf_text_config, "is_causal", True):
return False
return self.is_deepseek_mla
@property