bert: fix layer norm epsilon value (#1946)

Signed-off-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
Jared Van Bortel 2024-02-26 13:09:01 -05:00 committed by GitHub
parent 7a23b23728
commit 007d469034
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -343,7 +343,7 @@ void bert_eval(
// embd norm
{
inpL = ggml_norm(ctx0, inpL, 1e-5f);
inpL = ggml_norm(ctx0, inpL, 1e-12f);
inpL = ggml_add(ctx0,
ggml_mul(ctx0,
@ -403,7 +403,7 @@ void bert_eval(
// attention norm
{
cur = ggml_norm(ctx0, cur, 1e-5f);
cur = ggml_norm(ctx0, cur, 1e-12f);
cur = ggml_add(ctx0,
ggml_mul(ctx0,
@ -429,7 +429,7 @@ void bert_eval(
// output norm
{
cur = ggml_norm(ctx0, cur, 1e-5f);
cur = ggml_norm(ctx0, cur, 1e-12f);
cur = ggml_add(ctx0,
ggml_mul(ctx0,