fix: add revision parameter to FastBaseModel in vision.py
Propagate revision parameter to all from_pretrained calls in vision.py
to ensure consistent version pinning for vision models.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
(cherry picked from commit c5aa4ec927)
This commit is contained in:
parent
c823e52b2d
commit
ae38c3639d
1 changed files with 4 additions and 1 deletions
|
|
@ -421,6 +421,7 @@ class FastBaseModel:
|
|||
auto_config = None,
|
||||
offload_embedding = False,
|
||||
float32_mixed_precision = None, # Forces float32 mixed precision
|
||||
revision = None,
|
||||
# vLLM parameters
|
||||
fast_inference = False,
|
||||
gpu_memory_utilization = 0.5,
|
||||
|
|
@ -720,6 +721,7 @@ class FastBaseModel:
|
|||
model_name,
|
||||
token = token,
|
||||
trust_remote_code = trust_remote_code,
|
||||
revision = revision,
|
||||
)
|
||||
if hasattr(auto_config, "quantization_config"):
|
||||
from transformers.quantizers.auto import (
|
||||
|
|
@ -776,12 +778,12 @@ class FastBaseModel:
|
|||
model_name,
|
||||
token = token,
|
||||
trust_remote_code = trust_remote_code,
|
||||
revision = revision,
|
||||
)
|
||||
setattr(auto_config, "_attn_implementation", config_attn_impl)
|
||||
if hasattr(auto_config, "attn_implementation"):
|
||||
setattr(auto_config, "attn_implementation", config_attn_impl)
|
||||
model_config = auto_config
|
||||
|
||||
verify_fp8_support_if_applicable(model_config)
|
||||
|
||||
raise_handler = RaiseUninitialized()
|
||||
|
|
@ -796,6 +798,7 @@ class FastBaseModel:
|
|||
# quantization_config = bnb_config,
|
||||
token = token,
|
||||
trust_remote_code = trust_remote_code,
|
||||
revision = revision,
|
||||
# attn_implementation = attn_implementation,
|
||||
**kwargs,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue