Skip to content

meta: support GLM-5.3 next sm tensor - #30499

Merged
ggerganov merged 6 commits into
masterfrom
aman/glm5-next-sm-tensor
Nov 3, 2026
Merged

ggerganov merged 6 commits into
masterfrom
aman/glm5-next-sm-tensor

Conversation

@am17an

@am17an am17an commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Overview

Add -sm tensor support for GLM 5.3 next.

Additional information

Requirements

@github-actions github-actions Bot added testing Everything test related ggml changes relating to the ggml tensor library for machine learning model Model specific labels Oct 14, 2026
@ggerganov

Copy link
Copy Markdown
Member

Tried on 2x DGX Sparks and crashes like this:

3.48.761.425 I llama_context: n_ctx_seq (262144) < n_ctx_train (1048576) -- the full capacity of the model will not be utilized
3.48.841.377 I ggml_backend_rpc_comm_init: pairwise communicator initialized (192.168.100.2:50052 <-> 192.168.100.1:50052)
3.48.841.429 I llama_context:        CPU  output buffer size =     0.59 MiB
3.49.042.670 I llama_kv_cache:     Meta() KV buffer size =  2816.00 MiB
3.49.043.344 I llama_kv_cache: size = 2816.00 MiB (262144 cells,  11 layers,  1/1 seqs), K (f16): 2816.00 MiB, V (f16):    0.00 MiB
3.49.043.354 I llama_kv_cache: n_rot_k = 0, n_embd_head_k_all = 512
3.49.043.355 I llama_kv_cache: n_rot_v = 0, n_embd_head_k_all = 0
3.49.080.317 I llama_memory_recurrent:     Meta() RS buffer size =   291.12 MiB
3.49.080.345 I llama_memory_recurrent: size =  582.25 MiB (     1 cells,  45 layers,  1 seqs  3 rs_seq), R (f32):   38.25 MiB, S (f32):  544.00 MiB, P (f32):    0.00 MiB
3.49.080.352 I operator(): creating indexer KV cache, size = 262144 cells
3.49.233.389 I llama_kv_cache:     Meta() KV buffer size =  2112.00 MiB
3.49.233.774 I llama_kv_cache: size = 2112.00 MiB (262144 cells,  11 layers,  1/1 seqs), K (f16): 2112.00 MiB, V (f16):    0.00 MiB
3.49.233.779 I llama_kv_cache: n_rot_k = 0, n_embd_head_k_all = 384
3.49.233.779 I llama_kv_cache: n_rot_v = 0, n_embd_head_k_all = 0
3.49.233.804 I sched_reserve: reserving ...
3.49.267.894 I resolve_fused_ops: resolving fused DeepSeek V4 HC support:
3.49.271.457 I resolve_fused_ops: fused DeepSeek V4 HC pre enabled
3.49.272.723 I resolve_fused_ops: fused DeepSeek V4 HC comb enabled
3.49.273.928 I resolve_fused_ops: fused DeepSeek V4 HC post enabled
3.49.606.777 I sched_reserve:     Meta() compute buffer size =  4267.70 MiB
3.49.606.781 I sched_reserve:        CPU compute buffer size =  1427.11 MiB
3.49.606.782 I sched_reserve: graph: nodes = 8652, splits = 2, input objects = 4, input tensors = 16
3.49.606.784 I sched_reserve: reserve took 372.98 ms, sched copies = 1
3.49.606.827 I cmn          init: llama threadpool init, n_threads = 20
3.49.616.485 I cmn  common_init_: warming up the model with an empty run - please wait ... (--no-warmup to disable)
/home/ggml/development/llama.cpp-rdma/ggml/src/ggml.c:1825: GGML_ASSERT(obj_new) failed
3.49.662.596 W ggml_new_object: not enough space in the context's memory pool (needed 400752, available 400384)

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.ubuntu.com>
Enable debuginfod for this session? (y or [n]) [answered N; input not from terminal]
Debuginfod has been disabled.
To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
0x0000ece5ee387a34 in __GI___wait4 (pid=853101, stat_loc=0x0, options=0, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:30
warning: 30	../sysdeps/unix/sysv/linux/wait4.c: No such file or directory
#0  0x0000ece5ee387a34 in __GI___wait4 (pid=853101, stat_loc=0x0, options=0, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:30
30	in ../sysdeps/unix/sysv/linux/wait4.c
#1  0x0000ece5ed7634b4 in ggml_print_backtrace () from /home/ggml/development/llama.cpp-rdma/build-cuda/bin/libggml-base.so.0
#2  0x0000ece5ed76365c in ggml_abort () from /home/ggml/development/llama.cpp-rdma/build-cuda/bin/libggml-base.so.0
#3  0x0000ece5ed765ae4 in ggml_new_tensor () from /home/ggml/development/llama.cpp-rdma/build-cuda/bin/libggml-base.so.0
#4  0x0000ece5ed78dc84 in ggml_backend_meta_buffer_init_tensor_impl(ggml_backend_meta_simple_tensor_container&, ggml_tensor*) () from /home/ggml/development/llama.cpp-rdma/build-cuda/bin/libggml-base.so.0
#5  0x0000ece5ed7797c4 in ggml_gallocr_alloc_graph () from /home/ggml/development/llama.cpp-rdma/build-cuda/bin/libggml-base.so.0
#6  0x0000ece5ed77ffec in ggml_backend_sched_alloc_graph () from /home/ggml/development/llama.cpp-rdma/build-cuda/bin/libggml-base.so.0
#7  0x0000ece5eda51aa8 in llama_context::process_ubatch(llama_ubatch const&, llm_graph_type, llama_memory_context_i*, ggml_status&) () from /home/ggml/development/llama.cpp-rdma/build-cuda/bin/libllama.so.0
#8  0x0000ece5eda5abf8 in llama_context::decode(llama_batch_ext const&) () from /home/ggml/development/llama.cpp-rdma/build-cuda/bin/libllama.so.0
#9  0x0000ece5ee013e94 in common_init_from_params(common_params&, bool) () from /home/ggml/development/llama.cpp-rdma/build-cuda/bin/libllama-common.so.0
#10 0x0000ece5ee88c528 in server_context_impl::load_model(common_params&) () from /home/ggml/development/llama.cpp-rdma/build-cuda/bin/libllama-server-impl.so
#11 0x0000ece5ee7ed838 in llama_server(common_params&, int, char**, server_child&) () from /home/ggml/development/llama.cpp-rdma/build-cuda/bin/libllama-server-impl.so
#12 0x0000ece5ee7ef458 in llama_server(int, char**) () from /home/ggml/development/llama.cpp-rdma/build-cuda/bin/libllama-server-impl.so
#13 0x0000ece5ee2d84c4 in __libc_start_call_main (main=main@entry=0xb0d46caf1140 <main>, argc=argc@entry=38, argv=argv@entry=0xfffffd1204c8) at ../sysdeps/nptl/libc_start_call_main.h:58
warning: 58	../sysdeps/nptl/libc_start_call_main.h: No such file or directory
#14 0x0000ece5ee2d8598 in __libc_start_main_impl (main=0xb0d46caf1140 <main>, argc=38, argv=0xfffffd1204c8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=<optimized out>) at ../csu/libc-start.c:360
warning: 360	../csu/libc-start.c: No such file or directory

The startup command is:

bin/llama-server -hf ggml-org/GLM-5.3-Flash-GGUF:Q4_K \
    --spec-default --spec-type draft-mtp --spec-draft-n-max 3 \
    -b 8192 -ub 2048 -c 262144 -np 1 -lv 4 \
    --top-p 0.95 --top-k 0 --temp 1.0 \
    --rpc 192.168.100.2:50052,192.168.100.1:50052 -dev RPC0,RPC1 \
    --host 0.0.0.0 --port 8013 -lm dio --alias agent-glm -sm tensor

Bumping the compute_headroom in ggml-backend-meta.cpp from 16 to 32 fixes the issue. But I don't know why it happens in the first place. I think we should understand that.

@JohannesGaessler JohannesGaessler left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not saying that it should be done in this PR but I think that we should at some point look into modularizing llama_meta_device_get_split_state via the per-model subclasses.

Comment thread ggml/src/ggml-backend-meta.cpp Resolved
Comment thread src/models/glm5-next.cpp Resolved
@am17an

am17an commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

@ggerganov there are extra views created per n_rs so this overflows. The solution is to either increase the headroom or allow it grow dynamically

@ggerganov ggerganov self-assigned this Oct 20, 2026
@ggerganov

Copy link
Copy Markdown
Member

@ggerganov there are extra views created per n_rs so this overflows. The solution is to either increase the headroom or allow it grow dynamically

Is it these views?

for (int64_t t = 1; t <= K; ++t) {
const int64_t s_idx = std::max<int64_t>(0, conv_input->ne[0] - conv_states->ne[0] - K + t);
const int64_t s_slot = K - t;
ggml_tensor * conv_state_last =
ggml_view_3d(ctx0, conv_input,
conv_kernel_size - 1, conv_channels, n_seqs,
conv_input->nb[1], conv_input->nb[2],
ggml_row_size(conv_input->type, s_idx));
ggml_tensor * conv_state_update =
ggml_view_2d(ctx0,
conv_states_all, row_count, n_seqs,
conv_states_all->nb[1],
(s_slot * mem_size + kv_head) * row_size);
ggml_build_forward_expand(gf, ggml_cpy(ctx0, conv_state_last, conv_state_update));
}

@am17an

am17an commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

Yes I think if less n_rs your command will also not crash.

@ggerganov

Copy link
Copy Markdown
Member

I was thinking this loop over K is a nuisance and we have to remove it eventually. It can become a single 3d copy if the conv states are arranged coherently in memory. Would benefit all delta net models and we would avoid bumping the meta backend headroom.

@am17an

am17an commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

Even now we can do the it via one extra ggml_get_rows, I think. This is what my agent suggested:

const int64_t K  = (int64_t) cparams.n_rs_seq + 1;
const int64_t n  = conv_input->ne[0] - conv_states->ne[0]; // n_seq_tokens
const int64_t Kw = std::min<int64_t>(n + 1, K);            // windows that exist in this ubatch

// window w starts at column n - (Kw - 1) + w (ascending time), it is rollback slot Kw - 1 - w
ggml_tensor * windows = ggml_view_4d(ctx0, conv_input,
        conv_kernel_size - 1, Kw, conv_channels, n_seqs,
        ggml_element_size(conv_input), conv_input->nb[1], conv_input->nb[2],
        ggml_row_size(conv_input->type, n - (Kw - 1)));

// [d-1, slot, channel, seq] view of this ubatch's cells
ggml_tensor * slots = ggml_view_4d(ctx0, conv_states_all,
        conv_kernel_size - 1, K, conv_channels, n_seqs,
        mem_size*row_size, ggml_row_size(conv_states_all->type, conv_kernel_size - 1), conv_states_all->nb[1],
        kv_head*row_size);

// slot_rev = I32 [K] {K-1, ..., 0}; the last Kw entries are {Kw-1, ..., 0}
ggml_tensor * idx = ggml_view_1d(ctx0, slot_rev, Kw, (K - Kw)*sizeof(int32_t));

ggml_build_forward_expand(gf, ggml_set_rows(ctx0, slots, windows, idx));

@ggerganov

Copy link
Copy Markdown
Member

If it works as suggested, I think it's an improvement to the current state.

Though we should still leave a TODO to try to rearrange the states so that their order is the same and be able to copy directly without ggml_set_rows.

Comment thread src/llama-model.cpp
const int64_t head_dim = hparams.n_embd_head_kda;
const int64_t blck_size_perf = std::lcm(blck_size, 128);
const int64_t granularity_qkv = std::lcm(blck_size_perf, head_dim);
if (std::regex_match(tensor_name, pattern_q_weight) || std::regex_match(tensor_name, pattern_kv_weight) ||

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The granularity needed for the Q and K/V matrices will in general be different. One K/V head needs to align with n_gqa Q heads. The granularity is the minimum chunk size with which a tensor can be subdivided so it needs to be bigger by a factor of n_gqa for Q than it is for K/V. You can look at the code further down for an example. What you are calculating here should be the granularity needed for K/V.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This model has Q size 192 and K/V size has 128 iirc, that's why it's weird

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I just looked at how the tensors are created:

        const int64_t head_dim = hparams.n_embd_head_kda;
        const int64_t d_conv   = hparams.ssm_d_conv;
        const int64_t d_inner  = head_dim * n_head;

        if (hparams.is_recr(i)) {
            auto conv = [&](llm_tensor tid) {
                ggml_tensor * t = create_tensor(tn(tid, "weight", i), {d_conv, 1, d_inner, 1}, TENSOR_NOT_REQUIRED);
                return t ? t : create_tensor(tn(tid, "weight", i), {d_conv, 1, d_inner}, flags);
            };
            layer.ssm_q_conv = conv(LLM_TENSOR_SSM_CONV1D_Q);
            layer.ssm_k_conv = conv(LLM_TENSOR_SSM_CONV1D_K);
            layer.ssm_v_conv = conv(LLM_TENSOR_SSM_CONV1D_V);

            create_tensor_qkv(layer, i, n_embd, d_inner, d_inner, d_inner, flags);

Q, K and V all have the same size for the recurrent layers so the way this is implemented is correct after all.

@JohannesGaessler

Copy link
Copy Markdown
Contributor

Please also check whether the added ggml_cont makes a difference in terms of performance.

@am17an

am17an commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

It does make a small negative difference, but it's not worth blocking this for.

@am17an

am17an commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor Author

@ggerganov can you try this branch? https://github.com/ggml-org/llama.cpp/compare/aman/glm5-next-conv-setrows

@ggerganov

Copy link
Copy Markdown
Member

It still crashes - the branch is pretty much the same as gg/glm5 that I tried earlier. The only diff is in the switch case order:

git diff gg/glm5
diff --git a/ggml/src/ggml-backend-meta.cpp b/ggml/src/ggml-backend-meta.cpp
index a72a4e6d4..2d3356d69 100644
--- a/ggml/src/ggml-backend-meta.cpp
+++ b/ggml/src/ggml-backend-meta.cpp
@@ -1019,14 +1019,12 @@ static struct ggml_backend_meta_split_state ggml_backend_meta_get_split_state(
             case GGML_OP_PAD: {
                 split_state = handle_pad(src_ss);
             } break;
-            case GGML_OP_PAD_REFLECT_1D:
-            case GGML_OP_ROLL: {
-                split_state = handle_generic(src_ss, /*scalar_only =*/ true);
-            } break;
             case GGML_OP_ARANGE: {
-                // no sources, every device computes the full range
+                // no srcs, every device computes the same values
                 split_state = {GGML_BACKEND_SPLIT_AXIS_MIRRORED, {0}, {1}, 1};
             } break;
+            case GGML_OP_PAD_REFLECT_1D:
+            case GGML_OP_ROLL:
             case GGML_OP_TIMESTEP_EMBEDDING: {
                 split_state = handle_generic(src_ss, /*scalar_only =*/ true);
             } break;

Bumping the compute_headroom to 32 fixes it, but my understanding was that after the reduced number of views in the delta net, we wouldn't need to bump it.

@am17an

am17an commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

did you try the latest commit?

@ggerganov

ggerganov commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

With the latest commit there is progress - it processed the first prompt and started generating. But mid-generation it crashed like this:

...
6.06.525.048 I slot   operator(): id  0 | task 0 | accepted  2/ 3 draft tokens
6.06.657.881 I slot   operator(): id  0 | task 0 | accepted  3/ 3 draft tokens
6.06.870.268 I slot   operator(): id  0 | task 0 | accepted  3/ 3 draft tokens
/llama.cpp/ggml/src/ggml-rpc/ggml-rpc.cpp:686: Remote RPC server crashed or returned malformed response
/llama.cpp/ggml/src/ggml-rpc/ggml-rpc.cpp:686: Remote RPC server crashed or returned malformed response

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.ubuntu.com>
Enable debuginfod for this session? (y or [n]) [answered N; input not from terminal]
Debuginfod has been disabled.
To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
syscall () at ../sysdeps/unix/sysv/linux/aarch64/syscall.S:38
warning: 38	../sysdeps/unix/sysv/linux/aarch64/syscall.S: No such file or directory
#0  syscall () at ../sysdeps/unix/sysv/linux/aarch64/syscall.S:38
38	in ../sysdeps/unix/sysv/linux/aarch64/syscall.S
#1  0x0000e1dbd4d5c018 in std::__atomic_futex_unsigned_base::_M_futex_wait_until(unsigned int*, unsigned int, bool, std::chrono::duration<long, std::ratio<1l, 1l> >, std::chrono::duration<long, std::ratio<1l, 1000000000l> >) () from /lib/aarch64-linux-gnu/libstdc++.so.6
#2  0x0000e1dbd109b9f8 [PAC] in rpc_dispatcher::send(rpc_cmd, std::shared_ptr<void const>, unsigned long, void*, unsigned long) () from /llama.cpp/build/bin/libggml-rpc.so.0
#3  0x0000e1dbd109d2b8 in ggml_backend_rpc_buffer_get_tensor_2d(ggml_backend_buffer*, ggml_tensor const*, void*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) () from /llama.cpp/build/bin/libggml-rpc.so.0
#4  0x0000e1dbd3f2211c in ggml_backend_meta_get_tensor_async(ggml_backend*, ggml_tensor const*, void*, unsigned long, unsigned long) () from /llama.cpp/build/bin/libggml-base.so.0
#5  0x0000e1dbd41fd980 in llama_context::decode(llama_batch_ext const&) () from /llama.cpp/build/bin/libllama.so.0
#6  0x0000e1dbd506616c in std::_Function_handler<void (), server_context_impl::decode(int&, int)::{lambda()#1}>::_M_invoke(std::_Any_data const&) () from /llama.cpp/build/bin/libllama-server-impl.so
#7  0x0000e1dbd501bf28 in server_queue::yield_to_queue(std::function<void ()>&&) () from /llama.cpp/build/bin/libllama-server-impl.so
#8  0x0000e1dbd50794d8 in server_context_impl::decode(int&, int) () from /llama.cpp/build/bin/libllama-server-impl.so
#9  0x0000e1dbd507ace4 in server_context_impl::update_slots() () from /llama.cpp/build/bin/libllama-server-impl.so
#10 0x0000e1dbd501cc60 in server_queue::start_loop(long) () from /llama.cpp/build/bin/libllama-server-impl.so
#11 0x0000e1dbd4fc6430 in server_run(common_params&, int, char**, server_role&, server_run_opts const&) () from /llama.cpp/build/bin/libllama-server-impl.so
#12 0x0000e1dbd4fc6ea8 in llama_server(int, char**) () from /llama.cpp/build/bin/libllama-server-impl.so
#13 0x0000e1dbd4aa84c4 in __libc_start_call_main (main=main@entry=0xb021babf1140 <main>, argc=argc@entry=51, argv=argv@entry=0xffffc0d38808) at ../sysdeps/nptl/libc_start_call_main.h:58
warning: 58	../sysdeps/nptl/libc_start_call_main.h: No such file or directory
#14 0x0000e1dbd4aa8598 in __libc_start_main_impl (main=0xb021babf1140 <main>, argc=51, argv=0xffffc0d38808, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=<optimized out>) at ../csu/libc-start.c:360
warning: 360	../csu/libc-start.c: No such file or directory
#15 0x0000b021babf11b0 in _start ()
[Inferior 1 (process 212502) detached]
6.20.977.527 E srv    operator(): http client error: Failed to read connection

RPC logs:

[graph_recompute] device: 0, graph with uid 6967 not found
Client connection closed

@am17an

am17an commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Hmm.. that's the exact bug that was fixed here 910cc2a#diff-e99ef25367982c0e888a9360c7a1e542dd59126411dbee9f04ab5e39d7b59964 (it's a related bug in the RPC backend with re-allocs)

@am17an

am17an commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor Author

@ggerganov can we merge this? We can leave the MTP stuff for a follow up. I'm hitting the compute headroom stuff for dsv4.1 flash too, and I had to bump it to 4096 there. So we need a generic solution rather than fixing it in the model.

@am17an

am17an commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

the ggml_cont we added is problematic as any FA running on CPU now asserts (e.g. webgpu). Pushing a fix

am17an and others added 6 commits November 3, 2026 13:39
The MLA cache has a single KV head, so the heads on a device are its GQA
ratio. The HIP tile FA kernel for D=512 needs an even GQA ratio; with 3
devices the 16 heads of the test model were split 5/5/6 and it aborted.
With a non-unified KV cache, build_attn_mha splits q into streams with a
view. For a permuted q, e.g. the absorbed query of glm5-next, that view
aborted with "view of permuted tensor not implemented". The split is now
kept if every other dim of the source and the view stays inside one slab
of the split axis. The per-device strides are only rescaled above it.

From tetherto#353.

Co-authored-by: Pratik Narola <[email protected]>
The meta backend can now split the per-stream view of the permuted q, so
the cont is not needed for -sm tensor with a non-unified KV cache. With
the cont, the q of flash attention was not contiguous, and when FA ran on
the CPU (WebGPU) the meta get_tensor aborted.
@am17an
am17an force-pushed the aman/glm5-next-sm-tensor branch from 49a581a to 1f5161c Compare November 3, 2026 05:46

@am17an am17an left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ggerganov can we merge this too? the metal failures seem unrelated to this PR

@ggerganov
ggerganov merged commit 259d917 into master Nov 3, 2026
36 of 40 checks passed
fencerJP pushed a commit to fencerJP/llama-apu that referenced this pull request Nov 21, 2026
* meta: support GLM-5.3 next sm tensor

* glm5-next : cont q_absorbed for -sm tensor with non-unified KV

* meta : keep GGML_OP_ARANGE in ggml.h order

* glm5-next : split MLA heads in pairs for -sm tensor

The MLA cache has a single KV head, so the heads on a device are its GQA
ratio. The HIP tile FA kernel for D=512 needs an even GQA ratio; with 3
devices the 16 heads of the test model were split 5/5/6 and it aborted.

* meta : keep the split for views inside one slab of the split axis

With a non-unified KV cache, build_attn_mha splits q into streams with a
view. For a permuted q, e.g. the absorbed query of glm5-next, that view
aborted with "view of permuted tensor not implemented". The split is now
kept if every other dim of the source and the view stays inside one slab
of the split axis. The per-device strides are only rescaled above it.

From tetherto#353.

Co-authored-by: Pratik Narola <[email protected]>

* glm5-next : drop the q_absorbed cont

The meta backend can now split the per-stream view of the permuted q, so
the cont is not needed for -sm tensor with a non-unified KV cache. With
the cont, the q of flash attention was not contiguous, and when FA ran on
the CPU (WebGPU) the meta get_tensor aborted.

---------

Co-authored-by: Pratik Narola <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning model Model specific testing Everything test related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants