MEASURED·8 min read·Sep 17, 2026

DeepSeek-V4.1-Flash on 4× DGX Spark with SGLang

DeepSeek-V4.1-Flash on four DGX Spark GB10 nodes with the SGLang team's unmodified image and a small MIT-licensed overlay. Against the vLLM recipe it reads prompts 30–45 % faster, writes answers at the same speed and holds a 23 % larger KV pool. It served the test fleet from 2026-09-17 until 2026-11-12.

4× DGX Spark GB10 · TP4/EP4 · SGLang 1.8 · aidendle94/sparkrun-sglang-dsv41-gb10:production-1.8 · measured Sep 17, 2026

  • DeepSeek-V4.1-Flash
  • SGLang
  • multi-node
  • TP4
  • DGX Spark
  • FP8
  • MXFP4
  • MoE
4,892 / 3,848tok/sPrefill · 32K / 128K, 1.8Unique random words: 6.7 s / 34.1 s to first token
114 / 97 / 35tok/sDecode · counting / code / prose, 1.8One stream, greedy, thinking off
524KtokensContextA planted fact was found at 32K and at 128K tokens
6.30MtokensKV pool, 1.8Sized automatically at memory fraction 0.80

01Overview

What you need
  • Four DGX Spark GB10 nodes linked by a 200G RoCE fabric
  • The image aidendle94/sparkrun-sglang-dsv41-gb10:production-1.8 (arm64), or a build from the repository's Dockerfile
  • The overlay repository (MIT licence), github.com/aidendle94/DeepSeek-V4.1-Flash-SGLang-4x-DGX-Spark
  • The deepseek-ai/DeepSeek-V4.1-Flash-1017 weights (510 GB) on one node, shared read-only over NFS with the other three
  • About 50 GB of local NVMe disk per node for its share of the Engram tables, plus about 34 GB for the image
  • Root on every node, and the out-of-memory guard earlyoom

This recipe serves DeepSeek-V4.1-Flash on four DGX Spark GB10 nodes with SGLang. The model is split across the four nodes (tensor parallel, TP4). It is a mixture of experts (MoE), and its experts are divided four ways (expert parallel, EP4). Tool calls, image input and reasoning are on.

The engine is the SGLang team's unmodified image with a small MIT-licensed overlay of import hooks that makes the model fit on a Spark. It served the test fleet from 2026-09-17 to 2026-11-12. The fleet now runs Inkling-2-Small.

02Build

One container per node

Start the three workers first and the head node (rank 0) last. The repository's launcher does this, and with --dry-run it prints the four commands. The command below is for rank 0. The workers differ in --node-rank, in HOST_IP and in the source of their Engram rows.

