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

Precision used in multi head attention layer #37

Closed
kimdaeun00 opened this issue Nov 26, 2024 · 1 comment
Closed

Precision used in multi head attention layer #37

kimdaeun00 opened this issue Nov 26, 2024 · 1 comment
Labels
question Further information is requested

Comments

@kimdaeun00
Copy link

Hi. Thanks for sharing your work!

I have a question for the precision used in multi-head attention layer.
In the current code(Flux), it seems that the activations are not casted to FP16 before the attention layer(mha_forward). Do other models, like PixArt-Sigma, use cast_fp16 in their mha layers?

@lmxyy lmxyy added the question Further information is requested label Jan 16, 2025
@lmxyy
Copy link
Collaborator

lmxyy commented Jan 16, 2025

The activations in FLUX are in BF16 precision. We do not use cast_fp16 in other models.

@lmxyy lmxyy closed this as completed Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants