-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
[Model] Ultravox: Support Llama 4 and Gemma 3 backends #17818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Model] Ultravox: Support Llama 4 and Gemma 3 backends #17818
Conversation
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add 🚀 |
|
What issue are you getting on V1? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DarkLight1337 When using V1, I noticed that the output was also completely garbled.
After debugging I noticed that when I tried printing input_ids here for the same sample (conditioned on len(input_ids)>1 to avoid decoding tokens), this is what I got:
# with VLLM_USE_V1=0
>>> t.decode([200000, 200005, 15651, 200006, 368, 4662, 583, 262, 19933, 43910, 26, 200008, 200005, 1556, 200006, 368, 4984, 290, 2182, 4097, 38, 7283, 201133, 200008, 200005, 140680, 200006, 368])
'<|begin_of_text|><|header_start|>system<|header_end|>\n\nYou are a helpful assistant.<|eot|><|header_start|>user<|header_end|>\n\nAnswer the following question: \n\n<|vision_reserved_special_token_1047|><|eot|><|header_start|>assistant<|header_end|>\n\n'
# with VLLM_USE_V1=1
>>> t.decode([24, 4984, 290, 2182, 4097, 38, 7283, 201133, 200008, 200005, 140680, 200006, 368])
',Answer the following question: \n\n<|vision_reserved_special_token_1047|><|eot|><|header_start|>assistant<|header_end|>\n\n'The input_ids in the case of V1 seemed to be missing a part of the beginning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe I got this issue at around v0.8.4 or 0.8.4. I'll try verifying it on v0.8.5.post1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved by upgrading to v0.9.1
|
Verified that the issue with inference mismatch was indeed a VLLM bug. Upgrading to v0.9.1 fixed the issue and now V1 inference matches V0. |
|
Nice, let's merge this! |
|
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: Farzad Abdolhosseini <[email protected]>
Head branch was pushed to by a user without write access
0ffff36 to
1cb823d
Compare
|
This pull request has merge conflicts that must be resolved before it can be |
|
Hi!! I am trying to deploy But, the following error occurs regarding Gemma3 vocab_size. Can anyone help? Saw a related PR #14687 but it didn't help |
Signed-off-by: Patrick Li <[email protected]>
b0f884a to
fb57362
Compare
| "JAISLMHeadModel": ("jais", "JAISLMHeadModel"), | ||
| "JambaForCausalLM": ("jamba", "JambaForCausalLM"), | ||
| "LlamaForCausalLM": ("llama", "LlamaForCausalLM"), | ||
| "Llama4ForCausalLM": ("llama4", "Llama4ForCausalLM"), # noqa: E501 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like adding this leads to CI errors #19580
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @ywang96
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea this is expected because on huggingface there's no such model for us to test loading this particular model architecture. I wonder if we should relax this test on CI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just add is_available_offline=False to disable the test for that model
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I added back Llama4ForCausalLM to vllm/model_executor/models/registry.py and added Llama4ForCausalLM with is_available_online=False entry to tests/models/registry.py
Signed-off-by: Patrick Li <[email protected]>
41b0cff to
02c9ca8
Compare
|
The PP test failure looks related |
…beddings for text only inputs for v0 path Signed-off-by: Patrick Li <[email protected]>
Signed-off-by: Patrick Li <[email protected]>
…17818) Signed-off-by: Farzad Abdolhosseini <[email protected]> Signed-off-by: Patrick Li <[email protected]> Co-authored-by: Patrick Li <[email protected]>
…17818) Signed-off-by: Farzad Abdolhosseini <[email protected]> Signed-off-by: Patrick Li <[email protected]> Co-authored-by: Patrick Li <[email protected]>
…17818) Signed-off-by: Farzad Abdolhosseini <[email protected]> Signed-off-by: Patrick Li <[email protected]> Co-authored-by: Patrick Li <[email protected]> Signed-off-by: x22x22 <[email protected]>
…17818) Signed-off-by: Farzad Abdolhosseini <[email protected]> Signed-off-by: Patrick Li <[email protected]> Co-authored-by: Patrick Li <[email protected]>
…17818) Signed-off-by: Farzad Abdolhosseini <[email protected]> Signed-off-by: Patrick Li <[email protected]> Co-authored-by: Patrick Li <[email protected]>
…17818) Signed-off-by: Farzad Abdolhosseini <[email protected]> Signed-off-by: Patrick Li <[email protected]> Co-authored-by: Patrick Li <[email protected]> Signed-off-by: Jinzhen Lin <[email protected]>
…17818) Signed-off-by: Farzad Abdolhosseini <[email protected]> Signed-off-by: Patrick Li <[email protected]> Co-authored-by: Patrick Li <[email protected]>
…17818) Signed-off-by: Farzad Abdolhosseini <[email protected]> Signed-off-by: Patrick Li <[email protected]> Co-authored-by: Patrick Li <[email protected]> Signed-off-by: Diego-Castan <[email protected]>
…17818) Signed-off-by: Farzad Abdolhosseini <[email protected]> Signed-off-by: Patrick Li <[email protected]> Co-authored-by: Patrick Li <[email protected]>
This is a simplified version of my older PR that was approved by @DarkLight1337 but ended up not working on some backends: https://github.com/vllm-project/vllm/pull/15728/files
This new PR allows Ultravox to support Gemma 3 and Llama 4 backends.
On the Ultravox side, I've made sure that all tokenizers have a new
<|audio|>token to allow for better tracking audio placeholder tokens. This is only available on the tokenizer and not the embedding layer. As such, I intercept theinput_idsbefore calling embedding on them and applysafe_input_idsinstead.When using V0, Ultravox has been verified to work on the following backends on an earlier version of this PR: Llama 3, Gemma 3, and Llama 4.
V0 seems to work as verified by evals. I've seen issues on V1 on an earlier version of VLLM, but I'm not sure if that was due to Ultravox or a VLLM V1 bug.