From c329ceca6dd7263a65c7913a14de943266a38088 Mon Sep 17 00:00:00 2001 From: Michael Goin Date: Sat, 28 Jun 2025 14:43:06 +0900 Subject: [PATCH] [CI Fix] Pin tests/models/registry.py MiniMaxText01ForCausalLM to revision due to model changes (#20199) Signed-off-by: mgoin --- tests/models/registry.py | 9 ++++++++- tests/models/test_initialization.py | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/models/registry.py b/tests/models/registry.py index 1bcb4f88a30ff..72e361e2637fd 100644 --- a/tests/models/registry.py +++ b/tests/models/registry.py @@ -70,6 +70,12 @@ class _HfExamplesInfo: length that is too large to fit into memory in CI. """ + revision: Optional[str] = None + """ + The specific revision (commit hash, tag, or branch) to use for the model. + If not specified, the default revision will be used. + """ + def check_transformers_version( self, *, @@ -207,7 +213,8 @@ _TEXT_GENERATION_EXAMPLE_MODELS = { "MiniCPM3ForCausalLM": _HfExamplesInfo("openbmb/MiniCPM3-4B", trust_remote_code=True), "MiniMaxText01ForCausalLM": _HfExamplesInfo("MiniMaxAI/MiniMax-Text-01", - trust_remote_code=True), + trust_remote_code=True, + revision="a59aa9cbc53b9fb8742ca4e9e1531b9802b6fdc3"), # noqa: E501 "MiniMaxM1ForCausalLM": _HfExamplesInfo("MiniMaxAI/MiniMax-M1-40k", trust_remote_code=True), "MistralForCausalLM": _HfExamplesInfo("mistralai/Mistral-7B-Instruct-v0.1"), diff --git a/tests/models/test_initialization.py b/tests/models/test_initialization.py index e56bc925c9c40..df72607767fdd 100644 --- a/tests/models/test_initialization.py +++ b/tests/models/test_initialization.py @@ -88,6 +88,7 @@ def test_can_initialize(model_arch: str, monkeypatch: pytest.MonkeyPatch): model_info.default, tokenizer=model_info.tokenizer, tokenizer_mode=model_info.tokenizer_mode, + revision=model_info.revision, speculative_config={ "model": model_info.speculative_model, "num_speculative_tokens": 1,