[Bugfix] Resolve the Hub revision once per repo (#56092)

Signed-off-by: Wauplin <lucainp@gmail.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Lucain
2026-09-24 08:48:24 -07:00
committed by GitHub
co-authored by Claude Opus 5 Harry Mellor mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent a7d203efe5
commit 344fcc252a
5 changed files with 32 additions and 22 deletions
@@ -15,6 +15,7 @@ from vllm.model_executor.model_loader.weight_utils import (
download_weights_from_hf,
runai_safetensors_weights_iterator,
)
from vllm.transformers_utils.repo_utils import resolve_revision
from vllm.transformers_utils.runai_utils import is_runai_obj_uri, list_safetensors
@@ -87,6 +88,11 @@ class RunaiModelStreamerLoader(BaseModelLoader):
safetensors_pattern = "*.safetensors"
index_file = SAFE_WEIGHTS_INDEX_NAME
if not is_local and not is_object_storage_path:
# `model_weights` can point to another repo than the one `revision` was
# resolved for, which does not pin this one.
revision = resolve_revision(model_name_or_path, revision)
hf_folder = (
model_name_or_path
if (is_local or is_object_storage_path)