localairecipes launch configs for local inference

DeepSeek V4.1 Flash 1017 FP8 TP1xPP2 DSpark 2x DGX Station GB300 RoCE vLLM 0.31 overlay

00 upvotes — sign in to vote sign in to vote

community Community submission — verify on your own hardware.

recipe by ebfio - DeepSeek V4.1 Flash PP2+DSpark GB300 pair recipe (port by Iris on 4x RTX Pro 6000, with Eduardo & Kestrel)↗ · listed by localai-recipes

Initial version · updated 3 d ago · license NOASSERTION (repo); overlaid vLLM sources Apache-2.0

chat code vision fp8-kv dspark long-context pp2 engram speculative rdma roce multi-node gb300-pair

Pipeline-parallel TP1xPP2 + DSpark serving of DeepSeek V4.1 Flash (1017 official FP8 weights) across two DGX Station GB300 nodes over 400G CX8 RoCE. PP2 splits the 40 layers 20/20 and removes all 84 per-step all-reduces, replacing them with two point-to-point hops: single-stream temp-0 391 tok/s vs TP2 stock 290.5 (+34%), step 12.3 ms -> ~9.4 ms; aggregate soak 323/406/595/974 tok/s at C1/C2/C4/C8 (3.01x C1); GSM8K 97/100, 0 errors; 1M-token context, FP8 KV, Engram host table pinned in Grace RAM on rank 0. Ships the five-file vLLM v0.31.0 source-fix overlay (bind-mounted over stock vllm/vllm-openai:v0.31.0) that makes DSpark work under PP, plus preflight, launch scripts and soak/receipt verifiers. ALL perf numbers author-measured on their own pair (2026-10-25) - not reproduced locally; site has no GB300 hardware. Recipe by ebfio (port by Iris, a GLM-5.3 model, with Eduardo & Kestrel).

Launch command

vllm serve /model --served-model-name deepseek-v4.1-flash --trust-remote-code --tokenizer-mode deepseek_v41 --tensor-parallel-size 1 --pipeline-parallel-size 2 --distributed-executor-backend mp --nnodes 2 --node-rank 0 --master-addr '<rank0-rail0-ip>' --master-port 29501 --disable-custom-all-reduce --max-model-len 1048576 --max-num-seqs 128 --max-num-batched-tokens 16384 --gpu-memory-utilization 0.9 --engram-config '{"cpu_offload": true, "use_thp": true}' --reasoning-parser deepseek_v41 --tool-call-parser deepseek_v41 --enable-auto-tool-choice --enable-prefix-caching --no-enable-flashinfer-autotune --kv-cache-dtype fp8 --attention-config '{"backend": "FLASHINFER_MLA_SPARSE_DSV41", "indexer_kv_dtype": "mxfp4", "indexer_sparse_logits": true}' --default-chat-template-kwargs '{"preserve_thinking": true}' --speculative-config '{"method":"dspark","num_speculative_tokens":5,"draft_sample_method":"probabilistic","rejection_sample_method":"block","enable_adaptive_verification":false}' --mm-encoder-tp-mode data --host 0.0.0.0 --port 8001

runtime

env: 'Per-rank container env (serve_vllm_node.sh): VLLM_HOST_IP=<node rail0 ip>; NCCL_HCAS=mlx5_0,mlx5_1 dual-rail RoCE with NCCL_ALGO=RING NCCL_PROTO=SIMPLE NCCL_MIN/MAX_NCHANNELS=8 NCCL_IB_QPS_PER_CONNECTION=4 NCCL_DMABUF_ENABLE=1 NCCL_NET_GDR_LEVEL=SYS (tuned striping, measured best on this fabric; LL/LL128 auto-selection crashes on RoCE+QPS); GLOO/NCCL_SOCKET_IFNAME=cx8r0; VLLM_ALLREDUCE_USE_SYMM_MEM=0 VLLM_ALLREDUCE_USE_FLASHINFER=0 VLLM_USE_NCCL_SYMM_MEM=0; VLLM_DEEP_GEMM_WARMUP=relax; PYTHONPATH=/opt/pp2-flag (overlay). Host: HOST_RDMA=1 bind-mounts host MOFED libibverbs/libmlx5 for the ConnectX-8 Data Direct DMA path. VLLM_PATCH_PP2_FLAG=1 gates the pp+DSpark launch; MODE=low-latency selects DSpark n=5. ENGRAM_HOST_TABLE=1 ENGRAM_LAYOUT=private ENGRAM_PIN=1 ENGRAM_THP=1 (Engram shard cudaHostRegister, 2 MiB THP lookups). VLLM_FLASHINFER_AUTOTUNE=0 -> --no-enable-flashinfer-autotune (distributed autotune deadlocks cross-node). MODEL_DIR_RANK0=derived KeysAblit checkpoint, MODEL_DIR_RANK1=official 1017 (identical pinned revision, local NVMe per node).'
notes: "Two-node launcher: stage the recipe dir at the same path on both nodes, fill placeholder IPs in config.env, then 'bash -n recipe/config.env && bash recipe/launch_cluster.sh' (health-waits, streams both ranks; NODE_RANK via launch_cluster per node, rank 0 = API host :8001, rank 1 headless). VLLM_PARALLEL=pp -> TP1xPP2 (40 layers 20/20; the flag-only fix refuses partitions whose last stage starts above layer 37 - drafts need layers 37-39 there). Persistent JIT caches seeded from the image's /root/.cache on first use. preflight.sh checks RDMA devices, retained HBM, jumbo ping on rail 1, MemAvailable > 300 GiB/node. Verify lane: python3 verify/texts_prod.py (determinism md5 x3) && python3 verify/pp2_soak.py (C1/C2/C4/C8 aggregate + host memory gates); receipts under logs/. MEM_FRACTION_STATIC=0.80 in config.env is the sglang lane - unused by the vLLM path."

