aboutsummaryrefslogtreecommitdiff
path: root/ggml.h
diff options
context:
space:
mode:
authorhoangmit <hoangmit@users.noreply.github.com>2023-03-15 18:41:38 -0400
committerGitHub <noreply@github.com>2023-03-16 00:41:38 +0200
commit6eac39ba953acaeec396cea2969dbf413907e2ec (patch)
tree1c263cf2672564d1fba72b2d7e47037cea8345c3 /ggml.h
parent27944c4206a49bbe003021a2610bacaa3044e619 (diff)
Add RMS norm and use it (#187)
* add ggml_rms_norm * update op num
Diffstat (limited to 'ggml.h')
-rw-r--r--ggml.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/ggml.h b/ggml.h
index 7ce655c..bac4fe6 100644
--- a/ggml.h
+++ b/ggml.h
@@ -230,6 +230,7 @@ enum ggml_op {
GGML_OP_GELU,
GGML_OP_SILU,
GGML_OP_NORM, // normalize
+ GGML_OP_RMS_NORM,
GGML_OP_MUL_MAT,
@@ -482,6 +483,10 @@ struct ggml_tensor * ggml_norm(
struct ggml_context * ctx,
struct ggml_tensor * a);
+struct ggml_tensor * ggml_rms_norm(
+ struct ggml_context * ctx,
+ struct ggml_tensor * a);
+
// A: m rows, n columns
// B: p rows, n columns (i.e. we transpose it internally)
// result is m columns, p rows