Skip to content

Commit

Permalink
Merge branch 'ggerganov:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
bartowski1182 authored May 19, 2024
2 parents a29c197 + f030ec1 commit 063b0d4
Show file tree
Hide file tree
Showing 4 changed files with 8,875 additions and 5,272 deletions.
2 changes: 1 addition & 1 deletion ggml-quants.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading

0 comments on commit 063b0d4

Please sign in to comment.