docker run · one rank (rank 0 shown)
# On the node that holds the checkpoint, use these instead of -e SPARK_ENGRAM_DIR=/engram-local:
#   -e SPARK_ENGRAM_DIR=/models/repo/snapshots/<snapshot> -e SPARK_ENGRAM_ROWS=1:<lo>:<hi>,14:<lo>:<hi>
docker run -d --name sgldsv41 --restart no --network host --ipc host --cap-add IPC_LOCK --gpus all \
  --shm-size 32g --memory 112g --memory-swap 112g --ulimit memlock=-1:-1 --ulimit stack=67108864 \
  --device /dev/infiniband:/dev/infiniband --oom-score-adj 500 \
  -v <hf-repo-dir>:/models/repo:ro -v <writable-cache-dir>:/root/.cache \
  -v <engram-local-dir>:/engram-local:ro -e SPARK_ENGRAM_DIR=/engram-local \
  -e SPARK_ENGRAM_MODE=hostnode -e SPARK_ENGRAM_EARLY=1 -e SPARK_ENGRAM_PREFETCH=1 -e SPARK_PAGE_CACHE_RELEASE=1 \
  -e SPARK_LATE_TAIL_SKIP=1 -e SPARK_LATE_TAIL_SKIP_ALL=0 -e SPARK_ENGRAM_THREADS=64 -e SPARK_ENGRAM_MAX_IDS=131072 -e SPARK_MXFP8_BACKEND=b12x \
  -e SPARK_SERVED_ALIASES=<other-model-ids,comma-separated> \
  -e SPARK_ROCE_AR=1 -e SPARK_ROCE_AR_MAX=1MB -e SPARK_ROCE_AG_MAX=16MB \
  -e B12X_ROCE_HCA=<rdma-devices> -e B12X_ROCE_GID_INDEX=<this-node-roce-v2-gid-index> -e B12X_ROCE_SPIN_LIMIT=300000000 \
  -e SGLANG_ENABLE_DSV41_ENGRAM_HOST_TABLE=0 -e SGLANG_FLASHINFER_MOE_FUSED_FINALIZE=0 -e SGLANG_DSV41_REASONING_EFFORT=100 \
  -e PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False -e CUDA_DEVICE_ORDER=PCI_BUS_ID -e HOST_IP=<this-node-fabric-ip> \
  -e NCCL_NET=IB -e NCCL_IB_DISABLE=0 -e NCCL_IB_HCA=<rdma-devices> -e NCCL_SOCKET_IFNAME=<fabric-iface> -e GLOO_SOCKET_IFNAME=<fabric-iface> \
  -e NCCL_IB_ROCE_VERSION_NUM=2 -e NCCL_IB_ADDR_FAMILY=AF_INET -e NCCL_IB_ADDR_RANGE=<fabric-subnet>/24 -e NCCL_IB_SUBNET_PREFIX_LEN=24 -e NCCL_IB_GID_INDEX=<gid-index> \
  -e NCCL_CROSS_NIC=1 -e NCCL_IB_MERGE_NICS=0 -e NCCL_IB_SUBNET_AWARE_ROUTING=1 -e NCCL_CUMEM_ENABLE=0 -e NCCL_P2P_DISABLE=1 -e NCCL_SHM_DISABLE=1 \
  -e NCCL_BUFFSIZE=1048576 -e NCCL_LL128_BUFFSIZE=262144 -e NCCL_PROTO=^LL128 -e NCCL_MAX_NCHANNELS=8 \
  --entrypoint python3 aidendle94/sparkrun-sglang-dsv41-gb10:production-1.8 -m sglang.launch_server \
    --model-path /models/repo/snapshots/<snapshot> --served-model-name deepseek-v4.1-flash --trust-remote-code --load-format safetensors \
    --tp 4 --ep-size 4 --nnodes 4 --node-rank 0 --dist-init-addr <head-fabric-ip>:20100 --host 0.0.0.0 --port 8210 \
    --attention-backend dsv4 --moe-runner-backend flashinfer_mxfp4 --fp8-gemm-backend flashinfer_cutlass \
    --mem-fraction-static 0.80 --chunked-prefill-size 4096 --context-length 524288 --max-running-requests 16 --cuda-graph-max-bs-decode 16 \
    --random-seed 0 --enable-decoder-swa-bounded-replay --speculative-algorithm DSPARK --speculative-dspark-block-size 5 \
    --tool-call-parser deepseekv41 --reasoning-parser deepseek-v41 --watchdog-timeout 1800 --min-free-slots-delay 1 \
    --default-chat-template-kwargs '{"thinking":true}' --enable-metrics
  1. Pull the image on every node, or build it from the repository's Dockerfile. Share the checkpoint's directory over NFS from the node that holds it. The repository's launch/relaunch.sh runs the steps below from rank 0, with a site file, launch/fleet.env.
  2. Copy each rank's Engram rows to its node with engram_local.py from the vLLM recipe. The node that holds the checkpoint skips the copy and sets SPARK_ENGRAM_ROWS.
  3. Keep --fp8-gemm-backend flashinfer_cutlass in the command.
  4. Wait about 10 minutes. Check that the log shows RoCE collectives on: world=4, and run free -g on every node.
  5. Send a few test requests: a count to 20, a long prompt with one fact to find, an image, a tool call. Then start launch/watchdog.sh, which relaunches the fleet when it stops answering.
thinking is on by default at max; per request
curl -s http://<head>:8210/v1/chat/completions -H 'Content-Type: application/json' -d '{
  "model": "deepseek-v4.1-flash", "max_tokens": 300, "temperature": 0,
  "messages": [{"role": "user", "content": "Is 91 a prime number? Answer briefly."}],
  "chat_template_kwargs": {"thinking": true, "reasoning_effort": 25}}'
# "thinking": false turns reasoning off.
# reasoning_effort takes low (50), high (75), max (100) or any integer from 1 to 100.

03Performance

Measured2026-09-17 to 2026-10-18, releases 1.0 to 1.8. The model runs on four nodes (TP4, EP4) with an MIT-licensed overlay on SGLang, and decode is one stream, greedy, thinking off. Image: aidendle94/sparkrun-sglang-dsv41-gb10:production-1.8.

