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
e47433b3
Unverified
Commit
e47433b3
authored
Sep 29, 2025
by
acisseJZhong
Committed by
GitHub
Sep 30, 2025
Browse files
[BugFix] Pass config_format via try_get_generation_config (#25912)
parent
23194d83
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
vllm/config/model.py
vllm/config/model.py
+2
-0
vllm/transformers_utils/config.py
vllm/transformers_utils/config.py
+2
-0
No files found.
vllm/config/model.py
View file @
e47433b3
...
@@ -1334,11 +1334,13 @@ class ModelConfig:
...
@@ -1334,11 +1334,13 @@ class ModelConfig:
self
.
hf_config_path
or
self
.
model
,
self
.
hf_config_path
or
self
.
model
,
trust_remote_code
=
self
.
trust_remote_code
,
trust_remote_code
=
self
.
trust_remote_code
,
revision
=
self
.
revision
,
revision
=
self
.
revision
,
config_format
=
self
.
config_format
,
)
)
else
:
else
:
config
=
try_get_generation_config
(
config
=
try_get_generation_config
(
self
.
generation_config
,
self
.
generation_config
,
trust_remote_code
=
self
.
trust_remote_code
,
trust_remote_code
=
self
.
trust_remote_code
,
config_format
=
self
.
config_format
,
)
)
if
config
is
None
:
if
config
is
None
:
...
...
vllm/transformers_utils/config.py
View file @
e47433b3
...
@@ -949,6 +949,7 @@ def try_get_generation_config(
...
@@ -949,6 +949,7 @@ def try_get_generation_config(
model
:
str
,
model
:
str
,
trust_remote_code
:
bool
,
trust_remote_code
:
bool
,
revision
:
Optional
[
str
]
=
None
,
revision
:
Optional
[
str
]
=
None
,
config_format
:
Union
[
str
,
ConfigFormat
]
=
"auto"
,
)
->
Optional
[
GenerationConfig
]:
)
->
Optional
[
GenerationConfig
]:
try
:
try
:
return
GenerationConfig
.
from_pretrained
(
return
GenerationConfig
.
from_pretrained
(
...
@@ -961,6 +962,7 @@ def try_get_generation_config(
...
@@ -961,6 +962,7 @@ def try_get_generation_config(
model
,
model
,
trust_remote_code
=
trust_remote_code
,
trust_remote_code
=
trust_remote_code
,
revision
=
revision
,
revision
=
revision
,
config_format
=
config_format
,
)
)
return
GenerationConfig
.
from_model_config
(
config
)
return
GenerationConfig
.
from_model_config
(
config
)
except
OSError
:
# Not found
except
OSError
:
# Not found
...
...
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