diff --git a/vllm/transformers_utils/config.py b/vllm/transformers_utils/config.py index 71990468c3..d27a126ddb 100644 --- a/vllm/transformers_utils/config.py +++ b/vllm/transformers_utils/config.py @@ -262,6 +262,11 @@ def get_config( MISTRAL_CONFIG_NAME, revision=revision): config_format = ConfigFormat.MISTRAL + else: + raise ValueError( + "Could not detect config format for no config file found. " + "Ensure your model has either config.json (HF format) " + "or params.json (Mistral format).") except Exception as e: error_message = ( @@ -324,7 +329,14 @@ def get_config( elif config_format == ConfigFormat.MISTRAL: config = load_params_config(model, revision, token=HF_TOKEN, **kwargs) else: - raise ValueError(f"Unsupported config format: {config_format}") + supported_formats = [ + fmt.value for fmt in ConfigFormat if fmt != ConfigFormat.AUTO + ] + raise ValueError( + f"Unsupported config format: {config_format}. " + f"Supported formats are: {', '.join(supported_formats)}. " + f"Ensure your model uses one of these configuration formats " + f"or specify the correct format explicitly.") # Special architecture mapping check for GGUF models if is_gguf: