k-quants : fix zero-weight guard in Q6_K (ref #3040)

This commit is contained in:
Georgi Gerganov 2023-09-06 12:40:57 +03:00
parent ea2c85d5d2
commit 178b1850eb
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735

View File

@ -1089,6 +1089,7 @@ void quantize_row_q6_K_reference(const float * restrict x, block_q6_K * restrict
if (!max_abs_scale) {
memset(&y[i], 0, sizeof(block_q6_K));
y[i].d = ggml_fp32_to_fp16(0.f);
x += QK_K;
continue;
}