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 GPTQ and GPTQ Marlin CPU Offloading #7225

Merged
merged 3 commits into from
Aug 7, 2024

Conversation

mgoin
Copy link
Member

@mgoin mgoin commented Aug 6, 2024

FIX #7204

GPTQ Marlin was failing with cpu offloading enabled during the initial model creation because qzeros was specifically made as a "meta" device parameter. There was no need for this so the simplest method was just to remove it. Another possible fix would be to make cpu offload not touch meta device tensors, but it seems meta isn't used anywhere else at the moment.

Upon further testing, GPTQ would produce gibberish with cpu offloading because it shuffled the weights on first forward pass. This was fixed by moving that final preprocessing to process_weights_after_loading

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

github-actions bot commented Aug 6, 2024

👋 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 consists a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of default ones by unblocking the steps in your fast-check build on Buildkite UI.

Once the PR is approved and ready to go, please make sure to run full CI as it is required to merge (or just use auto-merge).

To run full CI, you can do one of these:

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

🚀

@mgoin mgoin requested a review from youkaichao August 6, 2024 21:42
Copy link
Member

@youkaichao youkaichao left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix!

@mgoin mgoin changed the title [Bugfix] Fix GPTQ Marlin CPU Offloading [Bugfix] Fix GPTQ and GPTQ Marlin CPU Offloading Aug 6, 2024
@youkaichao youkaichao merged commit f9a5600 into main Aug 7, 2024
49 of 52 checks passed
@youkaichao youkaichao deleted the fix-gptq-marlin-cpu-offload branch August 7, 2024 01:34
sfc-gh-mkeralapura pushed a commit to sfc-gh-mkeralapura/vllm that referenced this pull request Aug 12, 2024
kylesayrs pushed a commit to neuralmagic/vllm that referenced this pull request Aug 17, 2024
fialhocoelho pushed a commit to opendatahub-io/vllm that referenced this pull request Aug 22, 2024
Alvant pushed a commit to compressa-ai/vllm that referenced this pull request Oct 26, 2024
KuntaiDu pushed a commit to KuntaiDu/vllm that referenced this pull request Nov 20, 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]: GPTQ Marlin with cpu-offload-gb fails on 0.5.4
2 participants