[Model] Fix GLM-OCR MTP weight loading (#49869)

Signed-off-by: jackLei0901 <42642542+jackLei0901@users.noreply.github.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
jackLei
2026-09-02 08:38:36 +00:00
committed by GitHub
co-authored by OpenAI Codex
parent 87deddc7a4
commit 584e8f0dda
2 changed files with 7 additions and 2 deletions
+7 -1
View File
@@ -556,7 +556,13 @@ def get_spec_layer_idx_from_weight_name(
return None
base = config.num_hidden_layers
for i in range(n):
if weight_name.startswith((f"model.layers.{base + i}.", f"layers.{base + i}.")):
if weight_name.startswith(
(
f"model.layers.{base + i}.",
f"layers.{base + i}.",
f"model.language_model.layers.{base + i}.",
)
):
return base + i
return None