-
Notifications
You must be signed in to change notification settings - Fork 11.8k
Guard against all weights in a super-block being zero #3010
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
Conversation
Looking deeper into the assert observed in #2982, this will most likely not fix it. The
If this analysis is correct, the "bug" observed in #2982 is more a model problem rather than anything else. But just in case, I now added a check against extremely small model weights. |
I'm doing a little more investigation with gdb and rr right now. I haven't tried any of the potential fixes yet.
So, maybe the first commit from this PR is the right fix. |
y[i].d = ggml_fp32_to_fp16(0.f); | ||
continue; |
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.
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.
Yes, we do. Great catch!
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.
You will fix it?
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.
Yup, will push a fix in minute directly to master
@cebtenzzre
Does this resolve the problem in #2982.
In order to get the assertion observed in #2982 all weights in a block of 256 must be zero. I see that I have a guard against this for all k_quants except
Q6_K