Add DeepSeek V4 Q8 fast-prefill profile - #940
Conversation
Publish the validated alesha-pro DeepSeek V4 fast-prefill path as a separately named incubating engine, pinned to Whamp's Q8 repair image by digest. Keep the public endpoint closed until the mandatory full-context graph warm-up finishes, and record the repair, measurements, caveats, and retirement trigger.
Why so low 🤔 |
|
Sorry those are inaccurate figures on quality. They include an invalid 0/20 HermesAgent leg caused Rerunning the full quality suite now to get cleaner numbers but I've also run this on human eval plus and on gpqa and the quality of the quant is almost indistinguishable from the API and all my testing. The biggest consequence is about 25% more tokens generated per task than via the API, so it's token efficiency. That is the main thing that suffers from the quantization of these, not the quality of the intelligence as far as I can tell. |
|
Review complete and approved — verification is green across the board; merge is ready the moment you flip the draft to ready (the draft marker is yours, so I'm not overriding it — if it's guarding something still in flight, say the word). Reference-rig verification: full catalog sweep 100 pass / 0 fail (your readiness test included), Review notes worth recording:
One pointer that may interest you: the fork's resident-MoE scheduling is conceptually adjacent to the MoE expert-cache RFC at ggml-org/llama.cpp#24528 — we posted DeepSeek measurements there today (cache +46% on decode when it engages). Your 4-card long-context workload is close to the ideal profile for that line of work if it lands upstream; the two approaches (prefill-side graphs, decode-side cache) look composable on paper. Five for five once this lands. Thank you for another contribution that arrived pre-validated. |
|
The reasoning-effort runs are complete, and the PR body plus source docs are updated in
The PR now frames these scores as the serving/quantization regression check they support, not as an intelligence ceiling. It also links the open benchlocal-cli benchmark-definition issues that affect several failed cases. The catalog JSON now exposes |
|
I also tested this profile on DeepSWE, which uses repository-level coding tasks. All runs used Pi
The API ran three passes and solved 6, 5, and 5 tasks. The local server ran once at each reasoning level, so this does not prove parity. Still, local max landed inside the API's observed range, while local low finished close behind. The main difference was speed and token use:
Local max used 1.5× as many tokens and took 4.3× longer per task. One task timed out after three hours despite reaching a 0.986 partial score and passing 92% of its feature tests. I count it as unsolved, but the timeout likely reduced the final score. My read: the IQ2_XXS model retained most of the API model's coding ability, even at low reasoning. The tradeoff is speed and token use, not a clear loss of quality. |
|
Hi @Whamp apologies for i've been sleeping on PRs for a while for being occupied with loads things. I'll get the ball rolling in this week. |
|
No worries at all. I'm buried too. I can't remember if I'm even done with this one. Also I just shipped this which is a gguf DSV4F gguf on vLLM. You get speed in exchange for context length. |
Why this PR exists
This PR adds a separate incubating engine that delivers roughly 3× or greater DeepSeek V4 prefill throughput than the stock
b10200Q8 baseline, depending on context depth. The 3× claim applies to prefill only; measured output speed is about 33–38 decode tokens/s.The speedup requires compiled CUDA/C++ changes that club-3090 cannot apply as runtime patches to stock llama.cpp. The separate engine keeps those changes isolated and leaves existing llama.cpp profiles and defaults unchanged.
Related experiment
Whamp/vllm#1 separately incubates a vLLM path for the public DeepSeek V4 WNA16 safetensors artifact on four RTX 3090 GPUs. It shares the model and hardware target, but not the engine, artifact format, quantization loader, kernels, or delivery path. This llama.cpp PR remains the Antirez GGUF fast-prefill experiment; neither replaces the other.
What this adds
llamacpp/deepseek-flash-multi4-antirez-iq2-fast-prefillfor 4× homogeneous RTX 3090-class cards.llama-cpp-ds4-longctxas a separately named external engine. It does not replacellama-cpp-local.ghcr.io/whamp/llama-cpp-ds4-longctx@sha256:a96bd947d63eb81d8baf9f6f5ecb26669476383976717237450fbb5727b03745.switch.shreceives a 2,400-second readiness timeout for this slug.models/deepseek-v4-flash-0731/INTERNALS.mdanddocs/UPSTREAM.md.Engine provenance
The engine combines stable graph shapes, a resident MoE scheduler, fused kernels, and repaired Q8 cache operations. It is separately named and digest-pinned so the dependency and eventual retirement path remain explicit.
Source provenance:
alesha-pro/llama.cpp@b001c8cd7Whamp/llama.cpp@0379cf4bfThe Q8 repair fixes packed concat on CUDA and CPU, keeps Q8 padding conversion on CUDA, preserves cache type in long-context gathers, and adds 45 passing Q8 concat regression cases.
Measured result
Validated on 4× RTX 3090, PCIe only, with the rig's existing 230 W/card limits unchanged:
b10200Q8 baselineQuality regression check
The full 8-pack is used here to check whether the Q8 repair and serving changes materially damage model behavior. It is not presented as an intelligence ceiling. Several misses overlap open benchlocal-cli benchmark-definition issues in DataExtract, StructOutput, and ReasonMath.
b10200, same Antirez weights and Q8 cachelowhighmaxlowused a 16,384-token output cap;highandmaxused 65,536. Neitherlownorhighreached its cap. * Four of 226maxAPI responses reached 65,536 tokens and ended withfinish_reason=length.The stock comparisons are within one to two scenarios of the fork, which is the relevant evidence for this PR: the quantized cache repair and fast-prefill serving path preserve the tested behavior.
Deliberate caveats
This remains
🐣 Incubating, hidden from the default list, requires--force, and has noDEFAULTSrow.q8_0K and V required.LLAMA_ATTN_ROT_DISABLE=1remains required; rotation-enabled Q8 is not validated.CTX_SIZE=200000is the higher-margin fallback.Validation
Public artifact and exact catalog path:
0379cf4bf889f3d28038a005210c4bc193fc8ba1: passdiagnose-profile.sh llamacpp/deepseek-flash-multi4-antirez-iq2-fast-prefill: greenswitch.sh --force llamacpp/deepseek-flash-multi4-antirez-iq2-fast-prefill: passverify-full.sh: 9/9Prior source-equivalent gate on the clean Q8 image:
verify-stress.sh: 8/8 at 200Kquality-test.sh --medium: 67/75low121/150,high121/150,max123/150*; cap details abovesoak-test.sh: 25/25, zero errors and zero silent-empty responsesbench-agentic.sh: all 15 turns through 54KCatalog/test gates:
scripts/tests/*.sh: 98/100 passa6385ece:test-bench-capture.sh: host-specific STREAM calibration worker-count assertiontest-switch-explain.sh: the 4-GPU host resolvesvllm/defaultasmulti4, where no vLLM default exists; the same test passes when the fixture is constrained to two GPUsdocker compose config: passaislop,ruff,ty,shellcheck, and the cockpit pytest venv were unavailable on this host. No JavaScript or TypeScript changed.