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

GPTQ - Move quantized_model to CUDA device #1535

Closed
wants to merge 3 commits into from

Conversation

samuel100
Copy link
Contributor

Describe your changes

When using GPTQ the quantized_model must be moved to the CUDA device to avoid the "Expected all tensors to be on the same device" error in auto-gptq. See AutoGPTQ/AutoGPTQ#729

Checklist before requesting a review

  • Add unit tests for this change.
  • Make sure all tests can pass.
  • Update documents if necessary.
  • Lint and apply fixes to your code by running lintrunner -a
  • Is this a user-facing change? If yes, give a description of this change to be included in the release notes.
  • Is this PR including examples changes? If yes, please remember to update example documentation in a follow-up PR.

@xiaoyu-work
Copy link
Contributor

According to the discussion thread, it seems this was already fixed by AutoGPTQ/AutoGPTQ#607?

@jambayk
Copy link
Contributor

jambayk commented Jan 6, 2025

Like @xiaoyu-work mentioned, this issue should be fixed if you install autogptq from source https://github.com/AutoGPTQ/AutoGPTQ?tab=readme-ov-file#install-from-source. Could you try it to see if it works?

@samuel100
Copy link
Contributor Author

samuel100 commented Jan 7, 2025

@xiaoyu-work @jambayk -- I tested building from source and confirm that it fixed the issue. I'll close this PR and create a new one that will update the documentation with instructions.

@samuel100 samuel100 closed this Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants