This repository has been archived on 2026-11-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
radiance-sycl/arch
C_Tamas 0e7e6ee09a kv streaming: a speculative verify pass must not take the dense path on a ring
With --kv-resident N and --num-speculative-tokens > 0, any prompt under
qsa_exact_to (~2051 tokens) emits digit spam at 65-140 tok/s instead of text;
the same prompt with speculation off is correct, and the same prompt at 61k
tokens with speculation on is correct.

The attention chooses sparse-or-dense with

    T == batch->n_seq || qsa_exact_to <= 0 || reach > qsa_exact_to

where 'T == n_seq' is the decode-step test. A verify window carries
n_seq x (1 + n_spec) rows, so that disjunct is false; on a short context
reach > qsa_exact_to is false too, so the pass takes the DENSE branch, which
reads a block id out of the block table as a pool address. On the stage view
that is the addressing (identity); on the ring the pool is a window of slots,
so the launch reads another layer's blocks. The branch's only guard,
kv_stage_layer(), is a no-op on the ring and its result was discarded, so
nothing failed and the text stayed fluent.

The dense path is now refused whenever the group is ring-addressed: a stream
whose ring is smaller than its id space, on a pass that is not staged. A
stream whose ring covers the context keeps the dense path, where ids and slots
coincide. The dense branch also fails the step by name if it is ever reached
with a ring bound and no selection to resolve, so this cannot stay silent.

Measured on 2x16 GB gfx1201, ring 32768, spec 3: a 63-token prompt is coherent
at 63-78 tok/s (was digit spam) and a 4.9k-token prompt is unchanged at 67
tok/s. Suites: arch_test 181 cases, mem_test 184, sched_test 142,
kv_window_test 8, p4b_kv_ring_test 4, all green.
2026-10-25 17:53:45 +07:00
..
2026-10-20 21:05:16 +02:00
2026-10-18 11:38:37 +02:00
2026-10-18 11:38:37 +02:00
2026-10-20 21:05:16 +02:00
2026-10-19 21:58:07 +02:00
2026-10-23 11:57:52 +02:00
2026-10-16 18:25:18 +02:00
2026-10-16 18:25:18 +02:00
2026-10-16 18:25:18 +02:00
2026-10-20 21:05:16 +02:00
2026-10-20 21:05:16 +02:00
2026-10-18 11:38:37 +02:00
2026-10-23 11:57:52 +02:00
2026-10-16 18:25:18 +02:00
2026-10-24 13:12:28 +02:00
2026-10-16 18:25:18 +02:00
2026-10-20 21:05:16 +02:00
2026-10-20 21:05:16 +02:00
2026-10-23 11:57:52 +02:00
2026-10-16 18:25:18 +02:00