fix: propagate revision parameter to vLLM and PEFT loaders

- Add revision to load_vllm_kwargs in llama.py to fix config/weights mismatch
- Add revision to PEFT AutoConfig calls in loader.py (FastLanguageModel & FastModel)

Addresses reviewer feedback from @chatgpt-codex-connector and @Datta0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
(cherry picked from commit 14f89e4531)
This commit is contained in:
majiayu000 2025-12-29 19:07:51 +08:00 committed by Daniel Han
commit c823e52b2d
2 changed files with 3 additions and 0 deletions

View file

@ -2471,6 +2471,7 @@ class FastLlamaModel:
disable_log_stats = disable_log_stats,
use_bitsandbytes = load_in_4bit,
unsloth_vllm_standby = unsloth_vllm_standby,
revision = revision,
fp8_mode = fp8_mode,
)
for allowed_arg in allowed_args:

View file

@ -553,6 +553,7 @@ class FastLanguageModel(FastLlamaModel):
model_config = AutoConfig.from_pretrained(
model_name,
token = token,
revision = revision,
trust_remote_code = trust_remote_code,
)
@ -1304,6 +1305,7 @@ class FastModel(FastBaseModel):
model_config = AutoConfig.from_pretrained(
model_name,
token = token,
revision = revision,
trust_remote_code = trust_remote_code,
)