DeepSeek-V4-Flash-Vision-Exp on one DGX Spark: text + images, 245k context, CUDA graphs — plus a pack that keeps 90 % of the original model

GitHub Repo Kalibrated-DeepSeek-V4-Flash-Vision-One-DGX-Spark

This is a serving recipe for DeepSeek-V4-Flash-Vision-Exp (the abliterated variant) on a single GB10, and a new EXL3 pack for it, Kalibrated Vision Exp, built on vcruz305’s MixedK pack.

Install

git clone https://github.com/GaelicThunder/DeepSeek-V4-Flash-Vision-One-DGX-Spark
cd DeepSeek-V4-Flash-Vision-One-DGX-Spark
./start.sh

It downloads the ready-to-serve pack (106 GB, public, not gated), starts the engine, waits for /v1/models and prints a test request. No image rebuild and no CUDA compile: it is the sparkinfer image the MiaAI-Lab recipe uses for the text model, with vLLM’s DeepSeek-V4 vision support (PR #54566) mounted over it as a read-only overlay of 26 Python files. PACK=mixedk ./start.sh takes the other route: vcruz305’s pack downloaded and converted on the Spark (~30 min).

What you get on one Spark

measured
context 245,760 tokens per request (KV pool 269k tokens at utilization 0.925)
images same endpoint (image_url), 1 to 3 images per prompt verified
decode, DSpark K5 draft 37.6 tok/s code · 34.1 counting · 19.7 free prose with thinking (medians of 3)
CUDA graphs captured (PIECEWISE + FULL), not enforce-eager
weights resident 100.08 GiB, 28 s warm load (the first boot compiles ~10 min of kernels)

The pack: Kalibrated Vision Exp

vcruz305’s MixedK is all 256 routed experts at 2-bit trellis with six layers at 3-bit, ~95 GB. Kalibrated adds 22 more expert layers re-quantized at a calibrated 3-bit (28 of 43), all 256 experts kept, the layers chosen by their measured quantization error. Everything else — the other 15 expert layers, attention, indexer, shared experts, router, head, vision tower, draft plan — is his files, unchanged. The K in the name is MixedK’s.

How much of the original model each single-Spark pack keeps: the geometric mean, over 64,859 frozen tokens (wikitext · gsm8k · code), of the probability the pack gives the true next token divided by the probability the original-precision release gives it (FP8 attention + MXFP4 experts, served on two Sparks). 100 % is the original.

% of the original’s token probability kept prose math code all
Kalibrated Vision Exp 87 % 99.8 % 92 % 90 %
MixedK (vcruz305) 76 % 94 % 85 % 81 %
216-expert 3-bit REAP build of the same model 57 % 98 % 94 % 70 %

Paired on the same tokens, Kalibrated − MixedK is −0.133 ± 0.005 nats on prose, −0.062 ± 0.008 on math, −0.081 ± 0.005 on code. MMLU-Pro (251 items, two option orders): 63.2 % vs 64.3 %, a tie within the harness noise of ±1 item. Decode is ~8 % slower per step than MixedK (the promoted layers read 1.5× the bytes), 37.6 vs 37.5 tok/s on code thanks to a slightly higher acceptance.

A caveat on comparisons. The 0731 text packs (0xSero / MiaAI-Lab) are a different base model (DeepSeek-V4-Flash-0731, text only). The repo compares them only with that caveat, and never as a quantization comparison.

Why it works

Measured on this model with byte-identical weights: pruning 40 of the 256 experts (the REAP keep list) costs 76 → 52 % on prose, and 3-bit on the remaining 216 gives back only 52 → 57 %. Keeping the experts and spending the bits on the sensitive layers gives 87 %. The memory for those bits comes from the runtime: with the non-expert tensors in FP8 and CUDA graphs, about 16 GiB more are free than on the PyPI vLLM + plugin stack, spent here on expert bits rather than on a bigger KV pool (269k tokens instead of 986k; one full-length request still fits). A 256-expert pack at 3-bit on all 43 layers (~111 GiB of experts) would not leave room for a KV cache.

The layer choice was checked by measurement: swapping the four lowest-ranked promoted layers for four spare converted ones changes nothing (−0.001 nats, noise), swapping four mid-ranked ones costs +0.011, swapping the top four costs +0.017. The ranking holds.

Things to know

  • One request at a time (the DSpark draft runs with MAX_NUM_SEQS=1); concurrent clients queue.
  • Never set the GPU memory utilization above 0.93 on 128 GB: the driver starves before the kernel and the box can hard-lock. start.sh runs a small MemAvailable watchdog that stops the container first. Page cache counts on unified memory: DROP_CACHES=1 before a boot if the previous model is still cached.
  • The stack occasionally emits the token )Skip at clause ends. It is a decode-path logits fault (prefill scores the token p 0.007, decode p 0.15 on the same prefix), not sampling; start.sh puts a proxy in front of the engine that adds "bad_words": [")Skip", ",Skip", ".Skip"] to every request. The root cause is still open and documented in the repo.
  • Every number has a receipt in receipts/, and the studies behind the pack are in docs/KALIBRATED.md: the original-precision reference, experts-versus-bits with identical weights, the 216-expert engine path verified bit-exact against a float reference, the layer choice, a draft-depth sweep (deeper drafts are slower here), and a retraction of an earlier “pruning is free” result.

