[BugFix] Pass config_format via try_get_generation_config (#25912)
This commit is contained in:
@@ -949,6 +949,7 @@ def try_get_generation_config(
|
||||
model: str,
|
||||
trust_remote_code: bool,
|
||||
revision: Optional[str] = None,
|
||||
config_format: Union[str, ConfigFormat] = "auto",
|
||||
) -> Optional[GenerationConfig]:
|
||||
try:
|
||||
return GenerationConfig.from_pretrained(
|
||||
@@ -961,6 +962,7 @@ def try_get_generation_config(
|
||||
model,
|
||||
trust_remote_code=trust_remote_code,
|
||||
revision=revision,
|
||||
config_format=config_format,
|
||||
)
|
||||
return GenerationConfig.from_model_config(config)
|
||||
except OSError: # Not found
|
||||
|
||||
Reference in New Issue
Block a user