Skip to content

Add support for dbrx moe - #45

Open
charlifu wants to merge 4 commits into
neuralmagic:mainfrom
charlifu:dbrx-fp8
Open

Add support for dbrx moe#45
charlifu wants to merge 4 commits into
neuralmagic:mainfrom
charlifu:dbrx-fp8

Conversation

@charlifu

@charlifu charlifu commented Sep 26, 2024

Copy link
Copy Markdown

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