[Core] Keep attention backends eligible for text-only serving of prefix-LM models (#48796)

Signed-off-by: qtris123 <voquangtri2021@gmail.com>
Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk>
This commit is contained in:
Tri Vo
2026-07-25 03:06:14 -07:00
committed by GitHub
co-authored by Cyrus Leung
parent dbcc1cdd0a
commit fe5145765f
4 changed files with 165 additions and 7 deletions
+6
View File
@@ -507,6 +507,12 @@ def dummy_hf_overrides(
hf_config = _hf_config
hf_text_config = text_config
# Keep architecture conversion on the default multimodal path; this
# helper only needs HF-derived fields, not deployment MM limits.
@staticmethod
def _supports_multimodal_for_mm_prefix() -> bool:
return True
model_arch_config = ModelConfig.get_model_arch_config(DummyConfig)
# Only set MoE related config when the model has MoE layers.
# Otherwise all models detected as MoE by _get_transformers_backend_cls.