Skip to content

Commit 729ebf8

Browse files
committed
Unified Delta.net
1 parent 1aed3d7 commit 729ebf8

File tree

17 files changed

+366
-11806
lines changed

17 files changed

+366
-11806
lines changed

common/arg.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1951,13 +1951,6 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
19511951
params.kv_unified = true;
19521952
}
19531953
).set_env("LLAMA_ARG_KV_SPLIT"));
1954-
add_opt(common_arg(
1955-
{"--dump-cache"},
1956-
"dump cache statistics after each token generation",
1957-
[](common_params & params) {
1958-
params.dump_cache = true;
1959-
}
1960-
).set_examples({LLAMA_EXAMPLE_MAIN}));
19611954
add_opt(common_arg(
19621955
{"--no-context-shift"},
19631956
string_format("disables context shift on infinite text generation (default: %s)", params.ctx_shift ? "disabled" : "enabled"),

common/common.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,6 @@ struct common_params {
399399
ggml_type cache_type_k = GGML_TYPE_F16; // KV cache data type for the K
400400
ggml_type cache_type_v = GGML_TYPE_F16; // KV cache data type for the V
401401

402-
bool dump_cache = false; // dump cache statistics after each token
403-
404402
common_conversation_mode conversation_mode = COMMON_CONVERSATION_MODE_AUTO;
405403

406404
// multimodal models (see tools/mtmd)

comp.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

examples/eval-callback/eval-callback.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ static bool ggml_debug(struct ggml_tensor * t, bool ask, void * user_data) {
154154

155155
if (!ggml_is_quantized(t->type)) {
156156
uint8_t * data = is_host ? (uint8_t *) t->data : cb_data->data.data();
157-
ggml_print_tensor(data, t->type, t->ne, t->nb, 8);
157+
ggml_print_tensor(data, t->type, t->ne, t->nb, 3);
158158
}
159159

160160
return true;

examples/model-conversion/qwen3stories.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

ggml/include/ggml.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,6 @@
245245

246246
#define GGML_MROPE_SECTIONS 4
247247

248-
#define GGML_DELTA_NET_CHUNK 64
249-
250248
#define GGML_UNUSED(x) (void)(x)
251249
#ifdef __CUDACC__
252250
template<typename... Args>
@@ -545,8 +543,7 @@ extern "C" {
545543
GGML_OP_RWKV_WKV6,
546544
GGML_OP_GATED_LINEAR_ATTN,
547545
GGML_OP_RWKV_WKV7,
548-
GGML_OP_DELTA_NET,
549-
GGML_OP_DELTA_NET_RECURRENT,
546+
GGML_OP_SOLVE_TRI,
550547

551548
GGML_OP_UNARY,
552549

@@ -2498,6 +2495,11 @@ extern "C" {
24982495
bool use_qk_l2norm,
24992496
float eps_norm);
25002497

2498+
GGML_API struct ggml_tensor * ggml_solve_tri(
2499+
struct ggml_context * ctx,
2500+
struct ggml_tensor * a,
2501+
struct ggml_tensor * x);
2502+
25012503
// custom operators
25022504

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

ggml/src/ggml-cpu/ggml-cpu.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,13 +2011,9 @@ static void ggml_compute_forward(struct ggml_compute_params * params, struct ggm
20112011
{
20122012
ggml_compute_forward_rwkv_wkv7(params, tensor);
20132013
} break;
2014-
case GGML_OP_DELTA_NET:
2014+
case GGML_OP_SOLVE_TRI:
20152015
{
2016-
ggml_compute_forward_delta_net_f32(params, tensor);
2017-
} break;
2018-
case GGML_OP_DELTA_NET_RECURRENT:
2019-
{
2020-
ggml_compute_forward_delta_net_recurrent_f32(params, tensor);
2016+
ggml_compute_forward_solve_tri(params, tensor);
20212017
} break;
20222018
case GGML_OP_MAP_CUSTOM1:
20232019
{
@@ -2180,6 +2176,7 @@ static int ggml_get_n_tasks(struct ggml_tensor * node, int n_threads) {
21802176
n_tasks = 1;
21812177
} break;
21822178
case GGML_OP_COUNT_EQUAL:
2179+
case GGML_OP_SOLVE_TRI:
21832180
{
21842181
n_tasks = n_threads;
21852182
} break;
@@ -2304,8 +2301,6 @@ static int ggml_get_n_tasks(struct ggml_tensor * node, int n_threads) {
23042301
case GGML_OP_POOL_1D:
23052302
case GGML_OP_POOL_2D:
23062303
case GGML_OP_POOL_2D_BACK:
2307-
case GGML_OP_DELTA_NET_RECURRENT:
2308-
case GGML_OP_DELTA_NET:
23092304
{
23102305
n_tasks = 1;
23112306
} break;

0 commit comments

Comments
 (0)