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]:
13341334 self .hf_config_path or self .model ,
13351335 trust_remote_code = self .trust_remote_code ,
13361336 revision = self .revision ,
1337+ config_format = self .config_format ,
13371338 )
13381339 else :
13391340 config = try_get_generation_config (
13401341 self .generation_config ,
13411342 trust_remote_code = self .trust_remote_code ,
1343+ config_format = self .config_format ,
13421344 )
13431345
13441346 if config is None :
Original file line number Diff line number Diff line change @@ -949,6 +949,7 @@ def try_get_generation_config(
949949 model : str ,
950950 trust_remote_code : bool ,
951951 revision : Optional [str ] = None ,
952+ config_format : Union [str , ConfigFormat ] = "auto" ,
952953) -> Optional [GenerationConfig ]:
953954 try :
954955 return GenerationConfig .from_pretrained (
@@ -961,6 +962,7 @@ def try_get_generation_config(
961962 model ,
962963 trust_remote_code = trust_remote_code ,
963964 revision = revision ,
965+ config_format = config_format ,
964966 )
965967 return GenerationConfig .from_model_config (config )
966968 except OSError : # Not found
You can’t perform that action at this time.
0 commit comments