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

The accuracy is misaligned when using bf16 #414

Open
starstream opened this issue Nov 28, 2024 · 0 comments
Open

The accuracy is misaligned when using bf16 #414

starstream opened this issue Nov 28, 2024 · 0 comments

Comments

@starstream
Copy link

starstream commented Nov 28, 2024

🐛 Describe the bug

It is normal when using fp16, but there are some problems with bf16.
It seems that because swiglu uses tl.sigmoid(), it needs to be converted to fp32, but there is a loss of accuracy when converting to bf16.

This part of the code:
@triton.jit
def silu(x):
return x * tl.sigmoid(x)

Reproduce

No response

Versions

v0.4.2

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

No branches or pull requests

1 participant