Links

Credits

vcruz305 first: this is his MixedK pack with 22 layers added, and if he wants them folded into MixedK they are his to take, same format, same layout, same license. His recipe found the same load_weights bug on the same day, which is the best kind of confirmation. DeepSeek for the model; drowzeys for the abliteration; 0xSero for the sparkinfer image and the tp1 layout; MiaAI-Lab for the single-Spark recipe this one mirrors, install included; turboderp for EXL3 and a converter that takes a per-tensor recipe and resumes from a checkpoint.

How did you make the benchmark results?

It’s interesting that my current model (Mia AI lab OxSnow - 216-expert 3-bit REAP) is soooo good at coding!

0xSnow also has the “)Skip” problem, and sometimes emits other random words

Good question — everything is scripted and every number has a JSON receipt in the repo (receipts/; method in docs/BENCHMARK.md and docs/KALIBRATED.md).

“How much of the original model each pack keeps” is a paired per-token log-likelihood test. A frozen corpus of 64,859 tokens (wikitext prose 38,397 · gsm8k math 9,031 · code 17,431, in 23 chunks) is sent to each engine as /v1/completions with max_tokens: 1 and prompt_logprobs: 0, so the engine returns the log-probability of every prompt token under the model — the prefill path, no sampling involved. Same tokenizer, same token ids for every pack, so the comparison is paired token by token, with standard errors over tokens and over chunks. The reference is the original-precision release of the same model (FP8 attention + MXFP4 experts) served on two Sparks; “% kept” is exp(−Δ mean NLL), i.e. the geometric mean of p_pack / p_original — 100 % would be the original itself. Scripts: scripts/nll_corpus.py builds the corpus, scripts/nll_probe.py scores an engine, and --compare A.json B.json prints the paired delta with its error.

Accuracy gates: MMLU-Pro on a fixed sample of 251 items (10 options), scored by which option letter gets the highest logprob, run twice with the options in the original order and rotated by 3 to control position bias (scripts/bench/); MATH-500 level-5 subset, 60 items, \boxed{} exact match, greedy; needle retrieval at 3 depths × 4k / 32k / 131k; perplexity on 8 fixed passages. Run-to-run noise of the harness, measured by repeating on a second boot: ±1 item.

Speed: scripts/dsbench.py reads vLLM’s speculative-decoding counters (accepted / drafted tokens, verify steps), so acceptance and raw step rate are reported separately instead of folded into tok/s; medians of 3, single stream, token counts from usage.completion_tokens.

One caveat I keep repeating: your pack (MiaAI-Lab / 0xSero) is DeepSeek-V4-Flash-0731, the text release; mine is Vision-Exp. They are different base models, so the tables never compare them as two quantizations of one checkpoint. To separate experts from bits on a single model I built a 216-expert 3-bit REAP pack of Vision-Exp with the same keep list.

And yes, your experience is exactly what the numbers say. On code the 216-expert 3-bit packs are the best of the bunch: 94 % of the original kept, both the 0731 one you run (+0.063 nats, cross-model) and my same-model REAP build (+0.067), against 92 % for Kalibrated and 85 % for MixedK. Math is a wash (98–99.8 %). Where pruning bites is prose: 57 % for the REAP build vs 87 % for Kalibrated, because REAP’s calibration set was agentic/tool traffic — it keeps precisely the experts code needs and drops the ones rare words and names need — and 3-bit everywhere helps code more than prose. So for a coding-only box the REAP 3-bit recipe is a perfectly good choice, and it is faster on structured output (42–46 tok/s vs ~37 here). Kalibrated’s case is prose and mixed use, at the cost of a smaller KV pool.

What these numbers do not tell you, to be fair to them:

  • The likelihood test is teacher-forced (prefill), so it measures how closely a pack tracks the original’s next-token probabilities on fixed text, not generation quality end to end. It is the right tool for ranking quantizations of one model; it is not a leaderboard score.
  • MMLU-Pro on 251 items has a sampling error of about ±3 points, and the letter-logprob scoring is not the standard chain-of-thought protocol: differences of a few points between packs are ties, and the absolute numbers are not comparable with published leaderboards. MATH-500 on 60 items is a gate, not a ranking.
  • All engines were measured on the sparkinfer serving path; the same weights on another stack should land very close, not bit-identical.
  • The corpus is English prose, grade-school math and code. Other languages and long-context behaviour are not covered by the retention numbers.

About the ““)Skip” problem” im trying to work on it.
I’ll be opening a PR on VCruz repo later to merge the changing, maybe withmore people we can fix it more easily!

I am trying it out today. I had many OOMs, and had to reduce the CTX significantly.
I now start it with: PORT=8000 RAMWATCH_FLOOR_MB=1100 CTX=158464 UTIL=0.919 ./start.sh

Strange, but yes the room is tight, as for the other Deepseek model if you want the big Context.
Tell me if you like it!

It did really well on my task for today, certainly better than 0xSnow, but that was expected, as it required general knowledge, searching the web, planning and writing a mail

Tomorrow I’ll start using it for coding 🤞

For the longest time, these forums were a lively discussion. People use their agents and paste in results, but I rarely ever saw full AI replies and posts. People would post tool eval benchmarks, they noted prefill numbers, concurrency.

Now, this looks like reddit.

Tbf im not good at post or forums, but im trying, im so envy of how everyone is able to talk about anything.

It was my first real model receipt and i wanted ti contribute in a way, and even a single commet that says “looks good!” Is fricking Golden to me.
My hand written post looked very bad tbh, the one my agent did on our test and numbers looks much better

For prefill and concurrency, since its the same engine, i didnt post them, but they are in the repo.

I didnt though i would get ppl mad because i used a model in a forum about models, my bad.

Sorry you didnt like the post

I for one am happy that @GaelicThndr has used his/her valuable time to make an interesting alternative.

I found the benchmark that @GaelicThndr presented very relevant for my use, and I can confirm that this model definitely has better general knowledge than the 0xSnow one.

Today I had it rewrite several Jira tickets, analyse the impact of a merge request on my planned change, update and streamline the plan for my change- all task that were made to a very high standard. The only disappointment I had was when I had to restart twice due to OOM.

If you can live with this problem and the limited context, it is possibly the best model for a single spark, today.

I encourage everyone to try this model out!

Hopefully somebody will soon make a similar DeepSeek 4.1 version!

After learning the DeepSeek trick (temperature 0.3 and top_k=0.95), both models have zero problems with tool calling in OpenCode for my use cases.

I only have one DGX Spark and also very limited time, and do not generally believe that a tool-calling benchmark is the best criteria for deciding which model a use.

Of course I do appreciate when someone really invests a lot of time into producing useful comparison test results, such as this very interesting post: Up to 70tok/s Qwen3.8-Flash-Next-Int4-AutoRound - #49 by L00kUp

Thanks @GaelicThndr for making this model

@erlendboe im so happy reading this, it really made my day. Thanks a lot, really.

Those kind of things are similar to what i use it for, so hearing it holds up on real work for others people too means more to me than all the tables.

Im playing with the sampling too, 0.3 and lower, mostly on tool calls and long agent sessions. One thing i can say already: temp does nothing for )Skip, its a logits fault on the decode path, not sampling, so the proxy mask stays for now, sadly.

The OOM is what bugs me most too. What helped here: DROP_CACHES=1 before boot if another model was loaded before, page cache counts on unified memory. And anything else alive on the box (opencode itself, a browser…) eats from the same 128GB. If you dont care about the prose gain, PACK=mixedk is lighter (needs the ~30min convert), so more room for KV. Im looking at where the memory goes at boot, if i find something it goes in the repo.

I never get OOM if i start with 4GB max of used memory, but, as MiaAI-lab recipe, i deactivated graphic env and a lot of other stuff, so the Spark is JUST for this model.

Now, im gonna get a second Spark, so i’ll probably move onto GLM 5.3 Flash, sorry if i dont do the 4.1 version!

It was a cool and fun project to do to be honest, and hearing at least 1 person found it useful, really make me happy!

Whatever findings u have, feel free to add it on the git or just write me!

Thanks again!

Well count me in as a 2nd person! been using 0731 but I really, really miss vision for my use cases. This is perfect.

Your recipe worked as is, perfect installation (as done by an agent but sure).

Sure, speed is slower but the model does less bad thinking loops than my previous 0731 install so in the end it seems to win!

Granted I didn’t really test for long but I think I will main this for a while :) Thanks a lot for your work.

