Liger-Kernel icon indicating copy to clipboard operation
Liger-Kernel copied to clipboard

The accuracy is misaligned when using bf16

Open slowlyC opened this issue 11 months ago • 1 comments
trafficstars

🐛 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

slowlyC avatar Nov 28 '24 10:11 slowlyC

I think I also met this problem

Image

Irvingwangjr avatar Feb 27 '25 05:02 Irvingwangjr