docs(local-inference): #11391 M6 closure — per-backend kernel decisions, 8/8 verify at shipped pin on M4 Max, kokoro RTF, TurboQuant honest status#11784
Conversation
…n matrix, 8/8 verify at pin 58c0391eb on M4 Max, kokoro RTF re-verify, TurboQuant honest status - New verify/M6-per-backend-kernel-decisions.md: keep-stock-vs-reparam decision per CPU/Metal/Vulkan/Vulkan-Mali/CUDA/NPU under Gemma-4 dual head dims + windowed-SWA + shared-KV, grounded in the fork state at 58c0391eb. - M6-gemma-kv-geometry-and-fa.md: Metal FA-engage gap RESOLVED (dk512/dv512 + dk256/dv256 pipelines, 0 padding-V-cache lines vs 4 with -fa 0, M4 Max). - Evidence: metal-verify 8/8 + shipped + fused + multiblock + dispatch-smoke 9/9 + MoltenVK vulkan-verify 8/8, all at the shipped submodule pin; kokoro synth byte-identical to merged evidence (compute RTF ~0.19 loaded / 0.15 idle); TurboQuant KV quality-parity on CPU (PPL 101.6 vs 103.5 f16) but Metal SET_ROWS gap aborts TBQ KV; TBQ weight-quant fails validation (ggml_validate_row_data: invalid type 50) — recorded as honest residual. Closes #11391 evidence lane. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
Closes #11391 (Gemma-4 per-platform kernel re-optimization, M6).
What this PR adds
1. Per-backend kernel decision matrix (durable doc) —
plugins/plugin-local-inference/native/verify/M6-per-backend-kernel-decisions.md: keep-stock vs re-parameterize for CPU / Metal / Vulkan-desktop / Vulkan-Mali / CUDA / NPU under Gemma-4's dual head dims (512/256) + windowed-SWA + shared-KV, each row grounded in the fork code state at the shipped submodule pin58c0391eb. Net decision: every llama.cpp backend keeps stockq8_0KV + FA AUTO (the shippedactive-model.tsdefault); the head_dim=128 QJL/Polar KV kernels are not re-parameterized (dimensionally inapplicable, low ROI per measured geometry) and remain §8-gated for the legacy tiers; NPU is N/A-by-architecture (LiteRT-LM owns its graph).2. §8 kernel verify matrix re-run per buildable backend at the shipped pin (M4 Max, 2026-07-02) — evidence in
.github/issue-evidence/11391-kernel-verify/:reference-test: clean.metal-verify8/8 PASS +metal-verify-shipped(runtime-embedded kernels) +-fused+-multiblock+dispatch-smoke9/9 graph routes against the freshly builtlibggml-metal.dylib.device=Apple M4 Max api=1.2.334):vulkan-verify8/8 PASS.CUDA_VERIFICATION.md); model-backed graph leg hardware-gated → hardware-lab: on-device battery/power/thermal capture + flip mobile-resource-workbench device lanes to gating #11734.3. Metal FA-engage gap RESOLVED (updates
M6-gemma-kv-geometry-and-fa.md): on gemma4-E2B Q8_0 with-fa 1, Metal compileskernel_flash_attn_ext_f16_dk512_dv512+dk256_dv256,flash_attn = enabled, 0padding V cachelines (vs 4 with-fa 0); pp512 2828.6 / tg128 89.7 t/s.4. Kokoro iSTFTNet RTF re-verified at the shipped pin: one real synth → WAV byte-identical (md5) to the reviewed merged evidence (
kokoro-metal-perf/after.wav); 0.90 s user-CPU for 4.7 s audio ≈ compute RTF 0.19 on a load-100+ host (idle-host merged evidence: 723 ms, RTF 0.15; pre-fix 64×). Measured decision recorded: Accelerate/AMX on Apple (fork114eee08e), threads+NEON portable elsewhere (2bdcef890, PR #11584); a ggml-graph GPU port is now optional, not a blocker.5. TurboQuant low-precision — honest measured status:
SET_ROWSon TBQ dst unsupported — Metal whitelists QJL1_256 but no TBQ type; CUDA has both). Gemma runtime decision stays stock q8_0 KV.LLAMA_FTYPE_MOSTLY_TBQ*, TBQ3_K/TBQ4_K are CPU-trait-only (zero Metal/Vulkan mul_mat kernels), and the--tensor-type ffn_*=tbq4_koverride path fails hard (ggml_validate_row_data: invalid type 50→ quantize failure, measured). Recorded as the honest residual instead of larping a pass. Shipped Gemma weights are K-quants (Q8_0 bundle measured PPL 184.07 vs Q4_K_M requant 204.05, Metal, 8 chunks).Evidence
.github/issue-evidence/11391-kernel-verify/— 20 logs + wav + README, every number from output read by hand. Host-load caveat (concurrent agent swarm, load 70–135) annotated on all CPU wall-clock rows.Docs-and-evidence-only PR: no package source touched; verify/typecheck not applicable (
N/A - markdown + committed logs only).🤖 Generated with Claude Code