[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user