-
Notifications
You must be signed in to change notification settings - Fork 376
Enable MOE int4 quant on XPU #2758
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
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/2758
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 3e3ebff with merge base 8776967 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@liangan1 this is our experimental API not ready for wider adoption yet, an urgent task would be to migrate the XPULayout to the new design for int4 actually: #2752 since we want to bump the Int4WeightOnlyConfig version, can you work on this? also cc @Xia-Weiwen for visibility |
Got it. we will work on it. |
37dc887 to
82bb33f
Compare
| w1 = self.w1[expert] # I, D | ||
| w2 = self.w2[expert] # D, I | ||
| w3 = self.w3[expert] # I, D | ||
| if self.gpt_oss_mlp: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems pretty hacky, I'd suggest to try to extend based on our long term API instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. make sense to me. we will refine our pr when the long term API ready.
Motivation
This PR is target to enable the MOE quantization on XPU device. The mainly changes includes:
According to our experiments, the gpt-oss-20B model size can be reduce to 12GB.