diff options
author | Georgi Gerganov <ggerganov@gmail.com> | 2023-05-20 15:34:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-20 15:34:45 +0300 |
commit | 3de84b26066d95068409c1dc79bcc41c1eea2a03 (patch) | |
tree | bbfba33243550bd0db214bbbb6e323ca5f885fef /ggml.h | |
parent | affc76edfdefa7b326f526e463cc65ff13fcfb92 (diff) |
ggml : add ggml_clamp() (#1539)
* ggml : add ggml_clamp()
* ggml : indentation
Diffstat (limited to 'ggml.h')
-rw-r--r-- | ggml.h | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -313,6 +313,7 @@ extern "C" { GGML_OP_ROPE, GGML_OP_ROPE_BACK, GGML_OP_ALIBI, + GGML_OP_CLAMP, GGML_OP_CONV_1D_1S, GGML_OP_CONV_1D_2S, @@ -849,7 +850,7 @@ extern "C" { int n_past); // in-place, returns view(a) - GGML_API struct ggml_tensor * gml_diag_mask_zero_inplace( + GGML_API struct ggml_tensor * ggml_diag_mask_zero_inplace( struct ggml_context * ctx, struct ggml_tensor * a, int n_past); @@ -897,7 +898,16 @@ extern "C" { struct ggml_context * ctx, struct ggml_tensor * a, int n_past, - int n_head); + int n_head, + float bias_max); + + // clamp + // in-place, returns view(a) + struct ggml_tensor * ggml_clamp( + struct ggml_context * ctx, + struct ggml_tensor * a, + float min, + float max); // padding = 1 // TODO: we don't support extra parameters for now |