Skip to content

Commit

Permalink
ml/backend/ggml: fix rms norm
Browse files Browse the repository at this point in the history
  • Loading branch information
mxyng committed Feb 21, 2025
1 parent 5d81c1a commit 2192a28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ml/backend/ggml/ggml.go
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ func (t *Tensor) LayerNorm(ctx ml.Context, w, b ml.Tensor, eps float32) ml.Tenso
}

func (t *Tensor) RMSNorm(ctx ml.Context, w ml.Tensor, eps float32) ml.Tensor {
return (&Tensor{t: C.ggml_norm(ctx.(*Context).ctx, t.t, C.float(eps))}).Mul(ctx, w)
return (&Tensor{t: C.ggml_rms_norm(ctx.(*Context).ctx, t.t, C.float(eps))}).Mul(ctx, w)
}

func (t *Tensor) Pad(ctx ml.Context, shape ...int) ml.Tensor {
Expand Down

0 comments on commit 2192a28

Please sign in to comment.