@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / d26a28ab03
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 3, 14:04 UTC

fix: propagate revision/code_revision pins to all artifact boundaries (#42616)

Signed-off-by: jperezde <jperezde@redhat.com> Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk>

Juan Pérez de Algaba committed May 15, 2026 at 11:31 UTC d26a28ab033697f55a1414b5b0435de7cd6045b6
6 files changed +17 -5
tests/models/test_gguf_download.py
+5 -2
@@ -122,14 +122,17 @@ class TestGGUFModelLoader:
122
123 mock_hf_download.return_value = "/downloaded/model.gguf"
124
125 - # Create a simple mock ModelConfig with only the model attribute
125 model_config = MagicMock()
126 model_config.model = "unsloth/Qwen3-0.6B-GGUF/model.gguf"
127 + model_config.revision = "abc123"
128
129 result = loader._prepare_weights(model_config)
130 assert result == "/downloaded/model.gguf"
131 mock_hf_download.assert_called_once_with(
132 - repo_id="unsloth/Qwen3-0.6B-GGUF", filename="model.gguf"
132 + repo_id="unsloth/Qwen3-0.6B-GGUF",
133 + filename="model.gguf",
134 + revision="abc123",
135 + cache_dir=None,
136 )
137
138 @patch("vllm.config.model.get_hf_image_processor_config", return_value=None)
vllm/model_executor/model_loader/gguf_loader.py
+6 -1
@@ -57,7 +57,12 @@ class GGUFModelLoader(BaseModelLoader):
57 # repo id/filename.gguf
58 if "/" in model_name_or_path and model_name_or_path.endswith(".gguf"):
59 repo_id, filename = model_name_or_path.rsplit("/", 1)
60 - return hf_hub_download(repo_id=repo_id, filename=filename)
60 + return hf_hub_download(
61 + repo_id=repo_id,
62 + filename=filename,
63 + revision=model_config.revision,
64 + cache_dir=self.load_config.download_dir,
65 + )
66 # repo_id:quant_type
67 elif "/" in model_name_or_path and ":" in model_name_or_path:
68 repo_id, quant_type = model_name_or_path.rsplit(":", 1)
vllm/model_executor/models/kimi_audio.py
+2 -1
@@ -92,6 +92,7 @@ class KimiAudioWhisperEncoder(WhisperEncoder):
92 whisper_config = HFWhisperConfig.from_pretrained(
93 model_path,
94 subfolder=KIMIA_WHISPER_SUBFOLDER,
95 + revision=vllm_config.model_config.revision,
96 )
97
98 super().__init__(
@@ -426,7 +427,7 @@ class KimiAudioForConditionalGeneration(
427 DefaultModelLoader.Source(
428 model_or_path=vllm_config.model_config.model,
429 subfolder="whisper-large-v3",
429 - revision=None,
430 + revision=vllm_config.model_config.revision,
431 )
432 ]
433
vllm/model_executor/models/kimi_k25.py
+1
@@ -110,6 +110,7 @@ class KimiK25ProcessingInfo(BaseProcessingInfo):
110 tokenizer = self.get_tokenizer()
111 image_processor = cached_get_image_processor(
112 self.ctx.model_config.model,
113 + revision=self.ctx.model_config.revision,
114 trust_remote_code=self.ctx.model_config.trust_remote_code,
115 )
116
vllm/model_executor/models/registry.py
+2
@@ -1064,6 +1064,7 @@ class _ModelRegistry:
1064 module,
1065 model_config.model,
1066 revision=model_config.revision,
1067 + code_revision=model_config.code_revision,
1068 trust_remote_code=model_config.trust_remote_code,
1069 warn_on_fail=False,
1070 )
@@ -1077,6 +1078,7 @@ class _ModelRegistry:
1078 module,
1079 model_config.model,
1080 revision=model_config.revision,
1081 + code_revision=model_config.code_revision,
1082 trust_remote_code=model_config.trust_remote_code,
1083 warn_on_fail=True,
1084 )
vllm/model_executor/models/roberta.py
+1 -1
@@ -203,7 +203,7 @@ class BgeM3EmbeddingModel(RobertaEmbeddingModel):
203 self.secondary_weights = [
204 DefaultModelLoader.Source(
205 model_or_path=vllm_config.model_config.model,
206 - revision=None,
206 + revision=vllm_config.model_config.revision,
207 prefix=prefix,
208 allow_patterns_overrides=[filename],
209 )