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

Add support for dbrx moe #45

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

charlifu
Copy link

@charlifu charlifu commented Sep 26, 2024

Dbrx-instruct model does not use nn.Linear to implement the Moe layer, which leads to AutoFP8 not able to quantize the moe weight. This PR adds quantization support for dbrx model's moe layer.

  • Add a FP8DbrxExpertGLU module def to replace original DbrxExpertGLU model to quantize the weight and activation (if needed).
  • Add a example to quantize dbrx model.
  • PPL test using wikitext2: 3.91(fp16) vs 3.99 (fp8)

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.

1 participant