Skip to content

Commit 5a30b70

Browse files
mgoinwuisawesome
authored andcommitted
Better error message for missing mistral params.json (vllm-project#17132)
Signed-off-by: mgoin <[email protected]>
1 parent a24edfa commit 5a30b70

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

vllm/transformers_utils/config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,11 @@ def load_params_config(model: Union[str, Path], revision: Optional[str],
650650
config_file_name = "params.json"
651651

652652
config_dict = get_hf_file_to_dict(config_file_name, model, revision)
653+
if config_dict is None:
654+
raise ValueError(
655+
f"Failed to load mistral '{config_file_name}' config for model "
656+
f"{model}. Please check if the model is a mistral-format model "
657+
f"and if the config file exists.")
653658
assert isinstance(config_dict, dict)
654659

655660
config_mapping = {

0 commit comments

Comments
 (0)