From 55390bcaf2579a5435564d7267ae3ed367837fd6 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Fri, 28 Apr 2023 20:37:43 +0300 Subject: ggml : sync ggml (ggml_alibi) --- ggml.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ggml.h') 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 -- cgit v1.2.3