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

fix: Check underlying model device type when moving 8-bit quantized models to GPU at eval #3622

Merged
merged 1 commit into from
Sep 16, 2023

Conversation

jeffkinnison
Copy link
Contributor

@jeffkinnison jeffkinnison commented Sep 16, 2023

Check self.model.model.device.type == 'cuda' rather than self.device.type when moving 8-bit models to GPU for #3606. In Trainer, self.device holds the string "cuda", so checking self.device.type raises an AttributeError. Since we work with self.model.model directly in the following code block, it makes sense to bypass the Trainer and LLM objects, and get the model device from the model itself.

@github-actions
Copy link

Unit Test Results

  4 files   -   2    4 suites   - 2   31m 42s ⏱️ - 10m 44s
31 tests ±  0  26 ✔️ ±  0    5 💤 ±0  0 ±0 
62 runs   - 20  52 ✔️  - 14  10 💤  - 6  0 ±0 

Results for commit 5f85080. ± Comparison against base commit 4806254.

@jeffkinnison jeffkinnison merged commit 02ffb06 into master Sep 16, 2023
14 of 16 checks passed
@jeffkinnison jeffkinnison deleted the 8bit-device-check-fix branch September 16, 2023 21:22
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.

2 participants