[GLM-OCR] GLM-OCR with MTP Support (#33005)

Signed-off-by: zRzRzRzRzRzRzR <2448370773@qq.com>
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Co-authored-by: Isotr0py <mozf@mail2.sysu.edu.cn>
This commit is contained in:
Yuxuan Zhang
2026-01-26 06:24:43 -08:00
committed by GitHub
co-authored by Isotr0py
parent dcd80206b7
commit bb17e8f11c
14 changed files with 873 additions and 8 deletions
+2 -1
View File
@@ -403,7 +403,7 @@ class SpecDecodeBaseProposer:
return draft_token_ids.view(-1, 1)
if self.uses_mrope:
positions = self.positions[:, last_token_indices]
positions = self.mrope_positions[:, last_token_indices]
else:
positions = self.positions[last_token_indices]
if self.method in (
@@ -1126,6 +1126,7 @@ class SpecDecodeBaseProposer:
"Qwen2_5_VLForConditionalGeneration",
"Qwen3VLForConditionalGeneration",
"Qwen3VLMoeForConditionalGeneration",
"GlmOcrForConditionalGeneration",
]:
self.model.config.image_token_index = target_model.config.image_token_id
elif self.get_model_name(target_model) == "PixtralForConditionalGeneration":