New Deepseek 4.1 flash recipe

spark-ds41f-1030 is out, qualified and in production on both topologies: four Sparks (TP4 ring) and three Sparks (TP3 triangle), both at 1M context. As before, the release name is the project and the release date. The model is DeepSeek-V4.1-Flash-1017 at native weights.

Repository: GitHub - christopherowen/spark-ds41f: Reproducible Docker/vLLM deployment, tuning, and benchmarks for DeepSeek V4.1 Flash on a switchless three-node or four-node DGX Spark fabric. Β· GitHub
Release notes: spark-ds41f/experiments/2026-10-26-spark-ds41f-candidate/release-notes.md at main Β· christopherowen/spark-ds41f Β· GitHub

The highlights

  • Stock and abliterated from one deployment, at the same time. The same native weights are served under two names: deepseek-v4.1-flash (stock) and deepseek-v4.1-flash-weightless (GLP-steered). The client picks per request. Stock outputs are bit-identical with steered requests in the same batch.
  • Multi-session tuning. A short request no longer waits behind another session’s long prompt. Beside a 131K prefill, its first token now arrives in 3.3–3.6 s instead of 12.4–12.8 s on four Sparks.
  • Faster. On four Sparks, decode is 1.9–3.6% faster at every concurrency (78.3 tok/s at one stream) and prefill is 8–12% faster from 32K to 1M. On three Sparks, decode is 2.3–3.8% faster and prefill 4–7% faster.
  • More memory headroom. The head node’s lowest free memory during a three-node start went from 6.2 to 7.3 GiB.
  • Correctness and crash fixes, including an engine stop under mixed agent and chat traffic (#677).
  • Debugging support: in-kernel phase timing, KV poisoning and a weight digest. All are off by default.
  • Same answers. At temperature 0, greedy outputs are 256/256 identical to 1025 on both topologies; teacher-forced KL is 4.2e-8 nats.

Stock and abliterated, side by side

1025 could serve the GLP-steered model, but only as the whole deployment. 1030 serves both under two names from one set of native weights. Steering is applied per request: at each configured layer, the engine projects the steering direction out of the residual stream for requests that ask for the weightless name. The checkpoint is never modified or re-quantized. Requests for the stock name in the same batch, and through the same prefix cache, keep their own text, bit for bit.

The vector is msuiche’s published GLP vector for 1017 (weightless, https://weightle.ss). On AdvBench’s 520 prompts, the stock name answered without a refusal phrase 2.5% of the time and the steered name 51.2%. Beam search on the steered name returns HTTP 400. The steering launch joins the decode chain’s programmatic dependent launch (PDL), so serving both names costs no measurable decode speed.

Multi-session performance

Several long agent sessions plus interactive chats was the case this release targeted. Until now, a long prompt arriving mid-session held every chunked step until it finished prefilling, so a short question asked beside it waited 12+ seconds for its first token.

Prefill yield (--prefill-yield short, 10 s limit) lets a waiting prompt that fits in one chunk, and any held first token, take the next step ahead of the long prefill:

  • On four Sparks beside a 131K prefill, a short request’s median first token drops from 12.4–12.8 s to 3.3–3.6 s.
  • On three Sparks, beside 3 decoding streams it drops from 16.6 s to 2.0 s, and beside 6 from 18.3 s to 9.6 s. Decode steps during the long prefill are 35–44% shorter.
  • The long prompt pays only while short requests keep arriving. On three Sparks that is 3.7–4.6% of its prefill rate, against 1025, which ran a larger 8,192-token chunk on the triangle. With no short requests waiting, the same prefill is 3% faster than 1025.

The work started from a scheduler inventory and a calibrated simulator of where concurrent sessions stall (#620). Thanks to @stu.miller for pushing on the β€œseveral long sessions, then one prefill kicks off” case.

Performance

Speed was measured in one session per topology (1030, 1025, 1030 again), with verdicts judged against the repeat.

Four Sparks (TP4 ring, 1M context, 16 sequences):

1025 1030 change verdict
1 stream, decode tok/s 75.4 78.3 +3.6% better
1 stream, TTFT 0.128 s 0.122 s βˆ’4.5% better
8 streams, output tok/s 194.6 198.4 +2.0% better
16 streams, output tok/s 251.7 257.7 +2.4% better
prefill 32K / 131K / 1M, tok/s 6,744 / 6,798 / 4,948 7,313 / 7,396 / 5,549 +8.4% / +8.8% / +12.2% better
131K prefill beside 15 decoding streams 6,447 6,978 +8.2% better

Three Sparks (TP3 triangle, 1M context, 8 sequences):

1025 1030 change verdict
1 stream, decode tok/s 61.2 63.5 +3.8% better
1 stream, TTFT 0.159 s 0.153 s βˆ’4.1% better
8 streams, output tok/s 154.7 158.6 +2.5% better
prefill 32K / 131K / 262K / 500K +4.4% / +4.1% / +5.3% / +7.0% better

Sampled decode (temperature > 0) is 1.9–2.9% faster at 1, 8 and 16 streams. Most of the gain comes from five changes:

  • PDL along the decode chain;
  • the attention front in a single launch;
  • 2-bit scale codes for experts with narrow block scales;
  • 64-row MoE tiles in prefill;
  • the sequence-parallel MoE exchange hidden under the combine.

Every serving kernel is still TileLang. B12X no longer loads at all, and weights load directly with --load-format direct.

Memory

  • vLLM no longer zeroes KV blocks as it allocates them. Each cache reads only slots that have been written, and the indexer reads no key past the visible positions.
  • Two budget-sized buffers that nothing read are gone, and the drafter’s workspace lane shrank from 837 MiB to 13 MiB.
  • 2-bit expert scale codes live inside the 4-bit codes’ buffer, so model loading stays at 71.67 GiB a rank on four Sparks.
  • On three Sparks, where the margin is thinnest, the head node’s lowest free memory during startup rose from 6.2 GiB to 7.3–8.0 GiB. The startup (5 GiB) and running (3 GiB) memory guards are unchanged.

A note on the startup KV line: it now reads 11.02 full 1M contexts on four Sparks, where 1025 read 6.21. This is a counting fix (#586), not new memory. vLLM had been charging every request a prompt’s in-flight chunks, and the pool is the same size.

Correctness and crash fixes

  • Engine stop under mixed agent and chat traffic (#677, reported by @tsw2k). A prompt with one token left, padded with placeholder drafts, reached the Engram host hash, whose check raised and stopped EngineCore. The GPU now hashes those rows. A reproduction of the reported load (4 agents up to 311K tokens, 8 chats resending each question, 300 s) ran clean on two boots: 0 failures out of 150 requests each. 1025 has the same code path.
  • The grouped MoE GEMM’s pipeline stages now wait for every thread’s copies. Before, expanding the coded scales could read rows that had not landed yet.
  • Barron et al.'s softmax fix in the logprob and verification kernels. Text is unchanged; log probabilities move by up to a few 1e-6.
  • DeepSeek API semantics: effort aliases, response_format, tool_choice: none and the assistant prefix now follow DeepSeek’s API.
  • One intended temperature-0 change. CED now replays a prompt’s last 128 rows wherever its chunks end. Text can differ from 1025’s for multi-chunk prompts whose final chunk has 1–128 rows: 0.79% of multi-chunk prompts on four Sparks. Every other prompt is unchanged.

Debugging support

These are off by default; unset, none of them loads anything:

  • VLLM_DS41_IKET: in-kernel timing of each kernel’s load, wait, compute and store phases, for finding where a step’s time goes.
  • VLLM_KV_CACHE_POISON: fills new KV blocks with NaN, so a read of an unwritten slot shows up instead of silently reading zeros.
  • SPARK_DS41F_WEIGHT_DIGEST: a digest of the loaded weights, to confirm every node serves the same bytes.

Switched fabrics (contributed)

Thanks to @rob01 for the nccl-switched and oneshot-switched transports, with their doctor checks (#662). Thanks to @tsw2k for marking NCCL and sparknet packets for the switch’s lossless traffic class (#669). rob01 has run them for 14+ hours behind a switch. My own qualification covers only the switchless ring and triangle.

Reproducibility and rollback

Each release’s recipe and upstream lock are now frozen in the repository: releases/spark-ds41f-1030/ and, for rollback, releases/spark-ds41f-1025/. Tests check that production matches the newest release. Host requirements are unchanged from 1025: memory-saver DKMS 0.4.1, the 64 KiB kernel for the 1M profiles, driver 580.178.04.

Upgrading from 1025

  1. Pull main (9461a705 or later).

  2. New: put the GLP vector file on every node. The recipe serves the second name, and cluster start refuses without the file. The repository is gated, so accept its agreement once on Hugging Face, then on each node:

    hf download msuiche/DeepSeek-V4.1-Flash-1017-abliterated-cyber-GLP-39-L1-39-a0.75
    glp.deepseek-v41-flash-1017-GLP-39-L1-39-a0.75.gguf
    –revision 2715ffd51f59899115853e1118db080536966c44

  3. Build on one idle node and copy the image to the others (docs/setup.md, section 6):

    bin/spark build prepare
    bin/spark --cluster-config config/cluster.json build image --apply

  4. Sync, start and check:

    bin/spark --cluster-config config/cluster.json cluster sync --apply
    bin/spark --cluster-config config/cluster.json cluster start --apply
    bin/spark --cluster-config config/cluster.json doctor --live

Known limitations

  • On three Sparks, a 131K prefill beside 3–6 decoding streams with short requests waiting is 3.7–4.6% slower than 1025. This is the yield trade-off above, accepted for the short requests’ first token arriving 2–8Γ— sooner.
  • Seeded sampling at 8 streams depends on the batch under adaptive verification, as in 1025. Temperature 0 does not.
  • Copy drafts beside DSpark are not in this release; enabled, they still fail to start (#619).

Special thanks: Jordi (@JordiPosthumus on GitHub)

Much of this release’s three-Spark work comes from Jordi, who runs two TP3 triangles at 1M and has independently qualified every candidate on them:

  • The triangle’s 6,144-token prefill budget. Jordi measured that 6,144 beats 8,192 on a triangle: shorter decode stalls beside a long prompt for about 2% of prefill (#503). That is the budget 1030 ships and qualified.
  • Prefill yield on three Sparks. He measured the stall on his triangle, checked my scheduler simulator against hardware, and reproduced a starvation case at 8 slots (#620). He then showed that yield costs nothing in decode at any depth on TP3 (#668).
  • Memory. He confirmed the buffer and workspace savings independently on a triangle: the head node’s lowest free memory during a 983K-token prefill went from 3.74 to 5.24 GiB (#642).
  • Candidates qualified before mine. He wrote and qualified candidate 10’s TP3 arm (#653) and qualified candidate 12 on both of his triangles while mine was still cabled as a ring. He also caught a defect in candidate 12’s TP3 arm (the four-image cap had come back) and checked that a site can drop the steered name cleanly (#668).
  • Earlier releases: the max_num_seqs boot failure (#434), memory growth at 1M (#439), the missing prompt-token details (#455), containerd image IDs (#488) and the sink-metric scopes (#489).

Jordi’s work is careful and well-measured, and it has made the triangle a first-class target. Thank you.

Thanks also to msuiche, rob01, tsw2k and stu.miller, and to everyone posting results and logs in this thread. Reports like #677 are how the crash fixes happen.

@christopher_owen this is fantastic! Thanks for the great work, I can’t wait to test it this weekend. Can you explain the abliterated capabilities a bit more? Is that on by default in this update, or is that something that needs to be configured?

I have been running the previous version + switched mods for 50+ hours now with no issues.

@rob01 both names are served at once. You pick per request; nothing extra to turn on once the vector file is on every node (cluster start refuses without it).

  • deepseek-v4.1-flash - stock, same as 1025. Native weights, bit-identical even when a steered request is in the same batch.
  • deepseek-v4.1-flash-weightless - the previous opt-in GLP config, now a second selector. Same checkpoint. At each configured layer the engine projects msuiche’s published direction out of the residual stream for that request only. The weights are never modified or re-quantized.

AdvBench asks the model to do 520 things it is supposed to refuse. Stock almost always says no (13 answers out of 520). The weightless name says yes about half the time (266 of 520). So it is not a fully uncensored model - it is the same 1017, steered. These are cyber refusals cut out, not morality.

An industrious contributor could, of course, create a file for different purposes than Cyber refusals - not limited to personality changes (as is the vogue right now).

Beam search is a rarer API mode. Instead of one draft reply, the server keeps several in parallel and at the end returns the one it scored highest. You only get it if the client sets use_beam_search. Beam search on the weightless name returns 400.

Serving both costs no measurable decode speed. If you do not want the steered name at all, unset the glp block; Jordi checked that path, and a request for the weightless name then 404s with no file or mount needed.

Glad the switched box has been up 50+ hours. 1030’s own qualification is still switchless; your #662 transports are in the recipe with some modifications.

Good work, @christopher_owen - this is looking like something I might have to try as a replacement to my current stack when I can afford to take it down for long enough to try it.

@rob01 - Cyber abliteration is most likely enough for red team work. If more is wanted, It seems like msuiche offers other vectors which are much stronger and would be drop-in replacements. I shouldn’t think it’d be too difficult to make the heretic pqhaz convert to a GLP if it’s wanted, too.

Would be happy to have you give it a whirl!

Feel free to come up with more cool ideas, too ;).

You’re like my adversarial agent.

Haha. I’ll take that :)

This is all training @christopher_owen for DS 4.2 which I am sure will be coming out soon. Qwen has a 4.0 announcement next week and that’ll get everyone else moving forward with their next releases. Hopefully some of these learnings through this DS4.1 optimization will help us implement the upcoming model releases faster.

@rob01 you see my aim without me saying it!

@christopher_owen thanks for all the recent updates. I installed 1030 last night and it’s another step forward! Both switched and switchless are now in the code. I ran 5 tool eval benches, they were all consistently faster in completion time by almost 2 mins from previous builds with improved responsiveness. The addition of the abilteration is a really cool touch. I wasn’t sure I needed it but the more I read about it the cooler it seems. Thank you!

@rob01 glad it came up clean.

The tool-eval times are the useful number. Five benches, each about two minutes faster, plus the chats feeling quicker, is the case 1030 was aimed at: a short turn next to longer work. Single-stream tok/s does not show that. If you still have the before/after times I want them.

Switched and switchless both being in the tree is your #662. If doctor --live was clean on the switch, say so and I will put it in the notes - I have still only qualified the cables because I haven’t had access to a switched setup yet.

Using the weightless model is optional. Stock is the same 1017 as 1025. I think the GLP thing could be really fun to play around with though!

@christopher_owen from my agent: The switched setup is running, but I can’t report a clean doctor --live: it exits 1. It reports missing fan-control DKMS on all four nodes and unreadable DRM modeset/fbdev values. There’s also a memory-service naming mismatchβ€”the doctor checks spark-ds41f-kernel-memory.service, while this site uses spark3-kernel-memory.service; that service and 64 KiB swap were independently verified active.

What passed on the switched setup: the launcher’s remote-runtime preflight, coordinated four-rank startup of spark-ds41f:1030, API health/model identity, a real completion, and active steady memory guards on every rank. The rendered transport is oneshot-switched, SparkNet topology is direct, and each rank has the expected two-HCA selection.

Please record this as successful site-level switched bring-up/basic serving, with live-doctor findings outstanding, not a clean-doctor result or full switched qualification.

There will be patches for those errors for the next release!

readings from the n-gram tables

Nodo          β”‚            SSD             β”‚    Tipo     β”‚   Latencia por    β”‚
  β”‚                        β”‚                            β”‚             β”‚      lectura      β”‚
  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
  β”‚ .121, .195 (Dell)      β”‚ Micron 2500 2 TB           β”‚ QLC, sin    β”‚ 0,44-0,46 ms      β”‚
  β”‚                        β”‚                            β”‚ DRAM        β”‚                   β”‚
  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
  β”‚ .150 (ASUS), .105      β”‚ Phison E27T 1 TB           β”‚ TLC, sin    β”‚ 0,26-0,27 ms      β”‚
  β”‚ (Lenovo)               β”‚ (ESL01TBTLCZ)              β”‚ DRAM        β”‚                   β”‚
  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
  β”‚ .215 (Lenovo)          β”‚ Phison E27T 4 TB           β”‚ TLC, sin    β”‚ 0,25 ms           β”‚
  β”‚                        β”‚                            β”‚ DRAM        β”‚                   β”‚
  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
  β”‚ .207 (MSI)             β”‚ Samsung 4 TB, PCIe Gen5    β”‚ con DRAM    β”‚ 0,27 ms

@vedcsolution thanks, this is useful. If I read it right, the two Dells’ Micron 2500 (QLC, no DRAM cache) take about 0.45 ms per read, and every other drive about 0.26 ms.

I don’t expect that gap to cost much in decode, but it’s the first place I’d look, and you can check it directly.

Why the time per read matters less than it looks. Decode doesn’t wait on one read at a time. A step’s Engram rows (a few hundred per rank at eight streams) go to the drive together, and in my profiles the row IDs are ready about 3 ms before the GPU needs the first table. With the drives kept awake, a table’s reads take about 1 ms (1.5 ms at p90), and the GPU waited 0.6 ms in total over a 62 s eight-stream run (r6p). A drive 1.7Γ— slower should still mostly fit inside those 3 ms.

What does count. Every step waits for the slowest rank, so one slow drive in the TP group sets the pace for all of them. And prefill of new text reads tens of thousands of rows per chunk. That depends on the drive’s random-read throughput more than on how fast it answers a single read, and that is usually where a DRAM-less QLC drive is weakest.

With six nodes, I’d:

  1. Leave the two Dells out of the TP4 group, if you have the choice. It costs nothing and removes the question.
  2. Run doctor --live on every node and fix any NVMe power-state (APST) warning. A drive that sleeps between reads costs far more than 0.2 ms: it takes 11 ms to wake, which was worth 3% at eight streams on my triangle (setup).
  3. If you want the real number, run the same workload with a Dell swapped for the MSI and compare decode and new-text prefill. Or set SPARK_DS41F_ENGRAM_TIMELINE=1 in your profile’s environment. Each node then writes, per step, how long its reads took and how long the GPU waited for them, under /cache/spark-ds41f/engram-timeline. The GPU’s wait is the number that matters. It’s a debug option, so turn it off afterwards.

How did you measure? Tool, block size, queue depth, and direct I/O or through the page cache? My drives read a single 4 KiB block in about 55 Β΅s with interrupt coalescing off and 200–240 Β΅s with it on, and NVIDIA’s coalescing service doesn’t touch Phison drives, so I’d like to know the method before comparing absolute numbers. The gap between your own drives is the useful part.

On my side, two open items would make the drive matter less: storing each Engram row with its scales, so a lookup is one 4 KiB read instead of two, and a small cache for the rows decode keeps hitting. Your table is a good argument for doing the first one.

For comparison, my Founders Editions (all four have the same drive and firmware). Measured on three of them with 4 KiB O_DIRECT random reads at queue depth 1 for 5 s, against the model’s largest safetensors file:

Nodes SSD Type Read latency, p50 (p99)
dgx1–dgx4 (Founders Edition) Samsung MZALC4T0HBL1 4 TB, PCIe Gen5 x4 with DRAM 54–56 Β΅s (71–159 Β΅s), coalescing off
same drives 199–242 Β΅s (391–691 Β΅s), coalescing on (NVIDIA’s default)

A burst of 32 concurrent reads takes 1.2–1.3 ms with coalescing off and 1.3–1.4 ms with it on. That’s why turning coalescing off made no measurable difference to serving, even though a single read is four times faster ([experiment](spark-ds41f/experiments/2026-10-02-nvme-coalescing/README.md at main Β· christopherowen/spark-ds41f Β· GitHub)).

Your MSI’s Samsung may be the same drive.

Thanks a lot, Chris. Your coalescing experiment and the doctor checks saved us a lot of guessing, and we really appreciate you taking the time to look at our numbers.

Yes, same drive: our MSI has the Samsung MZALC4T0HBL1-00B07. I ran your latency.py on all six nodes (4 KiB O_DIRECT, QD1 for 5 s, then 400 bursts of 32, against model-00048). One difference from your setup: TP6 was serving while I measured, so the engine’s own Engram reads were competing with the probe. Coalescing off and APST off on all six:

Drive QD1 p50 p90 p99 Burst of 32, p50
Samsung MZALC4T0HBL1 (MSI) 54 Β΅s 69 Β΅s 172 Β΅s 1.32 ms
Phison E27T TLC (ASUS, Lenovo Γ—2) 85-86 Β΅s 99-101 Β΅s 483-727 Β΅s 1.33-1.41 ms
Micron 2500 QLC (Dell Γ—2) 139-140 Β΅s 508-517 Β΅s 891-946 Β΅s 1.39-1.42 ms

The Samsung matches your Founders Edition numbers exactly. The Micron’s tail is the real gap (p90 about 5Γ— the Phison), and as you predicted, it mostly disappears in bursts of 32.

Your doctor’s APST warning was the one that paid off. In serving (iostat, 60 s windows) the Samsung went from 0.42-0.73 ms to 0.17-0.24 ms once we disabled APST. It was the only drive that took 11 ms to wake from PS3, and turning coalescing off on its own hadn’t moved it. We disabled APST entirely instead of lengthening the timeouts, masked the coalescing service, and versioned both as a host script. The two Dells get Phison E27T drives at the next window.

Thanks again for spark-ds41f, the doctor and the latency script. Running your TP6 work on our cluster has been great, and this kind of help makes a real difference.