Skip to content

Set accumulate type to bf16 in activation quant #152

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

Merged
merged 2 commits into from
Jul 19, 2024

Conversation

lsy323
Copy link
Collaborator

@lsy323 lsy323 commented Jul 19, 2024

XLA generate a more optimized graph in this way

Before the change, some collective ops are working on int32 mamtul, with this change those becomes bf16 (Expected). Latency is improved by ~5% compared with per-channel int8 weight only quant baseline, on llama2 70B BS=96

@lsy323 lsy323 marked this pull request as ready for review July 19, 2024 02:34
@lsy323 lsy323 requested review from qihqi, wang2yn84 and FanhaiLu1 July 19, 2024 02:35
Copy link
Collaborator

@FanhaiLu1 FanhaiLu1 left a comment

Choose a reason for hiding this comment

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

Can you update the line 142 comments: "# We have to call jax because we need to do dot(int8, int8)->int32."

@lsy323
Copy link
Collaborator Author

lsy323 commented Jul 19, 2024

Can you update the line 142 comments: "# We have to call jax because we need to do dot(int8, int8)->int32."

Updated, thanks for reminding!

@lsy323 lsy323 merged commit 60c2fa5 into AI-Hypercomputer:main Jul 19, 2024
4 checks passed
@lsy323 lsy323 deleted the lsiyuan/fix-act-quant branch July 19, 2024 04:45
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