vulkan: use small Lightning Indexer CM for batches 4-15 - #6
Conversation
|
Hey @pepuscz very much appreciated for your work on this, the correctness numbers came our great, It did lead me down the next path of optimisations, ive got a new set of commits carried in the below branch : https://github.com/Nathanw1014/llama.cpp/tree/strix-halo-vulkan-indexer-gen2 https://github.com/Nathanw1014/strix-halo-llamacpp/releases/tag/dev-20260826-7c025e5 Your work was what let do these changes, id be keen for you to test it and see what further performance gains can be had. If you woul dlike to test, can you please test with and without the spec decoding:
|
|
Independent confirmation on a second rig — thanks @pepuscz, this patch (via the v0.7.0 release) checks out end to end on my machine. Rig: ASUS Flow Z13 (Ryzen AI MAX+ 395 / 8060S, 128 GiB), CachyOS, official v0.7.0 portable, UD-IQ3_XXS + DSpark drafter (Q2_K_S), One-variable A/B on the same v0.7.0 binary using the
+4.2% at 41k — right on your curve at an earlier depth than your first table point (+4.16% at 60k), with run-to-run variance of roughly ±1.5 t/s. End-to-end vs the v0.6.3-beta3-class build (same session, same config): prefill +8.4% at pp2048 (304.5 vs 281.0 t/s) and +8.1% at pp4096; decode flat from 9k to 41k context (25.2 → 25.3 t/s) where the old build slides 26.0 → 24.7. Everything I have is consistent with the depth-scaling model in the release notes. Your retrieval protocol replicated at 59k tokens (synthetic filler, five keys at 2/20/50/80/98% depth, temp 0 / top-k 1 / top-p 1, 256-token cap, cold KV, thinking off): 29.3 t/s on f16 KV (84.4% draft acceptance, all keys recovered byte-exact); 26.9 t/s on q8_0 KV. The absolute gap to your 36.5 t/s @ 120 W is fully accounted for by the power cap (+~1 t/s per 10 W on this SoC), your CPU 2.0 GHz/boost-off policy freeing package power for the GPU, and q8_0 KV — which your stack needs for the 491k allocation but measures ~9% slower than f16 at mid depths on my box. Full write-up of that replication and the config sweeps: our r/LocalLLaMA guide — DeepSeek V4 Flash 0731 at 27+ t/s decode on Strix Halo (v0.7.0 A/B and the retrieval replication are in the Aug 27 edit note). One data point that may be useful for the docs: on this fork, |
Independent v0.7.0 qualification resultWe qualified the unmodified official strix-halo-llamacpp v0.7.0 portable release, source 95c828e. No local source patch or Lightning Indexer override was applied. The matched profile used UD-IQ3_XXS, the Q2_K/Q8_0 DSpark drafter, full target and draft GPU offload (-ngl 999, -ngld 999), flash attention on (-fa on), n_max=4, q8_0 K/V, one slot, batch 2048, and microbatch 1024. The comparison baseline was v0.6.6 source 7b6c613 plus the 4-15 small-CM dispatch from this PR, with otherwise identical model and runtime parameters. Each row reused the same frozen prompt hash and allocation with cold KV state, thinking off, temperature 0, top-k 1, top-p 1, a 256-token output cap, and five byte-exact retrieval keys.
Units are tokens/s. All eleven v0.7.0 rows recovered 5/5 keys. Geometric-mean improvements were 4.10% for prefill and 7.74% for decode. For the requested -c 524288 speculative A/B at 491,520 actual prompt tokens, v0.7.0 with DSpark reached 163.226 prefill / 25.021 decode tokens/s; the same binary and configuration without the drafter reached 162.214 / 11.882. DSpark therefore delivered 2.1058x decode throughput, with 51 of 52 drafted tokens accepted. The reduced public dataset, production manifest, and chart are published here: https://github.com/pepuscz/strix-halo-deepseek-v4-flash/releases/tag/v1.4.0 |
Overview
DSpark speculative verification can send 2–15 target tokens to the Lightning Indexer in one step. In measurements using Strix Halo llama.cpp v0.6.6, the cooperative-matrix shader lightning_indexer_cm_small_f16 was faster than the scalar lightning_indexer_f16 indexer for batches 4–15. The patch therefore keeps batches 2–3 on the scalar path and routes only batches 4–15 through small-CM.
Additional information
lightning_indexer_cm_small_f16is selected for DSpark verifier batches 4–15using:
v0.6.6 versus 4–15 small-CM patch
Benchmarked on the same dataset as Strix Halo DeepSeek V4 Flash repository.
Requirements