mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-10 08:04:58 +08:00
[BugFix] Pass config_format via try_get_generation_config (#25912)
This commit is contained in:
parent
23194d83e8
commit
e47433b3c1
@ -1334,11 +1334,13 @@ class ModelConfig:
|
|||||||
self.hf_config_path or self.model,
|
self.hf_config_path or self.model,
|
||||||
trust_remote_code=self.trust_remote_code,
|
trust_remote_code=self.trust_remote_code,
|
||||||
revision=self.revision,
|
revision=self.revision,
|
||||||
|
config_format=self.config_format,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
config = try_get_generation_config(
|
config = try_get_generation_config(
|
||||||
self.generation_config,
|
self.generation_config,
|
||||||
trust_remote_code=self.trust_remote_code,
|
trust_remote_code=self.trust_remote_code,
|
||||||
|
config_format=self.config_format,
|
||||||
)
|
)
|
||||||
|
|
||||||
if config is None:
|
if config is None:
|
||||||
|
|||||||
@ -949,6 +949,7 @@ def try_get_generation_config(
|
|||||||
model: str,
|
model: str,
|
||||||
trust_remote_code: bool,
|
trust_remote_code: bool,
|
||||||
revision: Optional[str] = None,
|
revision: Optional[str] = None,
|
||||||
|
config_format: Union[str, ConfigFormat] = "auto",
|
||||||
) -> Optional[GenerationConfig]:
|
) -> Optional[GenerationConfig]:
|
||||||
try:
|
try:
|
||||||
return GenerationConfig.from_pretrained(
|
return GenerationConfig.from_pretrained(
|
||||||
@ -961,6 +962,7 @@ def try_get_generation_config(
|
|||||||
model,
|
model,
|
||||||
trust_remote_code=trust_remote_code,
|
trust_remote_code=trust_remote_code,
|
||||||
revision=revision,
|
revision=revision,
|
||||||
|
config_format=config_format,
|
||||||
)
|
)
|
||||||
return GenerationConfig.from_model_config(config)
|
return GenerationConfig.from_model_config(config)
|
||||||
except OSError: # Not found
|
except OSError: # Not found
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user