Thanks! Im really happy about it, please let me know how it goes after a while, im really interested about hearing about it!

Hello!

It’s been a solid checkpoint & serving but I ended up moving to Qwen 3.8 Flash next. I benched using TerminalBench 2 and some custom made benchmarks to evaluate vision and it came on top, while using less vram so I went there

It’s probably the quants required to fit this model on a 1 spark setup. Should have bought two :p Your stuff has been the best DS4 vision I used until now!

@aranom thanks for coming back to report, reading this really made my day. Im happy and grateful that at least someone ended up liking this model as much as i did :)
And funny u say “should have bought two”, because i actually did buy a second Spark in the end lol, and moved onto GLM 5.3Flash. no regrets so far!
About the quants, fair point. but if u ever want to give DS4 vision another shot on 1 spark: exl3 is the best i saw so far. the best repos imo are from vcruz305 and MiaAI-Lab:
vcruz one spark recipe (my Kalibrated pack was built on his MixedK): GitHub - vcruz305/DeepSeek-V4-Flash-Vision-EXL3-MixedK-DGX-Spark-recipe: Serve DeepSeek-V4-Flash-Vision EXL3 MixedK (full 256 experts) on one NVIDIA DGX Spark with vLLM — recipe, loader patches, and receipts · GitHub

MIA recipe: GitHub - MiaAI-Lab/DeepSeek-v4-Flash-DSpark-2x-DGX-Spark: DeepSeek-v4-Flash 0731 recipe for 2x DGX Sparks · GitHub
Whatever u end up running, thanks again really, it means a lot!

Thanks for the suggestions! Is 2 DGX GLM 5.3 Flash close to official api quality ?

Regardless, I wanted to add something I forgot: your recipe came super close to Qwen 3.8 in evals, it’s only the vision that was a bit better on the Qwen side.

Also I only evaluated on tasks that matter to me. On general knowledge (lets say doing your taxes) DS is actually better than Qwen (you can really taste the additional parameters it has).

Anyway, glad you’re happy because before your recipe I was this close to giving up on it!

The recipe im using is really great tbh, its really a 4bit one and you can feel it. I only saw the benchmarks vs the API, but it really does even the heaviest of jobs. You can feel the leap in intelligence, ngl. I found it to lack a little in graphics, but that could be a harness problem. Webpages and other stuff are kinda plain.

Also, yes, Qwen is top tier on the vision, i saw that aswell!

I really put a lot of effort in it cause i saw no one giving too much love to DS on a single Spark while i though it’s a really good model, and i really like the way of thinking and talking, and he does a great job even when agressivly reap’d! Working on making recipe is cool and all, i can’t lie, but require’s really a lot of works and testing, i found myself blocked most of the time cause of testing! So in the end i gave up and went for the second Spark where GLMFlash really run super well and stable, and the community is working daily on pushing it.

But really, thanks again for the kind words < 3

@GaelicThndr I have integrated display-kv, and also made a drafter that uses 96 instead of 64 experts.
With display-kv, I can now use the k96 drafter and a 350K context!

Do you know if there are any similar solutions now for the new DeepSeek V4.1 1017 ?

@erlendboe nice, 350K with the k96 drafter on one Spark is great!

For 1017, yes. On one Spark there’s vcruz305’s recipe:
GitHub - vcruz305/DSV4.1-Flash-1017-EXL3-Spark-recipe: DSV4.1-Flash-1017 SAGE EXL3 (1.62 bpw) on one DGX Spark with vLLM: DSpark MTP, cold-expert ATS alias, tile-K 16 MoE, memory guard, measured 31-34 tok/s · GitHub with his SAGE 1.62 bpw pack (KL about 0.098 vs the official FP8/FP4).

It runs on Christopher Owen’s spark-ds41f vLLM with DSpark k=5, 512K context, around 31-34 tok/s. The pack doesn’t fully fit, so the least used experts are read from a file on the NVMe, and there’s only about 3 GiB spare at 512K, so your display-kv would probably help there too. He also just pushed a smaller 1.55 bpw pack.

On two Sparks it’s what im running now (yes, im back on DeepSeek): 1017 on bertholomus TensorFold Zig engine with Mia’s patches and a 2.9 bpw EXL3 pack, around 60 tok/s on prose.
There 1M context fits without display-kv, and the drafter is the model’s own MTP with all the experts, so no trimming needed.

This has been working great for me for doing c# coding. I am shocked how well it does on my problems. vs 38-flash-next. I haven’t recorded tps or anything but it even feels faster the thinking doesn’t go off the rails like I found qwen likes to. Thank you!