llama.cpp Patch Speeds Up DeepSeek Quantized KV Cache by 15% at 48K Context
pmttyji · reddit · 2026-11-25
llama.cpp PR #32795 reads the quantized indexer K in place when fusedidx is set for DeepSeek-V4.1-Flash, with a full A/B benchmark.
Setup: DeepSeek V4.1 Flash, q80 KV cache, np1, 65k context, cold boots, 4x RTX 4000 Ada, tensor split, identical build flags and prompts on both sides.
| prompt | PP gain | TG gain |
|---|---|---|
| 7k | +2% | +2% |
| 16k | +4% | +4% |
| 28k | +9% | +8% |
| 48k | +15% | +15% |
Gains grow with context length. Testing: test-backend-ops -o LIGHTNINGINDEXER (194 cases, CUDA + CPU) all pass; server A/B against e6d624b9a with identical output sha on greedy probes; PPL and greedy-flip A/B repeated on a second deepseek41 model (382B variant, experts on CPU) with the same conclusion; f16/bf16 caches are a no-op by construction since the guard only fires for quantized types. The author tested only Ada NVIDIA cards and two IQ-quantized models, and asks others to verify on AMD/Intel GPUs and at 128K/256K context.
More from Infra
- Harmonic drive lead times stretch as Tesla Optimus ramp strains supply chain — MarwaEldiwiny · 2026-11-25
- Beyond jq: simdjson-Based sjq Filters Command-Line JSON at 20 GB/s — lemire · 2026-11-25
- 'Everyone turned on AI agents to hack every website': Orosz drowns in agent probing traffic — bendee983 · 2026-11-25
- Hunyuan 4 Flash runs locally after quantization: 58 TPS on a 4090D, 50 TPS on a 128GB Mac — viksit · 2026-11-25
- tiny-gpu: A 13K-star executable GPU architecture course in under 15 Verilog files — techNmak · 2026-11-25
- Developer adds a website AI assistant powered by Qwen3-8B running locally on a Spark — PMinervini · 2026-11-25