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

[Major] Add support for Mixtral8x7b #16

Merged
merged 7 commits into from
Apr 12, 2024
Merged

Conversation

cylinbao
Copy link
Collaborator

Add simulated quantization for Mixtral8x7b.
One major difference to Llama is that we move the activation quantization to after the gate operation of the SpareMoeBlock.
I also update the transformers library version to 3.39.0 for better support on the Mixtral model.
Currently, we have 4.41 perplexity on wikitext2 for W4A4 quantization.

@cylinbao cylinbao requested a review from happierpig April 11, 2024 17:10
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the current implementation is shared reordering indices for all sparse experts. Ideally, different experts should have separate sampled and generated indices. However, due to the efficiency considerations (we want to fuse the reorder operator into the previous layer norm operator) and real evaluation (no large accuracy difference between these two ways), we choose shared indices.

Copy link
Collaborator

@happierpig happierpig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the current implementation is shared reordering indices for all sparse experts. Ideally, different experts should have separate sampled and generated indices. However, due to the efficiency considerations (we want to fuse the reorder operator into the previous layer norm operator) and real evaluation (no large accuracy difference between these two ways), we choose shared indices.

@happierpig happierpig merged commit d509398 into efeslab:main Apr 12, 2024
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