Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions vllm/config/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ def __post_init__(
self.config_format,
hf_overrides_kw=hf_overrides_kw,
hf_overrides_fn=hf_overrides_fn,
token=self.hf_token,
)
hf_config = maybe_patch_hf_config_from_gguf(
self.model,
Expand Down Expand Up @@ -1341,12 +1342,14 @@ def try_get_generation_config(self) -> dict[str, Any]:
trust_remote_code=self.trust_remote_code,
revision=self.revision,
config_format=self.config_format,
hf_token=self.hf_token,
)
else:
config = try_get_generation_config(
self.generation_config,
trust_remote_code=self.trust_remote_code,
config_format=self.config_format,
hf_token=self.hf_token,
)

if config is None:
Expand Down
1 change: 1 addition & 0 deletions vllm/engine/arg_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1521,6 +1521,7 @@ def create_engine_config(
revision=self.revision,
trust_remote_code=self.trust_remote_code,
vllm_speculative_config=self.speculative_config,
hf_token=self.hf_token,
)
)

Expand Down
6 changes: 6 additions & 0 deletions vllm/transformers_utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ def maybe_override_with_speculators(
trust_remote_code: bool,
revision: str | None = None,
vllm_speculative_config: dict[str, Any] | None = None,
hf_token: bool | str | None = None,
**kwargs,
) -> tuple[str, str | None, dict[str, Any] | None]:
"""
Expand All @@ -556,6 +557,7 @@ def maybe_override_with_speculators(
trust_remote_code: Whether to trust remote code
revision: Model revision
vllm_speculative_config: Existing vLLM speculative config
hf_token: HuggingFace token for authenticated model access

Returns:
Tuple of (resolved_model, resolved_tokenizer, speculative_config)
Expand All @@ -572,6 +574,7 @@ def maybe_override_with_speculators(
config_dict, _ = PretrainedConfig.get_config_dict(
model if gguf_model_repo is None else gguf_model_repo,
revision=revision,
token=hf_token,
**without_trust_remote_code(kwargs),
)
speculators_config = config_dict.get("speculators_config")
Expand Down Expand Up @@ -1054,6 +1057,7 @@ def try_get_generation_config(
trust_remote_code: bool,
revision: str | None = None,
config_format: str | ConfigFormat = "auto",
hf_token: bool | str | None = None,
) -> GenerationConfig | None:
# GGUF files don't have generation_config.json - their config is embedded
# in the file header. Skip all filesystem lookups to avoid re-reading the
Expand All @@ -1066,6 +1070,7 @@ def try_get_generation_config(
return GenerationConfig.from_pretrained(
model,
revision=revision,
token=hf_token,
)
except OSError: # Not found
try:
Expand All @@ -1074,6 +1079,7 @@ def try_get_generation_config(
trust_remote_code=trust_remote_code,
revision=revision,
config_format=config_format,
token=hf_token,
)
return GenerationConfig.from_model_config(config)
except OSError: # Not found
Expand Down
Loading