mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-10 15:57:04 +00:00
ml/backend/ggml: fix rms norm
This commit is contained in:
@@ -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 {
|
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 {
|
func (t *Tensor) Pad(ctx ml.Context, shape ...int) ml.Tensor {
|
||||||
|
|||||||
Reference in New Issue
Block a user