Extract hybrid-arch helpers into configs.hybrid_arch and ModelConfig (#31150)

This commit is contained in:
fzyzcjy
2026-07-14 15:55:32 +08:00
committed by GitHub
parent c9b4081016
commit e20c346541
16 changed files with 219 additions and 178 deletions
@@ -94,6 +94,7 @@ def _make_model_runner(
mc.get_num_kv_heads = lambda tp_size: num_kv_heads
mc.get_swa_num_kv_heads = lambda tp_size: swa_num_kv_heads or num_kv_heads
mc.hf_config = SimpleNamespace(architectures=["LlamaForCausalLM"])
mc.hf_config.get_text_config = lambda: mc.hf_config
mr.model_config = mc
mr.kv_cache_dtype = "fake_bf16"