Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
37bfee92
Unverified
Commit
37bfee92
authored
Apr 03, 2025
by
yihong
Committed by
GitHub
Apr 03, 2025
Browse files
fix: better error message for get_config close #13889 (#15943)
Signed-off-by:
yihong0618
<
zouzou0208@gmail.com
>
parent
e73ff24e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
vllm/transformers_utils/config.py
vllm/transformers_utils/config.py
+13
-1
No files found.
vllm/transformers_utils/config.py
View file @
37bfee92
...
@@ -262,6 +262,11 @@ def get_config(
...
@@ -262,6 +262,11 @@ def get_config(
MISTRAL_CONFIG_NAME
,
MISTRAL_CONFIG_NAME
,
revision
=
revision
):
revision
=
revision
):
config_format
=
ConfigFormat
.
MISTRAL
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
:
except
Exception
as
e
:
error_message
=
(
error_message
=
(
...
@@ -324,7 +329,14 @@ def get_config(
...
@@ -324,7 +329,14 @@ def get_config(
elif
config_format
==
ConfigFormat
.
MISTRAL
:
elif
config_format
==
ConfigFormat
.
MISTRAL
:
config
=
load_params_config
(
model
,
revision
,
token
=
HF_TOKEN
,
**
kwargs
)
config
=
load_params_config
(
model
,
revision
,
token
=
HF_TOKEN
,
**
kwargs
)
else
:
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
# Special architecture mapping check for GGUF models
if
is_gguf
:
if
is_gguf
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment