docs: FORK.md, run 4 window - MoE cache CPU-share retest (loss), Inkling offload threshold (not set), perf logger fix

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PZz44SLQvTXMyWGio6t9DZ
This commit is contained in:
LumpiastyandClaude Opus 5.5 committed 2026-11-23 16:57:01 +01:00
1 parent 6d57cfa352
commit 90fe10dcad
1 file changed
+24 -4
+24 -4
View File
@@ -1330,9 +1330,11 @@ time mostly `ggml_vk_wait_for_fence` (43%) and the kernel (11%, the uploads): GP
(7.3 t/s): GPU busy 58%, CPU in the OpenMP barrier spin (libgomp 36%) and
`ggml_vec_dot_nvfp4_q8_0` (21%): the UD-Q4_K_XL experts are NVFP4, and that CPU dot product is the
decode hotspot. Qwen3.6-35B for comparison: prefill 263 t/s at GPU busy 52%, decode 13.8 t/s at
35%, `vec_dot_q4_K_q8_K` 10%. `GGML_VK_PERF_LOGGER=1` aborts at the second split
(`GGML_ASSERT(ctx->compute_ctx.expired())`, ggml-vulkan.cpp:15692), so it gives per-op GPU times
only for the first split; not investigated.
35%, `vec_dot_q4_K_q8_K` 10%. `GGML_VK_PERF_LOGGER=1` aborted at the second split
(`GGML_ASSERT(ctx->compute_ctx.expired())`), so it gave per-op GPU times only for the first split.
It aborts only without the transfer queue (that profile predates Mesa 26.3.1): the scheduler then
records the next split's input copies into the compute context before `graph_compute`. Fixed on
branch `fable5/vk-perf-logger-fix` (not in production, pick it at the next rebase; section 7).
**Failure modes and known limits.**
- LoRA adapters look weights up by name (`llama_adapter_lora::get_weight`), so they do not apply to
@@ -1670,6 +1672,7 @@ without a new reason.
| `GGML_VK_ASYNC_USE_TRANSFER_QUEUE=1` | flat (-0.1%), byte-identical | GCN is excluded from `prefers_transfer_queue` and RADV exposes no transfer-only queue family here; the per-layer upload-then-compute order leaves nothing to overlap. A standalone Vulkan microbench did show 60-73% of an H2D copy on queue family 1 hidden behind compute, so double-buffered prefetch inside one backend context remains an untested idea (estimated +10-15%, unproven). Superseded 2026-11-23 on Mesa 26.3.1 with `RADV_EXPERIMENTAL=transfer_queue` (a real SDMA transfer family): +6-8% prefill, in production (section 5). |
| Fractional `-ncmoe` | no measured win | Config only uses integers (22/40/48); upstream refactored `-ncmoe` into `llm_add_n_cpu_ffn_overrides`. Dropped. |
| MoE cache `--moe-cache-mib` 512 / 1536 / 2304 (Qwen3.6-35B, ncmoe 40, ctx 131072) | tg256@d4096 -42% / +5% / +12%; prefill +1-3%; idle VRAM 6.15 / 7.19 / 7.96 GB vs 5.66 | Small caches thrash (8-of-256 routing over 40 layers) and add a per-layer ids readback; only ~2.3 GiB pays and leaves no VRAM for a long KV. Not enabled. |
| MoE cache with the CPU share (`--moe-cache-mib 256/512 --moe-cache-cpu-share 0.5/0.9`; Qwen3.6-35B production command line, ctx 131072, mmproj resident; llama-server `/completion`, `cache_prompt: false`, one warm-up request; 2026-11-23 run 4, `/root/arms/run4/`) | 256 MiB share 0.5, two arms against two off arms: tg256 @ d4096 median 10.25 vs 16.62 t/s (-38%), pp4096 161 vs 317 (-49%), pp2048 141 vs 255 (-45%). 512 MiB share 0.9: tg 12.5 / 8.1, pp 162; share 0.5: tg 2.6, pp 146 (one sample, during another agent's pod build; 512 MiB is 8.18 of 8.59 GB VRAM after load, too close to full) | About 0.9 GB is free at production ctx with the mmproj loaded (7.66 GB used after load), so only a small cache fits, and a small cache still thrashes; the CPU share does not rescue it. Prefill halves although batches over 32 tokens bypass the cache (`get_slot_map`); why was not looked at. Not enabled. |
| MTP speculative decoding, Qwen3.6-35B | decode -39% (n1), -37% (n2), -50% (n3), -44% (n4), best -19% (n2, p-min 0.75); prefill -3 to -6% | A spec step costs ~180 ms vs 52 ms for plain decode; a 2-token verify alone is only 1.4x a 1-token step, so ~100 ms/step is draft machinery. The nextn layer adds 1.25 GiB VRAM. Entries removed. |
| MTP, gemma-4-26B-A4B | decode -57.9% (n1), prefill pp4k -34% | Same mechanism (~210 ms vs ~50 ms per step); MTP needs `--swa-full`, which alone costs -10.5% decode, -32% pp4k and saturates VRAM. Entries removed. |
| MTP, gemma E4B | decode -10.9% | Acceptance 0.41-0.67. The +19.5% pp seen with it comes from `--swa-full`, not MTP. |
@@ -1905,7 +1908,24 @@ Machine-level:
end-minus-4 tail 2.7 s in a tool request; llama-bench pp16 is about 1 s at `-t 6`). F14's
system-prompt break turns the user message of a tool request into such a batch. Not
investigated.
- Not run (time): the MoE cache `--moe-cache-cpu-share` retest.
- The MoE cache `--moe-cache-cpu-share` retest ran later the same day (run 4, section 4 row): a loss.
- From the 2026-11-23 run 4 window (`/root/arms/run4/`), measured and not adopted:
- Inkling `GGML_OP_OFFLOAD_MIN_BATCH` (production `-tb 6`, F13 views, `LLAMA_LOOP_FULL_COPY=0`),
llama-bench `-p 4,8,16,24,31,32 -n 0 -r 5`, arms def 16 8 8 16 def, medians of 10 samples in
ms: N=4 430 / 306 / 279 (the same CPU path in all three: noise), N=8 633 / 529 / 588 (the
threshold-8 GPU path is no faster), N=16 1255 / 1182 / 1175, N=24 1448 / 1295 / 1291, N=31
1613 / 1486 / 1487, N=32 (GPU in all) 1415 / 1363 / 1360. The GPU path at 16-31 tokens is
6-11% faster in llama-bench, about the noise. A scratch server on the production command line
(one arm each, def first) went the other way: 19 / 21 / 29-token prompts 1353, 1312 / 1526,
1355 / 1736, 1765 ms at the default against 1425, 1587 / 1715, 1755 / 1969, 3541 ms at 16;
greedy outputs identical. Not set: no clear win for tool-request TTFT.
- `fable5/vk-perf-logger-fix` (`6d57cfa35`, on `6a6c6c4e4`): the perf logger reuses an open
compute context at the start of a graph instead of asserting that none is open. Tested on the pod
with a scratch build (`/root/arms/vkperf`), Inkling llama-bench `-p 2048 -n 4` with
`GGML_VK_PERF_LOGGER=1` and the transfer queue off: production aborts after the first timing
block (exit 134), the fix runs to the end (477 timing blocks). With the transfer queue on
(production's environment) neither aborts, for Inkling and the 35B. A debug-only path; carry it
at the next rebase.
- From the 2026-11-23 slimming window (`/root/arms/run3/win.log`), 35B decode at production `-t 4`,
llama-bench tg256 @ d4096, measured and not adopted:
- `--prio` (process-wide, one value per invocation, arms 0 2 2 0): prio 0 16.37 / 16.94, prio 2