Measured-quantization DeepSeekv4-Flash build for a single GB10 (92/100 tool-use, 16.5 tok/s spec decode)
Sharing what I’ve been building: a stripped down CUDA-only fork of antirez/ds4 tuned for a single NVIDIA GB10, plus a matching GGUF whose quantization was measured, not hand-picked. It runs fully resident with room for a 1M-token context, with the DSpark speculative drafter merged into the model file.
It ships as a single binary, ds4-server — an OpenAI- and Anthropic-compatible HTTP server, so you can point Codex CLI (/v1/responses), Claude Code style clients (/v1/messages), or anything OpenAI-shaped straight at it (./ds4-server -m ds4flash.gguf --ctx 1048576).
There are a couple of other excellent GB10 ds4 forks going around right now (@marco.palaferri and @Entrpi) — this is a third independent take. Our angle is the quantization allocation so I’ll focus there.
Results (measured on one GB10)
| Metric | Result |
|---|---|
| Tool-use quality (tool-eval-bench hardmode, composite) | 92 / 100 ★★★★★ |
| Decode, speculative (0–8k context) | 16.5 tok/s, flat with depth |
| DSpark draft acceptance (α), structured/tool workloads | 77.2% |
| Prefill, 2k → 8k prompt | ~420 → ~390 tok/s |
| Resident size (weights + merged drafter) | 91 GB |
Numbers come from tool-eval-bench (agentic tool-use, hardmode, seed 42, temperature 0.95, top-p 0.38) and our own prefill/decode microbench. The composite folds quality, deployability, and responsiveness. Decode is measured with the drafter on (acceptance-adjusted effective tokens/s); it stays flat from 0 to 8k context.
What’s actually different: measured-KL format allocation
The interesting result isn’t the top-line speed — it’s that choosing quant formats by measurement beat a good hand rule by 8 composite points at equal size and equal speed.
Instead of “2-bit experts everywhere,” each routed-expert tensor’s reconstruction error was measured per candidate format against the FP8/FP4 QAT source, weighted by an empirical Fisher sensitivity, and allocated under the byte budget by an exact knapsack (built on PrismaQuant). The result is a per-layer, per-projection mix:
- An IQ2_XXS floor (2.06 bpw) on most experts.
- MXFP4 (4.25 bpw) promoted on the quality-sensitive layers — and the measurement found a depth pattern: early layers want it on gate/up (they shape routing), late layers want it on down (they write results).
- MXFP8 on attention, shared experts, and the head, on the tensor-core
FP8 path.
The MXFP4/MXFP8 point is the part a portable k-quant GGUF can’t copy: those formats are the checkpoint’s source encoding, so promoting a layer to MXFP4 is a byte-lossless re-encode — zero requantization loss at 4.25 bpw. Experts are also REAP-pruned 25% to buy the residency headroom.
Spec decode: exact sampled acceptance, and deterministic
The drafter is used at every temperature, not just greedy. We build the draft distribution and verify with the standard p/q rejection rule (min(1, p/q) accept, residual resample on rejection), so the output distribution is provably identical to plain sampling — we validated it with a χ² oracle against the target’s own per-position marginals, not just an eyeball check. The decode/prefill numerics are also run-to-run deterministic (same seed, same hardware → same tokens), which we wanted for reproducible evals and debugging.
Honest scope
- One session, up to 1M tokens. A single-user local-inference design point today; multi-session batching is on the roadmap, not shipped.
- ds4-server only — the GGUF uses custom tensor types (MXFP4/MXFP8/IQ2 mix, REAP-pruned expert layout, merged drafter) and won’t load in llama.cpp/ollama/vLLM.
- Beta. Weights are RAM-resident by design; a model that doesn’t fit is rejected at load rather than silently degraded.
Links
- Model (public): twaggs88/DeepSeek-V4-Flash-REAP25-DSpark-ds4-GGUF · Hugging Face
- Engine: GitHub - tylerwagler/ds4: DeepSeek v4 Flash local inference engine for CUDA · GitHub
- Built on antirez/ds4, the GGUF/quant
groundwork from llama.cpp / GGML,
DeepSeek’s V4-Flash + DSpark weights, and PrismaQuant.
Happy to answer questions on the allocation method or the spec-decode math.
Next up: temperature-matched draft sampling (should push acceptance past the
greedy ceiling) and multi-session serving.