You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the loop index j is incremented by k in each iteration, which means that each iteration processes a block of k elements. starting at column j. However, the loop condition is j < nb. This condition may not be correct, because nb is calculated as k / QK_K, which is the number of blocks in the matrix, not the number of elements.
j < nb should be change to j < n
The text was updated successfully, but these errors were encountered:
the code is definitely used (I found it while debugging it), for example when you quantize to q4_k
I noticed that ggml_quantize_q4_l is only called with n = k, so in this case 1 loop iteration is valid.
but if k < n, it will lead to a bug.
To avoid this, consider fixing the code to handle cases where k < n properly.
The fix is very simple j < nb should be change to j < n
There is a bug in k_quants.c.
the loop index j is incremented by k in each iteration, which means that each iteration processes a block of k elements. starting at column j. However, the loop condition is j < nb. This condition may not be correct, because nb is calculated as k / QK_K, which is the number of blocks in the matrix, not the number of elements.
j < nb should be change to j < n

The text was updated successfully, but these errors were encountered: