-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Avoid division-by-zero on 0-weights #7825
base: master
Are you sure you want to change the base?
Conversation
Try using #7833 instead |
That helps with the NaNs, but not the 0-weights in |
Does it work for you? I tried but still found NaN. |
It doesn't really fix the Qwen2 issues, no, I mainly found these because BF16->BF16 flushed weights to 0, however once you fix that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow, didn't noticed that...thx for updating the code. appreciate the effort.
Converting the new
Qwen2-57B-A14B
BF16->BF16 caused a lot of 0-weights (fixed in another PR) which together with an imatrix triggered NaN output on quantization due to division-by-zero.IQ1_S crashes with this assert, fixed by #7955:
llama.cpp/ggml-quants.c
Line 13358 in 0c27e6f
This PR merely fixes the division-by-zero, it does not fix Qwen2 issues as it has subnormal weights (once converted properly) that will cause NaNs on multiplication.