mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-12-21 21:47:47 +00:00
ggml : fix another case of quants nans (llama/7387)
This commit is contained in:
parent
2b07dc3186
commit
bf5fc81a8a
@ -1149,7 +1149,7 @@ static float make_qx_quants(int n, int nmax, const float * restrict x, int8_t *
|
||||
sumlx += w*x[i]*l;
|
||||
suml2 += w*l*l;
|
||||
}
|
||||
float scale = sumlx/suml2;
|
||||
float scale = suml2 ? sumlx/suml2 : 0.0f;
|
||||
if (return_early) return suml2 > 0 ? 0.5f*(scale + 1/iscale) : 1/iscale;
|
||||
float best = scale * sumlx;
|
||||
for (int is = -9; is <= 9; ++is) {
|
||||
|
Loading…
Reference in New Issue
Block a user