Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions tests/models/test_glm5next_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,40 @@ def fake_init(self, **kwargs) -> None:
)


def test_glm5next_processing_info_pins_processor_revision(monkeypatch) -> None:
from vllm.models.glm5next.nvidia.multimodal import Glm5NextProcessingInfo

calls = []
processor = object()

def fake_from_pretrained(model, **kwargs):
calls.append((model, kwargs))
return processor

monkeypatch.setattr(
glm5next_processor.Glm5NextProcessor,
"from_pretrained",
staticmethod(fake_from_pretrained),
)
info = SimpleNamespace(
ctx=SimpleNamespace(
model_config=SimpleNamespace(
model="local-inference-lab/GLM-5.3-Flash-NVFP4",
revision="checkpoint-commit",
)
)
)

assert Glm5NextProcessingInfo.get_hf_processor(info) is processor
assert Glm5NextProcessingInfo.get_hf_processor(info) is processor
assert calls == [
(
"local-inference-lab/GLM-5.3-Flash-NVFP4",
{"revision": "checkpoint-commit"},
)
]


def test_glm5next_processor_counts_video_only_tokens() -> None:
class FakeVideoProcessor:
merge_size = 2
Expand Down
5 changes: 4 additions & 1 deletion vllm/models/glm5next/nvidia/multimodal.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,10 @@ def get_hf_processor(self, **kwargs: object):
if proc is None:
from vllm.transformers_utils.processors.glm5next import Glm5NextProcessor

proc = Glm5NextProcessor.from_pretrained(self.ctx.model_config.model)
proc = Glm5NextProcessor.from_pretrained(
self.ctx.model_config.model,
revision=self.ctx.model_config.revision,
)
self._glm5_hf_processor = proc
return proc

Expand Down
Loading