Prefill · 32K / 128K, 1.84,892 / 3,848tok/sUnique random words: 6.7 s / 34.1 s to first token
Decode · counting / code / prose, 1.8114 / 97 / 35tok/sOne stream, greedy, thinking off
Coding conversation, 1.865.5tok/s10 turns over about 62K tokens of source code
KV pool, 1.86.30MtokensSized automatically at memory fraction 0.80
Context524KtokensA planted fact was found at 32K and at 128K tokens
Boot to healthy583sWith warm compile caches
Overlay18hook modulesMIT-licensed, release 1.8
Concurrency, 1.4 / 1.556 / 220 / 331tok/sAll streams together at 1 / 8 / 16 streams
Claude Code follow-up turn, 1.7.11,536 / 165,888tokensTokens read / reused from the prefix cache, in a session of about 168K tokens
From 1.7.1 to 1.8 on SGLang mainseconds to first token and for the stress run · lower is better
1.7.1, on the dev-dsv41 image1.8, on SGLang main
32K needle, unique words8.06.7-16%
128K needle, unique words45.034.1-24%
12 long prefills with decode streams167140-16%

Same fleet, same weights.

Total throughput by concurrent streams, production-1.5tok/s · higher is better
1 stream55.8
8 streams220
16 streamsshipped331

tonyd2wild's fixed prompt set of eight categories

Changelog · vLLM production-1.2 (DCP4, RoCE) → SGLang + overlay production-1.0

vLLM production-1.2 (DCP4, RoCE)SGLang + overlay production-1.0
EnginevLLM branch, 28 patch files in the imagelmsysorg/sglang:dev-dsv41, unmodified, 8 import hooks (MIT)
Prefill, 32K / 128K2,094–2,362 / 2,152 tok/s3,068 / 2,580 tok/s
Decode, counting / code / prose93 / 67 / 31 tok/s94 / 68 / 32 tok/s
KV pool3,418,145 tokens4,219,904 tokens
Context500,000 tokens524,288 tokens

Same weights, same nodes.

Across recipes

Single-stream decode, by recipetok/s · higher is better
Inkling-2-Small · 4-bit KV cache (experimental)56.9
Inkling-2-Small · SGLang (experimental)55.6
DeepSeek-V4.1-Flash · SGLang (1.8)shipped96.5
DeepSeek-V4.1-Flash (1.1, DCP2)60.8
GLM-5.3-Flash (1.2)89.7
DeepSeek-V4-Flash (3.76.1)71.0
DeepSeek-V4-Flash-Vision (3.73)67.9

One request at a time. Inkling-2-Small at temperature 1.0, the others at temperature 0.

Cold prefill, by recipetok/s · unique content · higher is better
Inkling-2-Small · 4-bit KV cache (experimental)2,840
Inkling-2-Small · SGLang (experimental)2,615
DeepSeek-V4.1-Flash · SGLang (1.8)shipped4,892
DeepSeek-V4.1-Flash (1.0)2,143
GLM-5.3-Flash (1.2)2,070
DeepSeek-V4-Flash (3.76.1)2,200
DeepSeek-V4-Flash-Vision (3.73)2,380

Prompts the server has not seen.

How fast it runs

Same fleet, V4.1-Flash-1017production-1.7.1production-1.8
32K-token needle of unique words, time to first token8.0 s6.6–6.7 s
128K-token needle of unique words, time to first token45.0 s34.1–39 s
decode with one stream, counting / code / prose~108 / 93 / 37 tok/s114 / 96–100 / 35–36 tok/s
coding conversation of 10 turns over ~62K tokens, decode speed over the whole conversation65.9 tok/s65.5 tok/s

Release 1.7.1 against 1.8: time to first token on a long prompt with one fact to find, and decode speed.

Same nodes, same prompts, same daySGLang + overlay (production-1.0)vLLM production-1.2 (DCP4, RoCE)
prefill of 32K tokens of unique random words3,068 tok/s · 10.7 s2,094–2,362 tok/s · 14.2–15.5 s
prefill of 128K tokens of unique random words2,580 tok/s · 51.1 s2,152 tok/s · 60.5 s
decode with one stream (counting / code / prose, greedy, reasoning off)94.4 / 67.8 / 32.4 tok/s93.0 / 66.6 / 31.3 tok/s (best boot 94.5 / 74.5 / 35.9)
KV pool4,219,904 tokens (4.2–5.8M tokens across boots)3,418,145 tokens (6 GiB pinned per rank, DCP4)
context length524,288 tokens500,000 tokens

First SGLang release against the vLLM recipe, on prompts unique to each run.

04Notes

Limits and operating notes

  • The hooks fit only their nightly base image and raise an error at start if their target has moved.
  • Free memory is thin during long prompts, and one stopped rank stops the whole fleet, so watch MemFree on every node, not MemAvailable.
  • Set the RoCE-v2 GID index for each node, because a wrong index moves the exchanges back to NCCL.
  • Never start a rank while the previous engine still holds the GPU, or the other three ranks hang until the watchdog timeout.