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]Fix Phi-3 BNB online quantization #10417

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

jeejeelee
Copy link
Collaborator

@jeejeelee jeejeelee commented Nov 18, 2024

FIX #9937

Work

    1. Fix Phi-3 BNB config
    1. For current models like Phi-3,Baichuan, ChaGLM, there is a bug in BNB quantization. This is because their merged linear( mlp )weights are already merged in the disk, and the current BNB implementation doesn't account for this scenario,fix this

TODO

For these types of models, there is still a remaining issue regarding TP weight partitioning during online quantization. This will be addressed in the following PR.

ping @mgoin

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.

🚀

@Isotr0py
Copy link
Collaborator

FYI, I have implemented the TP support for Phi-3 BNB in my branch, it might be useful for addressing the issue you mentioned: https://github.com/Isotr0py/vllm/blob/79f0b5f725ea74f19d8f4a73b9c9df72fb3ac605/vllm/model_executor/model_loader/loader.py#L909-L934

@jeejeelee
Copy link
Collaborator Author

FYI, I have implemented the TP support for Phi-3 BNB in my branch, it might be useful for addressing the issue you mentioned: https://github.com/Isotr0py/vllm/blob/79f0b5f725ea74f19d8f4a73b9c9df72fb3ac605/vllm/model_executor/model_loader/loader.py#L909-L934

thanks,I will look at this asap

@jeejeelee
Copy link
Collaborator Author

@Isotr0py Very useful code, thank you. PS: I've seen your PR before, but I completely forgot about it, my bad! :bowtie:

@mgoin mgoin added the ready ONLY add when PR is ready to merge/full CI is needed label Nov 19, 2024
Copy link
Member

@mgoin mgoin left a comment

Choose a reason for hiding this comment

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

Thanks for improving the comments as well

@mgoin mgoin enabled auto-merge (squash) November 19, 2024 02:37
@mgoin mgoin merged commit 7eb719d into vllm-project:main Nov 19, 2024
68 checks passed
@jeejeelee jeejeelee deleted the fix-phi3-bnb branch November 19, 2024 04:32
mikejuliet13 pushed a commit to mikejuliet13/vllm that referenced this pull request Nov 19, 2024
coolkp pushed a commit to coolkp/vllm that referenced this pull request Nov 20, 2024
KuntaiDu pushed a commit to KuntaiDu/vllm that referenced this pull request Nov 20, 2024
mfournioux pushed a commit to mfournioux/vllm that referenced this pull request Nov 20, 2024
rickyyx pushed a commit to rickyyx/vllm that referenced this pull request Nov 20, 2024
tlrmchlsmth pushed a commit to neuralmagic/vllm that referenced this pull request Nov 23, 2024
Signed-off-by: Jee Jee Li <[email protected]>
Signed-off-by: Tyler Michael Smith <[email protected]>
sleepwalker2017 pushed a commit to sleepwalker2017/vllm that referenced this pull request Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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]: Phi-3 cannot be used with bitsandbytes
3 participants