[Model] Support IQuest-Coder-40B-Loop (#16348)

Co-authored-by: yxing <yxing@iquestlab.com>
Co-authored-by: yzhu <yzhu@ubiquant.com>
Co-authored-by: zelong518 <zelonghuang02@gmail.com>
This commit is contained in:
Gaoji Liu
2026-01-12 23:44:45 +08:00
committed by GitHub
co-authored by yxing yzhu zelong518
parent d0092decb1
commit 7b682de870
5 changed files with 524 additions and 1 deletions
@@ -463,6 +463,9 @@ class ModelConfig:
self.num_attention_layers = self.num_hidden_layers
if "LongcatFlashForCausalLM" in self.hf_config.architectures:
self.num_attention_layers = self.num_hidden_layers * 2
if "IQuestLoopCoderForCausalLM" in self.hf_config.architectures:
loop_num = getattr(self.hf_text_config, "loop_num", 1)
self.num_attention_layers = int(self.num_hidden_layers * int(loop_num))
self.num_nextn_predict_layers = getattr(
self.hf_text_config, "num_nextn_predict_layers", None
)