DeepSeek-V4.1-Flash-1017 on 4× DGX Spark (China OEM) with no switch: 90 tok/s single-stream, 296 tok/s at 8 streams, 1M-token prefill in under 6 minutes
TL;DR — Four Super Fusion FusionXpark GB10 boxes (the China-market DGX Spark OEM, DGX OS) cabled into a closed ring with four QSFP56 DACs, no switch. Running DeepSeek-V4.1-Flash-1017 (the official checkpoint, no extra quantization) on SGLang TP4 with the MiaAI-Lab stack. Code decode 90 tok/s single stream, 296 tok/s aggregate at 8 concurrent; cold prefill 3.3–3.5k tok/s up to 256K and 2.9k tok/s at 1M; 1M needle passes; qeval 72/75. Tuning progression, numbers from other public 4-node posts, and the gotchas below.
Why a ring
NVIDIA’s documented topologies are two Sparks back-to-back, three in a triangle, and four or more through a switch. A 200G/400G switch that fits four Sparks (MikroTik CRS812/CRS804 class) costs about as much as a fifth Spark here and was hard to find in stock. Each Spark has two CX-7 ports, so four nodes form a ring with each node directly connected to two neighbours. With the patched NCCL from the MiaAI repo, collectives run over the ring; TP4 inference does one small all-reduce per layer, so it is latency-bound rather than bandwidth-bound, and the extra hop costs very little. The repo author’s own same-hardware comparison put ring vs switch within 2–5% on decode.
Hardware and fabric
| Item | Value |
|---|---|
| Nodes | 4 × FusionXpark GB10, 128 GB unified memory, 2 TB NVMe, DGX OS |
| Cost | about ¥142k for all four (~US$20k), plus four DAC cables |
| Fabric | ring of 4 × QSFP56 DAC; ib_write_bw 109 Gb/s per link; adjacent-pair NCCL busbw 22.4–22.5 GB/s |
| GPUDirect RDMA | off (the image’s libmlx5 lacks dmabuf registration; NCCL falls back — same in the repo author’s ring logs) |
| Kernels | 6.14 on three nodes, 7.0 on one; no measurable difference |
The OEM boxes behaved exactly like reference Sparks: on the default profile we measured C1/C2 within 3% of the repo author’s published ring numbers.
Software stack
- MiaAI-Lab
DeepSeek-v4.1-Flash-DGX-Sparks, TP4 profile,docs/switchless-ring.mdNCCL path, local weights on every node (NFS_SHARE=0). - Image built from
Dockerfile.canary-roce(SGLang dsv4.1 branch + b12x + the repo’s adapters). RoCEnante off (SGLANG_ROCE_ALLREDUCE=0) because the plain ring has no all-to-all RDMA path. - Weights:
deepseek-ai/DeepSeek-V4.1-Flash-1017(510,311,045,870 bytes).config.jsonandtokenizer.jsonare byte-identical to the 0910 release, so it is a drop-in: change the model directory, restart.
Tuning progression (same ring, same scripts)
| Step | What changed |
|---|---|
| A | Default profile, 0910 weights |
| B | canary-roce image + only the flags the author documents as bit-identical (PREFILL_SP with EXACT, HC_FUSED, prefill TP split) |
| C | Same as B, 1017 weights |
| D | Full production line minus RoCE: EP_SIZE=1 + b12x_next MoE (deterministic), WO_A_W8, draft-head FP8, draft temperature + block verification, verify cap + router remap, replicated split, Engram prefetch, folded fence, non-EXACT prefill SP + FP8 gathers, fast load |
Everything in step D is documented by the author as either bit-identical to the stock path, exact in distribution (speculative-decoding side: every token is still verified by the target model), or a kernel change with qeval unchanged. No weights were re-quantized.
Results
Code decode (decode_window.py, aggregate tok/s):
| Concurrency | A | B | C | D |
|---|---|---|---|---|
| 1 | 72 | 85 | 89 | 78 (steady window 90) |
| 2 | 110 | 126 | 127 | 145 |
| 4 | 141 | 174 | 176 | 189 |
| 8 | 176 | 269 | 257 | 296 |
Prose / mixed (openai_serving.py, aggregate tok/s): B 35 / 52 / 82 / 114 → D 40 / 61 / 90 / 141 at C1/C2/C4/C8.
Cold prefill (random text, max_tokens=1):
| Prompt | A | B | D |
|---|---|---|---|
| 32K | 3,015 | 3,145 | 3,390 |
| 128K | 2,277 | 3,070 | 3,500 |
| 256K | 1,756 | 2,663 | 3,495 |
| ~1M | 1,270 | 1,543 | 2,880 (347.6 s) |
Reading a 1M-token document went from 12.7 minutes to 5.8 minutes. Follow-up questions on the same document hit the prefix cache and return in seconds — the KV cache pool is configured for 8M tokens across the four nodes.
Quality (the repo’s qeval.py: 75 auto-scored tasks — code run against hidden asserts, JSON schema checks, numeric math, format constraints — no LLM judge, temperature 0):
| A | B | C | D | |
|---|---|---|---|---|
| Score | 70/75 | 71/75 | 71/75 | 72/75 |
| Tasks broken vs previous step | — | 0 | 0 | 0 |
| Median single-stream tok/s | 52.5 | 56.7 | 60.2 | 69.4 |
Needles pass at 32K (1 and 4 concurrent), 131K and ~957K tokens (needle at 70% depth). The full boot smoke test (structured output, tool round trip, native vision) passes on step D. Boot time dropped from ~25 minutes to ~3 minutes with fast load at EP1.
How this compares with other public 4-node numbers
| Setup | Model / engine | Single-stream | Concurrency peak | Prefill |
|---|---|---|---|---|
| This ring, step D | V4.1-Flash-1017 / SGLang | code 90, prose 40 | 296 @ C8 (code) | 3.5k @ 128K, 2.9k @ 1M |
| 4 Sparks + HPE 3700M switch | V4-Flash-0731 / vLLM | 56 (peak 63) | 126 @ C5 | 2.6–3.0k, 2.7k @ 100K |
| 4 Sparks, switched RoCE fabric | V4.1-Flash / vLLM | code 72 (peak 77), prose 23 | 214 @ C6 | — |
| MiaAI reference ring, default profile | V4.1-Flash 0910 / SGLang | 74 | 225 @ C8 | — |
Benchmarks, prompts and model versions differ, so read this as orders of magnitude. The point that survives the caveats: the switch was never the bottleneck — the inference engine and the tuning were.
Gotchas we hit
- Fast load at EP_SIZE=2 fills unified memory. With EP2 the fast loader pins a full half of the experts per rank: all four nodes went to 118–119 / 119 GB and shard loads slowed from ~3 s to 20–50 s. Use it only with
EP_SIZE=1and TP slicing (each rank then reads a quarter), where it is fine and boots in ~3 minutes. - One node on a cold page cache can time out the others. On a first restart after changing weights, three nodes finished loading from cache and waited at the post-load barrier while the fourth was still reading from disk; the barrier timed out after ~8 minutes. Starting all four cold (or all warm) avoids it.
- L2 prefetch does nothing on an NCCL ring — it hooks RoCE collectives; the log says so. Leave it off.
- Check the full smoke test after any profile change. The default quick smoke only checks arithmetic; set
SMOKE_QUICK=0once to verify JSON, tool calls and vision. - Moving 510 GB. Downloaded once from ModelScope (~10 MB/s, 16 hours), then rsync over the ring’s direct links at ~1 GB/s per link: 8 minutes per neighbour. Relaying to the far node through a neighbour with
ssh -Jdrops to ~300 MB/s because the middle node re-encrypts; pushing from the far node’s own neighbours is faster. - Shut down cleanly. Stop the serving stack before powering off the nodes; otherwise containers are killed mid-collective (exit 247) and caches get rebuilt on the next start.
Using it
Clients on the LAN and over Tailscale point at one OpenAI-compatible endpoint: DeepSeek Harness (desktop and web), OpenCode, Hermes. Reasoning effort works per request (reasoning_effort), and images work through the same endpoint.
A side experiment with the 0910 weights: the same model inside OpenCode and inside DeepSeek Harness, six tasks with hidden tests and blind grading. Both scored the same on code fixes, refactoring and long-document retrieval; Harness wrote better technical prose; OpenCode finished the suite in a quarter of the time with a fraction of the tokens. Neither reliably answered a yes/no question without starting to edit files, so rules in the agent’s instructions still matter.
Credit
All the heavy lifting is the MiaAI-Lab repository and its patched NCCL ring support. A detailed report with every step, the exact environment line and a few doc suggestions is here: https://github.com/MiaAI-Lab/DeepSeek-v4.1-Flash-DGX-Sparks/issues/59
Questions welcome — happy to run specific prompts or benchmarks on the ring.