Skip to content
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

LoRA Support for Ultravox model #11253

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

thedebugger
Copy link

@thedebugger thedebugger commented Dec 17, 2024

This should also work w/ mistral models which also uses LlamaForCasualLM architecture re: here

Copy link

👋 Hi! Thank you for contributing to the vLLM project.
Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

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 do one of these:

  • Add ready label to the PR
  • Enable auto-merge.

🚀

@thedebugger
Copy link
Author

thedebugger commented Dec 17, 2024

Hi folks, I'm working with @petersalas on this. PR is not complete but wanted to start the discussion as I have some open questions and need some help from vLLM community

vllm/model_executor/models/ultravox.py Outdated Show resolved Hide resolved
vllm/model_executor/models/ultravox.py Outdated Show resolved Hide resolved
tests/lora/conftest.py Outdated Show resolved Hide resolved
Copy link

mergify bot commented Dec 31, 2024

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @thedebugger.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase label Dec 31, 2024
tests/lora/conftest.py Outdated Show resolved Hide resolved
@thedebugger thedebugger force-pushed the svij-ultravox-lora-dec-16 branch 2 times, most recently from 771484d to 64a664f Compare December 31, 2024 18:49
@mergify mergify bot removed the needs-rebase label Dec 31, 2024
@thedebugger thedebugger changed the title WIP: Ultravox Support for LoRA Ultravox Support for LoRA Dec 31, 2024
@thedebugger thedebugger marked this pull request as ready for review December 31, 2024 18:52
WIP: lora tests

Minor tweaks

Moar fixes

Temp changes

Cleanup

Add more debugging logs and packed modules

Signed-off-by: Sumit Vij <[email protected]>
Remove stale comment

Add llama lora modules

Add llama test case

Add test case and log warning on missing lora modules

Rollback unwanted changes and format fixes

Signed-off-by: Sumit Vij <[email protected]>
@thedebugger thedebugger force-pushed the svij-ultravox-lora-dec-16 branch from 64a664f to 3f5996c Compare January 1, 2025 17:31
@jeejeelee
Copy link
Collaborator

Can you refer to #10022 to minimize the changes?

@thedebugger
Copy link
Author

Can you refer to #10022 to minimize the changes?

Changes are inline with 10022 except the test case and other minor logging changes. Do you have any concerns with any particular change?

@jeejeelee
Copy link
Collaborator

It looks like there are issues with both the added tests and logs. We should only modify the Ultravox scipt, following the changes made in the #10022

@thedebugger
Copy link
Author

What is/are the issue(s)? Maybe I miss something but tests are passing

@thedebugger
Copy link
Author

@jeejeelee lmk what are your concerns please? Happy to address it. Having a test case was super helpful to make sure LoRA works as expected with llama and ultravox

vllm/lora/models.py Outdated Show resolved Hide resolved
tests/lora/conftest.py Outdated Show resolved Hide resolved
@jeejeelee
Copy link
Collaborator

@thedebugger We should only modify ultravox.py, please revert other changes. After you revert them, we can merge this PR.

@thedebugger
Copy link
Author

thedebugger commented Jan 13, 2025

@jeejeelee does the PR now looks okay to you? The changes are only related to ultravox and ultravox test. And, I'll open up another PR related to missing lora modules warning message

Note: AFAICT, CI and GPU tests are failing for unrelated reason which I also see happening it in other PRs that have been merged into main

@thedebugger thedebugger force-pushed the svij-ultravox-lora-dec-16 branch from dd686e3 to 4a633d3 Compare January 13, 2025 04:38
@@ -858,7 +865,8 @@ def generate_greedy_logprobs(
greedy_logprobs_params,
images=images,
audios=audios,
videos=videos)
videos=videos,
**kwargs)

def generate_encoder_decoder_greedy_logprobs(
self,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes to this file are not related to this PR, please revert.

@jeejeelee
Copy link
Collaborator

@jeejeelee does the PR now looks okay to you? The changes are only related to ultravox and ultravox test. And, I'll open up another PR related to missing lora modules warning message

Note: AFAICT, CI and GPU tests are failing for unrelated reason which I also see happening it in other PRs that have been merged into main

After completing the above modifications, this PR can be merged, thanks

@mergify mergify bot added the documentation Improvements or additions to documentation label Jan 16, 2025
@thedebugger
Copy link
Author

@petersalas does PR look good to you? If yes, please approve

Copy link
Contributor

@petersalas petersalas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thedebugger
Copy link
Author

@jeejeelee okay to approve and merge?

Copy link
Collaborator

@jeejeelee jeejeelee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's wait for the lora test issue mentioned in #12111 to be resolved before considering starting the merge testing.

@thedebugger
Copy link
Author

thedebugger commented Jan 17, 2025

Do you know when does lora test run to make sure it is working fine in CI? I can't find it running in some of buildkite CI jobs Nm, I found the info

@jeejeelee jeejeelee added the ready ONLY add when PR is ready to merge/full CI is needed label Jan 18, 2025
@jeejeelee jeejeelee enabled auto-merge (squash) January 18, 2025 16:01
Copy link
Collaborator

@jeejeelee jeejeelee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep the unit tests as they are for now. I'll look into how to train Ultravox LoRA and update in another PR

@thedebugger
Copy link
Author

thedebugger commented Jan 20, 2025

@jeejeelee I'll fix the test tomorrow. I pulled up the latest code and it is failing for me with Cuda OOM (different than CI failure). I also ran the test again on 208e662, it works. So likely something changed on master that is causing test to fail.

AFAICT, the failure is not related to LoRA, so training ultravox lora shouldn't have any impact. Let me troubleshoot this tomorrow and figure out what is going on before you spend time on this.

@thedebugger
Copy link
Author

thedebugger commented Jan 21, 2025

I spent more time looking at the failure. The failure happens during init when running ultravox with dummy data and I haven't been able to reproduce it locally (though locally test fails with cuda oom error for llama on latest version). I'll look further tomorrow why CI is seeing device mismatch when running whisper. I checked the other ultravox test, that is working fine. I'll look further into it tomorrow

@jeejeelee
Copy link
Collaborator

I spent more time looking at the failure. The failure happens during init when running ultravox with dummy data and I haven't been able to reproduce it locally (though locally test fails with cuda oom error for llama on latest version). I'll look further tomorrow why CI is seeing device mismatch when running whisper. I checked the other ultravox test, that is working fine. I'll look further into it tomorrow

We can first remove the LoRA test-related code and merge this PR. I'll spend some time later training a LoRA model. What do you think?

auto-merge was automatically disabled January 22, 2025 06:29

Head branch was pushed to by a user without write access

Signed-off-by: Sumit Vij <[email protected]>

Reduce model len

Signed-off-by: Sumit Vij <[email protected]>
@thedebugger thedebugger force-pushed the svij-ultravox-lora-dec-16 branch from d247036 to 1195ad8 Compare January 22, 2025 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation ready ONLY add when PR is ready to merge/full CI is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants