[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
parent d0092decb1
commit 7b682de870
5 changed files with 524 additions and 1 deletions

View File

@@ -485,6 +485,12 @@ class ModelRunner(ModelRunnerKVCacheMixin):
self.start_layer = getattr(self.model, "start_layer", 0)
self.end_layer = getattr(self.model, "end_layer", model_num_layers)
self.num_effective_layers = self.end_layer - self.start_layer
# For LoopCoder models, each loop has its own layer_id, so we need to multiply by loop_num
loop_num = getattr(self.model_config.hf_config, "loop_num", 1)
if loop_num > 1:
self.num_effective_layers = self.num_effective_layers * loop_num
assert (
(not model_has_mtp_layers)
or (self.spec_algorithm.is_none())