Add Sjoerd L40S validation, KLD context-length stability data

- Asymmetric paper: Sjoerd 122B on 2x L40S at 82K. q8_0/turbo3 100%
  decode recovery. q8_0/turbo2 also 100% recovery (V free to 2-bit).
- MoE paper: turbo2 no-crossover at 82K on hybrid MoE (12 attn layers),
  architecture-dependent finding.
- KLD results: new context-length scaling data (2K/4K/8K on M2 Pro).
  Mean KLD stable/improving with context, does not drift.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: tturney@psyguard.ai
This commit is contained in:
committed 2026-04-01 15:09:08 -05:00
1 parent 05fde211c0
commit ec29f21fbf
3 files changed
+31

No files matched your search

+19
View File
@@ -28,6 +28,25 @@ The same-top-p metric shows turbo3 agrees with f16 on the top token 94-96% of th
Dense model shows lower KLD across all cache types because the dense attention pattern is more concentrated (fewer heads, more focused attention), making the KV cache less sensitive to quantization noise.
## KLD Stability Across Context Length (2026-04-01)
**Hardware:** Apple M2 Pro 16GB
**Model:** Qwen2.5-1.5B-Instruct Q4_K_M
**Config:** asymmetric q8_0-K / turbo3-V, flash attention on
**Baseline:** q8_0/q8_0 logits at each context length (4 chunks wikitext-2)
| Context | Mean KLD | Max KLD | RMS Δp | Same top-p % | PPL (turbo3) | PPL (q8_0) |
|---------|----------|---------|--------|-------------|--------------|------------|
| 2,048 | 0.01976 | 1.543 | 3.83% | 92.52% | 10.48 | 10.24 |
| 4,096 | 0.01819 | 2.201 | 3.85% | 93.31% | 8.59 | 8.41 |
| 8,192 | 0.01666 | 1.658 | 3.72% | 93.86% | 8.51 | 8.33 |
### Observation
Mean KLD decreases from 0.0198 at 2K to 0.0167 at 8K. Same-top-p improves from 92.5% to 93.9%. Max KLD outliers do not grow monotonically (4K has the highest max at 2.20, 8K is lower at 1.66).
Tested on Qwen2.5-1.5B (M2 Pro 16GB constraint). Larger models at longer context (32K+) may behave differently. The M5 Max data (above) covers larger models but only at ctx=512.
## Raw Logs
- `~/local_llms/llama.cpp/results/kld_moe_q8_0.log`
+7
View File
@@ -248,6 +248,13 @@ These findings have been independently confirmed by multiple researchers:
- Full asymmetric K/V PPL matrix (ctx=512, Qwen3.5-27B Q6_K): **V type dominates PPL** (columns vary more than rows). K=turbo3/V=turbo3 (6.7251) approximately equals K=q8_0/V=turbo3 (6.6885). Independent CUDA confirmation that K precision matters less than V precision for quality, and that asymmetric is not needed on Q6_K+ weights
- [Detailed results](https://github.com/ggml-org/llama.cpp/discussions/20969#discussioncomment-16404751) with KL divergence, NIAH, and speed across 4 GPUs and 3 architecture generations
**@sjoerdmaessen (Sjoerd Maessen)** — [Qwen3.5-122B-A10B Q5_K_S, 2x NVIDIA L40S 48GB (SM89), 82K context](https://github.com/ggml-org/llama.cpp/discussions/20969#discussioncomment-16412852) (2026-04-01):
- Strongest production validation of asymmetric K/V to date. Asymmetric q8_0/turbo3: **100% decode recovery** (61.1 t/s matching q8_0 baseline exactly) with 31% KV memory savings (1,046 to 715 MiB)
- [Follow-up](https://github.com/ggml-org/llama.cpp/discussions/20969#discussioncomment-16413776): Asymmetric q8_0/turbo2 also **100% decode recovery** (61.3 t/s) with 34% KV savings (1,046 to 686 MiB). **V compression is free down to 2-bit** on this 122B model. Boundary V auto-enabled, no penalty
- Symmetric turbo3/turbo3: -6.4% decode. The entire TG penalty is K-side dequant, confirming the core asymmetric thesis on production multi-GPU hardware
- First 122B model tested, first L40S (data center Ada) validation, first multi-GPU split validation
- Dual-slot concurrent with turbo3: +44% aggregate throughput. turbo2 dual-slot: +46%
**@mudler (Ettore Di Giacinto)** — [APEX launch](https://github.com/mudler/apex-quant), [LocalAI](https://github.com/mudler/LocalAI) (44.7k stars) (2026-04-01):
- Released APEX (Adaptive Precision for EXpert Models), a MoE-aware mixed-precision weight quantization method for Qwen3.5-35B-A3B
- Explicitly recommends pairing APEX with TurboQuant KV cache compression in the [launch announcement](https://huggingface.co/mudler/Qwen3.5-35B-A3B-APEX-GGUF). First major open source project to officially integrate TurboQuant into their recommended stack
@@ -227,6 +227,11 @@ Not validated:
- Kernel optimizations yield +13-69% decode improvement at 32K across 4 GPUs vs base TurboQuant implementation
- Confirms V compression dominance from asymmetric K/V matrix: V type varies PPL more than K type
**@sjoerdmaessen (Sjoerd Maessen)** — [Qwen3.5-122B-A10B Q5_K_S, 2x NVIDIA L40S 48GB, 82K context](https://github.com/ggml-org/llama.cpp/discussions/20969#discussioncomment-16412852) (2026-04-01):
- turbo2 at 82K on this hybrid MoE (12 attention layers + 36 recurrent): TG 57.7 t/s vs q8_0 61.1 t/s (-5.6%). **No crossover** where turbo2 beats q8_0, unlike our Qwen3.5-35B finding at 32K on Metal
- Suggests the turbo2 decode crossover is architecture-dependent: hybrid MoE with only 12 KV attention layers may not generate enough cache bandwidth savings for turbo2 to win, unlike pure-transformer MoE with more KV layers
- Asymmetric q8_0/turbo3: 100% decode recovery, confirming V compression is free on this MoE architecture
**@mudler (Ettore Di Giacinto)** — [APEX](https://github.com/mudler/apex-quant) + TurboQuant integration, [LocalAI](https://github.com/mudler/LocalAI) (44.7k stars) (2026-04-01):
- Tested TurboQuant KV cache compression on top of APEX MoE weight quantization for Qwen3.5-35B-A3B at 8K context
- +14% prompt processing speedup across all APEX tiers (I-Quality: 1,752 to 2,003 t/s, I-Compact: 1,714 to 1,959 t/s, Mini: 1,696 to 1,938 t/s)