aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgi Gerganov <ggerganov@gmail.com>2023-03-19 17:30:00 +0200
committerGeorgi Gerganov <ggerganov@gmail.com>2023-03-19 17:30:00 +0200
commit22213a17b56336bbea384a572a9484ce208c0333 (patch)
treeae931cccf100640087ef622ce836747e8e8393bc
parentd7def1a7524f712e5ebb7cd02bab0f13aa56a7f9 (diff)
Change RMSNorm eps to 1e-6 (#173)
I think this is what is used in the Python code
-rw-r--r--ggml.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ggml.c b/ggml.c
index 4fb83ad..4813f74 100644
--- a/ggml.c
+++ b/ggml.c
@@ -5556,7 +5556,7 @@ static void ggml_compute_forward_rms_norm_f32(
const size_t nb2 = dst->nb[2];
const size_t nb3 = dst->nb[3];
- const ggml_float eps = 1e-5f; // TODO: make this a parameter
+ const ggml_float eps = 1e-6f; // TODO: make this a parameter
// TODO: optimize
for (int i03 = 0; i03 < ne03; i03++) {
@@ -5572,7 +5572,7 @@ static void ggml_compute_forward_rms_norm_f32(
mean /= ne00;
float * y = (float *) ((char *) dst->data + i01*nb1 + i02*nb2 + i03*nb3);
-
+
memcpy(y, x, ne00 * sizeof(float));
// for (int i00 = 0; i00 < ne00; i00++) {
// y[i00] = x[i00];