libr4d: the gqa16 decode takes a verify of eight rows, so a draft step matches its single-row decodes

The h128/gqa16 decode row stopped at q_len 4 (64 query-head rows a workgroup), so LiLiCorr's
verify of 7 drafts and the anchor (q_len 8) ran the query-tiled prefill kernel while a plain decode
runs the split-KV one: no verify row was the single-row decode at its position, and greedy text
with the drafter left the text without it within a few hundred characters at one and two ranks.
The gqa16 unit raises G8_MAX_DECODE_ROWS to 128, which compiles an eight-wave arm into the gqa8
body's decode launch; gqa8 and every other unit compile as before. The rows take q_len <= 8.

Selftest: the numeric cases at q_len 8, and attn_verify_bits_case, eight verify rows against eight
single decodes bit for bit at 120, 700 and 2048 keys (gqa 16, and gqa 8 for four ranks).
docs/ARCHITECTURES.md: past 2048 keys the split law partitions a verify and a decode differently,
so a near-tie can still flip greedy text.
This commit is contained in:
keptn42 committed 2026-11-04 22:08:53 +01:00
1 parent 72160a9cff
commit 7cad854f2b
5 files changed
+121 -8

No files matched your search

+6 -1
View File
@@ -2130,7 +2130,12 @@ Traps:
scratch of per-token records: decay, `dt' x`, B), at most 31 drafts a step. NVIDIA's LiLiCorr block
drafter proposes 7: 32 query heads over 2 KV heads of 128, which four ranks replicate as the trunk's
attention does (`drafter_geom`'s `kv_repl_ok`: each rank reads its head's k and v rows at `kv_off`,
and `attn_paged_sink` runs at gqa 8 instead of 16).
and `attn_paged_sink` runs at gqa 8 instead of 16). A verify's 8 query rows run the trunk's
attention in the split-KV decode kernel a plain decode runs, at gqa 16 (one and two ranks) in eight
waves as at gqa 8 (four) in four, so each row is the single-row decode at its position bit for bit
while each of the split law's segments holds one 16-key tile (a context up to 2048 tokens: 256
segments at a decode, 128 at a verify). Past that the partition differs and a near-tie can flip
greedy text, as `ident.sh` allows ([TOOLS](TOOLS.md)).
**Vision.** `arch/nemotronh/radio.h` serves the C-RADIO (v4-H) tower and its `mlp1` projector when
the container holds them (`vision_config.model_type` `radio`): pictures, and video in tubelets of