Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions ggml/include/ggml.h
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,7 @@ extern "C" {
GGML_OP_GATED_LINEAR_ATTN,
GGML_OP_RWKV_WKV7,
GGML_OP_SOLVE_TRI,
GGML_OP_DELTA_NET,

GGML_OP_UNARY,

Expand Down Expand Up @@ -2460,6 +2461,15 @@ extern "C" {
bool lower,
bool uni);

GGML_API struct ggml_tensor * ggml_delta_net(
struct ggml_context * ctx,
struct ggml_tensor * q, // [S_k, n_tokens, H_k, n_seqs] - Query (pre-permuted)
struct ggml_tensor * k, // [S_k, n_tokens, H_k, n_seqs] - Key (pre-permuted)
struct ggml_tensor * v, // [S_v, n_tokens, H_v, n_seqs] - Value (pre-permuted)
struct ggml_tensor * g, // [n_tokens, 1, H_k, n_seqs] - Gate logits (pre-permuted)
struct ggml_tensor * beta, // [1, n_tokens, H_k, n_seqs] - Beta (pre-permuted)
struct ggml_tensor * state); // [S_v, S_v*H_v, 1, n_seqs] - Recurrent state

// custom operators

typedef void (*ggml_custom1_op_t)(struct ggml_tensor * dst , const struct ggml_tensor * a, int ith, int nth, void * userdata);
Expand Down
Loading