Use this recipe with your agent

Paste this into any agent chat — it fetches and applies the recipe:

Fetch https://localairecipes.com/api/v1/recipes/deepseek-v4-1-flash-1017-fp8-tp1xpp2-dspark-2x-dgx-station-gb300.json and apply the inference recipe it describes (engine flags, model, quant, context) to my setup. Ask before overwriting any existing config.

Or fetch it directly:

curl -fsSL https://localairecipes.com/api/v1/recipes/deepseek-v4-1-flash-1017-fp8-tp1xpp2-dspark-2x-dgx-station-gb300.json

Engine

Install note: Runs on the STOCK image vllm/vllm-openai:v0.31.0 - no custom registry image. serve_vllm_node.sh bind-mounts patches/vllm-pp2-flag/ (sitecustomize.py via PYTHONPATH=/opt/pp2-flag, dspark.py, v1/worker/gpu/model_runner.py, v1/worker/gpu/cudagraph_utils.py, v1/core/kv_cache_utils.py) over the image's vLLM sources; the whole-file overlays are v0.31.0 copies with the edits - valid ONLY on that tag; on any other tag use the shipped .diff files. VLLM_PATCH_PP2_FLAG=1 gates pp+DSpark (stock 0.31.0 refuses DSpark under PP). Two nodes: stage the recipe dir at the same path on both, fill placeholder IPs in config.env, then 'bash recipe/launch_cluster.sh' (rank 0 API :8001, rank 1 headless). Needs host RDMA staging (MOFED libibverbs/libmlx5 bind-mounts), >300 GiB MemAvailable per node (Engram host table ~189 GiB on rank 0), checkpoint on local NVMe per node. Verify: verify/texts_prod.py && verify/pp2_soak.py. vLLM main merged the fix-3 gate - a future tag may retire 2 of the 5 overlays.

Model

Context

  • max context: 1M tokens

Performance

Speed by context

ContextConc.PrefillDecodeTTFT
1,048,5761—391 tok/s—reported
1,059,8161—323 tok/s—reported
1,069,0562—406 tok/s—reported
1,079,2964—595 tok/s—reported
1,089,5368—974 tok/s—reported

prefill = prompt processing · decode = generation. All decode/prefill figures are shown as reported.

reported

notesALL numbers submitter-claimed: measured by the recipe author on their own DGX Station GB300 pair (receipts 2026-10-25); the site has no GB300 hardware and has not reproduced them. GSM8K 100-question slice temp-0: 97/100, 0 errors (verify/gsm8k_gate.py). Free KV cache: rank0 72.7 GiB / rank1 57.1 GiB. Host memory flat through the C8 soak, zero swap. TP2-vs-PP2 at C4-C16 not yet measured on this build; author recommends capping concurrency 4-6 for interactive per-stream latency. Aggregate rows are the round-robin soak corpus (verify/pp2_soak.py), NOT the single-stream prompt. Overlay valid on vllm/vllm-openai:v0.31.0 only.

Install requirements

NVIDIA driver floor: unknown - check the image tag

Source: NVIDIA CUDA Toolkit Release Notes - driver compatibility tables (https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/, fetched 2026-10-03).

Map the placeholders to your rig

Downloads

Revision notes

Initial version.

Revision history

Initial version.

Fork

Sign in to fork this recipe — a fork is your own copy; you own it and only you can update it.

Export

recipe.yaml (raw)