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
127ded0a
Unverified
Commit
127ded0a
authored
Sep 11, 2025
by
Peter Salas
Committed by
GitHub
Sep 11, 2025
Browse files
[Ultravox] Use wrapped_model_config to instantiate inner model (#24679)
Signed-off-by:
Peter Salas
<
peter@fixie.ai
>
parent
bb2b5126
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
vllm/model_executor/models/ultravox.py
vllm/model_executor/models/ultravox.py
+2
-2
vllm/transformers_utils/configs/ultravox.py
vllm/transformers_utils/configs/ultravox.py
+3
-4
No files found.
vllm/model_executor/models/ultravox.py
View file @
127ded0a
...
@@ -418,7 +418,7 @@ class UltravoxModel(nn.Module, SupportsMultiModal, SupportsPP, SupportsLoRA):
...
@@ -418,7 +418,7 @@ class UltravoxModel(nn.Module, SupportsMultiModal, SupportsPP, SupportsLoRA):
def
__init__
(
self
,
*
,
vllm_config
:
VllmConfig
,
prefix
:
str
=
""
):
def
__init__
(
self
,
*
,
vllm_config
:
VllmConfig
,
prefix
:
str
=
""
):
super
().
__init__
()
super
().
__init__
()
config
=
vllm_config
.
model_config
.
hf_config
config
:
UltravoxConfig
=
vllm_config
.
model_config
.
hf_config
multimodal_config
=
vllm_config
.
model_config
.
multimodal_config
multimodal_config
=
vllm_config
.
model_config
.
multimodal_config
self
.
config
=
config
self
.
config
=
config
self
.
multi_modal_config
=
multimodal_config
self
.
multi_modal_config
=
multimodal_config
...
@@ -438,7 +438,7 @@ class UltravoxModel(nn.Module, SupportsMultiModal, SupportsPP, SupportsLoRA):
...
@@ -438,7 +438,7 @@ class UltravoxModel(nn.Module, SupportsMultiModal, SupportsPP, SupportsLoRA):
self
.
multi_modal_projector
=
UltravoxProjector
(
config
)
self
.
multi_modal_projector
=
UltravoxProjector
(
config
)
self
.
language_model
=
init_vllm_registered_model
(
self
.
language_model
=
init_vllm_registered_model
(
vllm_config
=
vllm_config
,
vllm_config
=
vllm_config
,
hf_config
=
config
.
text
_config
,
hf_config
=
config
.
wrapped_model
_config
,
prefix
=
maybe_prefix
(
prefix
,
"language_model"
),
prefix
=
maybe_prefix
(
prefix
,
"language_model"
),
)
)
if
config
.
text_model_id
is
not
None
:
if
config
.
text_model_id
is
not
None
:
...
...
vllm/transformers_utils/configs/ultravox.py
View file @
127ded0a
...
@@ -46,7 +46,7 @@ class UltravoxConfig(transformers.PretrainedConfig):
...
@@ -46,7 +46,7 @@ class UltravoxConfig(transformers.PretrainedConfig):
projector or at the end. Versions v0.4.1 and below
projector or at the end. Versions v0.4.1 and below
use `False`, but v0.5 and above use `True`.
use `False`, but v0.5 and above use `True`.
"""
"""
wrapped_model_config
:
transformers
.
PretrainedConfig
model_type
=
"ultravox"
model_type
=
"ultravox"
audio_token
=
"<|audio|>"
audio_token
=
"<|audio|>"
is_composition
=
False
is_composition
=
False
...
@@ -113,9 +113,8 @@ class UltravoxConfig(transformers.PretrainedConfig):
...
@@ -113,9 +113,8 @@ class UltravoxConfig(transformers.PretrainedConfig):
return
super
().
__setattr__
(
key
,
value
)
return
super
().
__setattr__
(
key
,
value
)
@
property
@
property
def
text_config
(
self
)
->
Optional
[
transformers
.
PretrainedConfig
]
:
def
text_config
(
self
)
->
transformers
.
PretrainedConfig
:
# When Ultravox wraps a multi-modal model (e.g. Gemma), we instantiate
# When Ultravox wraps a multi-modal model (e.g. Gemma), we instantiate
# the full model, but the text config is the text config of the inner
# the full model, but the text config is the text config of the inner
# model.
# model.
return
(
self
.
wrapped_model_config
.
get_text_config
()
return
self
.
wrapped_model_config
.
get_text_config
()
if
self
.
wrapped_model_config
else
None
)
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