File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -1334,11 +1334,13 @@ def try_get_generation_config(self) -> dict[str, Any]:
1334
1334
self .hf_config_path or self .model ,
1335
1335
trust_remote_code = self .trust_remote_code ,
1336
1336
revision = self .revision ,
1337
+ config_format = self .config_format ,
1337
1338
)
1338
1339
else :
1339
1340
config = try_get_generation_config (
1340
1341
self .generation_config ,
1341
1342
trust_remote_code = self .trust_remote_code ,
1343
+ config_format = self .config_format ,
1342
1344
)
1343
1345
1344
1346
if config is None :
Original file line number Diff line number Diff line change @@ -949,6 +949,7 @@ def try_get_generation_config(
949
949
model : str ,
950
950
trust_remote_code : bool ,
951
951
revision : Optional [str ] = None ,
952
+ config_format : Union [str , ConfigFormat ] = "auto" ,
952
953
) -> Optional [GenerationConfig ]:
953
954
try :
954
955
return GenerationConfig .from_pretrained (
@@ -961,6 +962,7 @@ def try_get_generation_config(
961
962
model ,
962
963
trust_remote_code = trust_remote_code ,
963
964
revision = revision ,
965
+ config_format = config_format ,
964
966
)
965
967
return GenerationConfig .from_model_config (config )
966
968
except OSError : # Not found
You can’t perform that action at this time.
0 commit comments