MEASURED·5 min read·Sep 11, 2026

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

This recipe serves DeepSeek-V4.1-Flash with vLLM on four DGX Spark GB10 nodes. It keeps the model's 203 GB of Engram tables on disk with patches from tonyd2wild and Kai, and splits the conversation memory between the nodes (DCP2/DCP4).

4× DGX Spark GB10 · TP4/EP4 · vLLM 1.1 · aidendle94/sparkrun-vllm-dsv41-gb10:production-1.1 · measured Sep 11, 2026

  • DeepSeek-V4.1-Flash
  • vLLM
  • multi-node
  • TP4
  • DGX Spark
  • FP8
  • MXFP4
  • MoE
1,891–2,362tok/sPrefillUnique text, prompts of 9K–132K tokens, after warm-up
77 / 81tok/sDecode · code / mathOne stream
500KtokensContextSince 2026-09-14
1.26M → 1.89MtokensKV poolRelease 1.0, then 1.1 with the KV cache split two ways (DCP2)

01Overview

What you need
  • Four DGX Spark GB10 nodes linked by a 200G RoCE network
  • The image aidendle94/sparkrun-vllm-dsv41-gb10:production-1.2 from Docker Hub, with the patch set and the b12x RoCEnante runtime built in
  • Or production-1.0 with the seven patch files from tonyd2wild/DeepSeek-V4.1-Flash-vLLM-DGX-Spark (MIT licence) bind-mounted over it
  • The deepseek-ai/DeepSeek-V4.1-Flash weights (510 GB) on one node, shared over NFS with the other three. Or the 418 GB variant aidendle94/DeepSeek-V4.1-Flash-NVFP4-Engram
  • About 50 GB of local NVMe disk per node for its Engram rows, plus about 25 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 vLLM. One request at a time, it writes 94.5 tok/s on a counting prompt and 74.5 tok/s on code. A request may hold up to 500K tokens, and the model accepts images and tool calls. Thinking is on: the model reasons before it answers.

Stock vLLM keeps the model's 203 GB of Engram tables in memory, so the model does not fit on four DGX Sparks. This recipe keeps the tables on disk and reads only the rows it needs.

02Build

Deploy one container per node

Run one container per node. Share the checkpoint from one node over NFS (network file system). Start the three workers first and the head, which runs rank 0 and serves the API, last. Thinking runs at reasoning_effort: max by default. A request sets its own level with any integer from 1 to 100, or turns thinking off with "thinking": false.

Pick the checkpoint in the selector below: the original with fp8 Engram tables, or the NVFP4-Engram variant.

Use the original 510 GB checkpoint. Keep about 50 GB of local disk per node for the Engram row copies.

docker run · one rank (rank 0 shown; workers add --headless and their own VLLM_HOST_IP)
# production-1.2 has the patch set built in. On production-1.0, add one -v per patch file after the /cache mount:
#   -v <patches>/engram.py:/usr/local/lib/python3.12/dist-packages/vllm/models/deepseek_v4_1/common/engram.py:ro  (etc., from mounts.txt)
# Set B12X_ROCE_GID_INDEX to this node's RoCE-v2 IPv4 entry, which is not always 3.
docker run -d --name dsv41vllm --restart no --network host --ipc host --shm-size 32g \
  --memory 112g --memory-swap 112g --ulimit memlock=-1:-1 --cap-add IPC_LOCK \
  --device /dev/infiniband:/dev/infiniband --oom-score-adj 500 --gpus all \
  -v <hf-repo-dir>:/models/repo:ro -v <writable-cache-dir>:/cache \
  -v <engram-local-dir>:/engram-local:ro -e DSV41_ENGRAM_DIR=/engram-local \
  -e DSV41_ENGRAM_DISK=1 -e DSV41_ENGRAM_DISK_THREADS=32 -e DSV41_ENGRAM_DISK_CHUNK=16 \
  -e DSV41_DCP_STAGE=3 -e DSV41_DCP_COMBINE=a2a -e DSV41_ENGRAM_MMAP=1 -e DSV41_ENGRAM_PREFETCH=1 -e DSV41_DCP_PREFILL_GATHER=1 \
  -e VLLM_HOST_IP=<this-node-fabric-ip> -e HF_HUB_OFFLINE=1 -e VLLM_CACHE_ROOT=/cache/vllm \
  -e TILELANG_CACHE_DIR=/cache/tilelang -e TRITON_CACHE_DIR=/cache/triton -e B12X_CACHE_DIR=/cache/b12x \
  -e VLLM_USE_BREAKABLE_CUDAGRAPH=1 -e VLLM_USE_FLASHINFER_SAMPLER=0 -e VLLM_HAS_FLASHINFER_CUBIN=1 \
  -e MAX_JOBS=2 -e FLASHINFER_NVCC_THREADS=1 -e PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True \
  -e TORCH_CUDA_ARCH_LIST=12.1a -e FLASHINFER_CUDA_ARCH_LIST=12.1a -e FLASHINFER_DISABLE_VERSION_CHECK=1 \
  -e NCCL_NET=IB -e NCCL_IB_HCA=<rdma-devices> -e NCCL_SOCKET_IFNAME=<fabric-iface> -e NCCL_IB_GID_INDEX=3 \
  -e NCCL_IB_ROCE_VERSION_NUM=2 -e NCCL_ALGO=Ring -e NCCL_PROTO=LL,LL128,Simple -e NCCL_CUMEM_ENABLE=0 \
  -e VLLM_ENABLE_ROCE_ALLREDUCE=1 -e VLLM_ROCE_ALLREDUCE_MAX_SIZE=1MB -e VLLM_ROCE_ALLGATHER_MAX_SIZE=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 B12X_ROCE_CACHE_DIR=/opt/b12x-roce/cache \
  aidendle94/sparkrun-vllm-dsv41-gb10:production-1.2 /models/repo/snapshots/<snapshot> \
    --served-model-name deepseek-v4.1-flash --host 0.0.0.0 --port 8410 \
    --tensor-parallel-size 4 --decode-context-parallel-size 2 --dcp-comm-backend ag_rs \
    --gpu-memory-utilization 0.80 --kv-cache-memory-bytes 6442450944 \
    --max-model-len 500000 --max-num-seqs 8 --max-num-batched-tokens 8192 --block-size 128 \
    --moe-backend b12x --engram-config '{"cpu_offload":false}' \
    --default-chat-template-kwargs '{"thinking":true,"reasoning_effort":"max"}' \
    --limit-mm-per-prompt '{"image":4}' --mm-processor-cache-gb 1 \
    --tool-call-parser deepseek_v41 --enable-auto-tool-choice --reasoning-parser deepseek_v41 \
    --speculative-config '{"method":"dspark","num_speculative_tokens":5,"draft_sample_method":"probabilistic","rejection_sample_method":"block","enable_adaptive_verification":false}' \
    --compilation-config '{"cudagraph_mode":"FULL_AND_PIECEWISE","cudagraph_capture_sizes":[5,6,10,12,15,18,20,24,25,30,35,36,40,42,48]}' \
    --distributed-executor-backend mp --nnodes 4 --node-rank 0 --master-addr <head-fabric-ip> --master-port 29551
  1. Share the checkpoint's HuggingFace repository directory, not the snapshot, over NFS from the node that holds it (ro,no_subtree_check). Mount it on the other nodes through fstab with _netdev,nofail.
  2. Pull production-1.2 on every node. Set B12X_ROCE_GID_INDEX for each node: with a wrong value, the RoCE exchanges fall back to NCCL without an error. To turn them off, set ROCE_AR=0 in the launcher.
  3. Boot once, and read the Engram DISK mode: layer L rows [start, end) lines of each rank. Run engram_local.py on each node with those ranges (about 6 minutes). Relaunch with DSV41_ENGRAM_DIR set, and every rank should log read from node-local.
  4. Wait about 11 minutes for the fleet. Check that GPU KV cache size reads 1,888,800 tokens on DCP2 with 6 GiB, that MemAvailable on the head is at least 5 GB, and that the log shows Using 'B12X_MXFP4_MXFP8' Mxfp4 MoE backend.
  5. Test the answers: count to 100, find a fact hidden in a 32K-token prompt, describe an image and make a tool call. Then send many unique requests at once.
