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

[Bugfix] Validate lora adapters to avoid crashing server #11727

Merged
merged 14 commits into from
Jan 10, 2025

Conversation

joerunde
Copy link
Collaborator

@joerunde joerunde commented Jan 3, 2025

This PR addresses an issue where loading an invalid lora adapter will crash the engine and shut the server down. This happens because dynamically loaded adapters are first loaded just-in-time, during model execution. Invalid adapters will raise at load time, and any exceptions raised during model execution will shut down the engine and the server.

Instead, this PR updates the /v1/load_lora_adapter handler to first call engine.add_lora to ensure that the adapter can be successfully loaded. On error, the adapter is not added to the list of available models to use. This should result in a better user experience, as users will immediately know if there is a problem with their adapter when they try to load it, instead of having it crash their server later when they try to use it.

FIX #11702

Copy link

github-actions bot commented Jan 3, 2025

👋 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.

🚀

@mergify mergify bot added the frontend label Jan 3, 2025
@jeejeelee jeejeelee self-requested a review January 4, 2025 06:55
@jeejeelee
Copy link
Collaborator

Very useful feature! I will review this PR asap . Thanks!

@mgoin mgoin added the ready ONLY add when PR is ready to merge/full CI is needed label Jan 9, 2025
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.

Thank you very much for your contribution, overall LGTM

@DarkLight1337 DarkLight1337 enabled auto-merge (squash) January 10, 2025 03:21
@youkaichao youkaichao disabled auto-merge January 10, 2025 07:56
@youkaichao youkaichao merged commit ac2f3f7 into vllm-project:main Jan 10, 2025
59 of 61 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend 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.

[Bug]: vLLM LoRA Crash when using Dynamic Loading
7 participants