aboutsummaryrefslogtreecommitdiff
path: root/ggml.h
diff options
context:
space:
mode:
authorGeorgi Gerganov <ggerganov@gmail.com>2023-04-28 20:37:43 +0300
committerGeorgi Gerganov <ggerganov@gmail.com>2023-04-28 20:51:05 +0300
commit55390bcaf2579a5435564d7267ae3ed367837fd6 (patch)
tree6b78f6fedbf203c1001f498207ec60616a288487 /ggml.h
parent5fba3c016bfd1d73a070e7c93dac14162ce118d0 (diff)
ggml : sync ggml (ggml_alibi)
Diffstat (limited to 'ggml.h')
-rw-r--r--ggml.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/ggml.h b/ggml.h
index 1bbe2db..540901f 100644
--- a/ggml.h
+++ b/ggml.h
@@ -269,6 +269,7 @@ extern "C" {
GGML_OP_DIAG_MASK_INF,
GGML_OP_SOFT_MAX,
GGML_OP_ROPE,
+ GGML_OP_ALIBI,
GGML_OP_CONV_1D_1S,
GGML_OP_CONV_1D_2S,
@@ -662,6 +663,14 @@ extern "C" {
int n_dims,
int mode);
+ // alibi position embedding
+ // in-place, returns view(a)
+ struct ggml_tensor * ggml_alibi(
+ struct ggml_context * ctx,
+ struct ggml_tensor * a,
+ int n_past,
+ int n_head);
+
// padding = 1
// TODO: we don't support extra parameters for now
// that's why we are hard-coding the stride, padding, and dilation