thinking on, per request
curl -s http://<head>:8410/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}}'
# reasoning_content: "We need answer briefly. 91 = 7*13, not prime."   (19 reasoning tokens)
# content:           "No. 91 = 7 × 13, so it is not prime."

03Performance

Measured2026-09-10 for 1.0, 2026-09-11 for 1.1 and 1.2. The model runs on four nodes (TP4) with DSpark decoding, and decode uses tonyd2wild's fixed prompt set: one stream, temperature 0, thinking off. Image: aidendle94/sparkrun-vllm-dsv41-gb10:production-1.1.

Decode · code / math77 / 81tok/sOne stream
Aggregate185tok/sSix streams, mean of eight prompt categories
Prefill1,891–2,362tok/sUnique text, prompts of 9K–132K tokens, after warm-up
KV pool1.26M → 1.89MtokensRelease 1.0, then 1.1 with the KV cache split two ways (DCP2)
Context500KtokensSince 2026-09-14
Stability540 / 0req / err8 workers for 20 min, plus two bursts of 8 requests, every output correct
DCP4 (production)2.48Mtokens KVThe KV cache split four ways: room for 8.3 contexts of 300K tokens
Decode for one stream, by prompt categorytok/s · higher is better
counting (ceiling)94.5
formatted output87.9
math81.1
codingshipped77.5
JSON62.8
reasoning60.4
prose34.5
narrative33.2
summary31.5
Throughput by number of streamstok/s, mean of eight prompt categories · higher is better
per streamaggregate
C158.652.8-10%
C246.682.8+78%
C341.11072.6×
C443.11473.4×
C538.71634.2×
C635.71855.2×

C is the number of streams started together.

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)96.5
DeepSeek-V4.1-Flash (1.1, DCP2)shipped60.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)4,892
DeepSeek-V4.1-Flash (1.0)shipped2,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.

Headline numbers

DCP2 (production-1.2)DCP4 (production since 2026-09-11)
KV pool at a 300K context limit1,888,800 tokens2,477,126 tokens
decode, one stream (counting / code / prose)90.7 / 63.6 / 34.4 tok/s90.7 / 63.5 / 31.3 tok/s
prefill 32K / 128K15.3 s / 61.0 s17.2 s / 67.6 s
12-min soak test, 8 streams0 errors0 errors

Four-node test fleet, prompts of unique content, decode one stream at a time.

NCCL against RoCE exchanges

NCCL (same day)RoCE (production since 2026-09-16)
decode, one stream (counting / code / prose)85.6 / 49.9 / 25.8 tok/s94.5 / 74.5 / 35.9 tok/s
draft acceptance (tokens kept per step)3.103.56
KV pool (tokens)3,418,1453,418,145

One stream at a time, same fleet, same day.

04Notes

Operating notes and limits

  • Watch MemAvailable, not the KV number.A KV size that leaves too little memory gives no error, so keep MemAvailable on the head above 5 GB.
  • Weights over NFS need an fstab entry.Use fstab with _netdev,nofail, because a mount made by hand is gone after a node reset.
  • A 1M-token context is untested.500K is tested, and a prefill that long starves any health check that expects an answer within seconds.
  • Copy Engram rows while serving only with a rate limit.At 150 MB/s under live traffic, free memory did not move.
  • Kill by process ID (PID), never by pattern.A pkill -f whose pattern matches the shell that runs it kills that shell too.