Automatic Wire Stripping and Crimping Machine - KINGSING

  1. Home
  2. Services
  3. Company News

Four-GPU DeepSeek-V4.1-Flash-1017 Engineering Guide: 373 tok/s Code, 454 tok/s 1M Decode, 6×1M Concurrency & Pitfalls on 4× RTX PRO 6000

2026-11-24 11:29:17
Four RTX PRO 6000 Blackwell Server Edition 96 GB GPUs in a single-NUMA PCIe 5.0 compute chassis connected directly to local DDR5 CPU Engram memory
Complete Four-GPU Engineering Playbook  Speed10 Single-Process TP=4 (PP=1) + Single-NUMA CPU Engram Offload 4 × RTX PRO 6000 Blackwell 96 GB · 1,048,576 Context
Single-Stream Code (T=1.0)
373.5 tok/s
T=0: 344.2 · 1M Hold: 454.1
Chinese 291.7–297.2 · English 262.2–263.3 tok/s
Cold Prefill (163K / 1M)
9.17 s / 62.0 s
Down from 222.6 s initial bring-up
−39.6% / −27.9% vs. single-process PIPE=2
Long-Context Concurrency
6×1M / 10×500K
8×1M Overflow: 0 OOM / 0 Retries
11 GiB/GPU FP8 KV · 439.2 / 637.4 tok/s agg
Full Qualification
197 / 200
GSM8K · Zero Truncations
Long text 12/12 · Vision 6/6 · Peak 72 °C

Running DeepSeek-V4.1-Flash-1017 with a full 1,048,576-token context window on 4 × NVIDIA RTX PRO 6000 Blackwell Server Edition 96 GB (384 GB total VRAM) is a rewarding systems challenge. Out of the box, PCIe peer-to-peer access often fails under default Linux IOMMU settings, naive environment flags can silently bypass W4A8 fused MoE kernels, and multi-threaded prefill pipelines can trigger severe CPython GIL stalls inside a single PP=1 worker process.

This engineering playbook shares the exact, reproducible path KINGSING used to take four RTX PRO 6000 Blackwell GPUs from initial bring-up (255.7 tok/s code, 222.55 s 1M cold prefill) to our promoted Speed10 production build: 373.5 tok/s single-stream code generation (T=1.0), 454.1 tok/s sustained decode at 1M context, 9.17 s / 62.01 s cold prefill (163K / 1M), 6×1M simultaneous resident sessions (439.2 tok/s, zero preemptions), 10×500K simultaneous sessions (637.4 tok/s), and 8×1M cold burst overflow queueing with zero OOMs. We also document all 9 historical dead ends and regressions we measured so fellow four-GPU operators can skip straight to a verified configuration.

Evaluation Scope & Model Disclosure

Every numerical precision guardrail remains intact: W4A8 MoE experts (b12x), fp8_ds_mla KV cache at 11.00 GiB per GPU (5,238,588 startup tokens, max_num_seqs=16), FP8 Lightning Indexer, DSpark dynamic K=5/3, BF16 global dtype, zero FP4 KV conversion and zero GPU overclocking. All measurements evaluate mrfakename/DeepSeek-V4.1-Flash-1017-abliterated (revision 517efab9ccfef7f714dbd7d679f181a86f43ccf9); they are not new benchmarks of the unmodified official checkpoint, and refusal rates were not evaluated.

1Host & OS Foundation: Three Prerequisites Before Tuning vLLM

Before touching inference flags, three host-level steps decide whether a four-GPU PCIe 5.0 server runs at peak speed or hits silent bottlenecks:

1. Unlock PCIe P2P (iommu=pt) 12/12 Links

On stock Linux boot parameters, our CUDA peer-access test failed across 12 of 12 GPU-to-GPU directions. Adding iommu=pt to GRUB and rebooting immediately resolved 12/12 directions with zero errors, unlocking FlashInfer PCIe IPC and Moet P2P AllReduce/AllGather.

2. Pin All 4 GPUs to NUMA 0 Zero UPI Hops

Keep all four GPUs under one CPU socket and bind both container CPUs (--cpuset-cpus=0-47,96-143) and vLLM workers (--numa-bind-nodes 0 0 0 0). The ~189 GiB pinned THP Engram tables sit in local Socket 0 DDR5 with zero cross-socket UPI hops and zero pipeline bubbles.

3. Enforce MemorySwapMax=0 Zero Swap

Cap the serving container at 238 GiB RAM and explicitly enforce memory.swap.max=0 at the systemd cgroup level (re-verified after daemon reloads). Preventing Engram memory from ever paging out eliminates catastrophic tail-latency stalls.

Diagram of the four-GPU TP=4 PP=1 plus single-NUMA CPU Engram Offload architecture and Speed10 optimization stack
Figure 1. Four-GPU TP=4, PP=1 + single-NUMA CPU Engram offload topology on GPUs 0–3 (NUMA 0): all 40 layers + DSpark K5/3 in one process with PREFILL_PIPE=0, PREFILL_SP=1, MXFP8 all-gather, bounded wo_a MXFP8 GEMV (T ≤ 48), exact CUDA graph buckets [1..64], and 11.00 GiB/GPU FP8 KV.

2How We Got Here: Four-Stage Optimization Journey (222.6s → 62.0s)

Seeing only the final numbers hides why each setting matters. Across four structured engineering stages on the exact same four GPUs and checkpoint, every major leap came from verifying real execution paths and profiling real bottlenecks:

Four-stage optimization journey on 4x RTX PRO 6000 Blackwell showing 1M cold prefill dropping from 222.55s to 62.01s and C1 code rising from 255.7 to 373.5 tok/s
Figure 2. Four-GPU chronological engineering trajectory from initial bring-up (Stage 1) through W4A8 + 8192 chunking (Stage 2), diagnosing single-process PIPE=2 GIL contention (Stage 3), to the promoted Speed10 configuration (Stage 4).
Stage Core Configuration C1 Code (T=0) 1M Cold TTFT FP8 KV / GPU What We Learned
Stage 1: Bring-upA16 MoE, K3, batch=1024255.7 tok/s222.55 s6.0 GiB (seq=8)iommu=pt + CPU Engram worked, but FORCE_A16=1 silently skipped W4A8 and small chunks stalled 1M prefill
Stage 2: W4A8 + 8192FORCE_A16=0, batch=8192, SP=1, fixed K5/K3327.8 tok/s (+28%)55.33 s (−75%)6.0 GiB (seq=8)True W4A8 unlocked massive prefill & decode gains; fixed K forced a C1-vs-C8 trade-off (K5 328 vs K3 272; C8 K3 851 vs K5 800)
Stage 3: PIPE=2 PitfallSingle-process PP=1 + PREFILL_PIPE=2345.8 tok/s85.95 s (regressed)9.5 GiB (tight)Torch Profiler exposed 2 threads fighting one CPython 3.12 GIL (~18K CUDA launches/step: 228ms GPU → 774ms wall) + 2.54 GiB extra buffers
Stage 4: Speed10 WinnerPIPE=0 + SP=1 + mxfp8 + BMM_MAX_T=48 + exact graphs + dynamic K5/3344.2 (T=1: 373.5)62.01 s (163K: 9.17s)11.0 GiB (seq=16)Eliminated GIL stall, reclaimed 2.54 GiB/GPU to expand KV, hit 454.1 tok/s 1M decode & 6×1M resident

3Six Key Techniques & Ready-to-Adapt Launch Reference

1. Single-Process PREFILL_PIPE=0 −39.6% / −27.9% TTFT

With all 40 layers inside one Python process (PP=1), dual-thread PREFILL_PIPE=2 serialized on the CPython 3.12 GIL and consumed ~2.54 GiB/GPU for duplicate row buffers and a second NCCL communicator. Disabling PREFILL_PIPE while keeping PREFILL_SP=1, SP_RS=nccl and SP_GATHER=mxfp8 cut 163K/1M TTFT from 15.18s / 85.95s to 9.17s / 61.97s and unlocked 11.00 GiB/GPU KV.

2. Verify True W4A8 (FORCE_A16=0) Zero Silent Bypass

Setting B12X_MOE_FUSED=1 does nothing if VLLM_B12X_MOE_FP4_FORCE_A16=1 remains active—vLLM silently falls back to B12X_MXFP4_BF16. Explicitly set FORCE_A16=0, verify B12X_MXFP4_MXFP8 in startup logs, and put "indexer_tp_shard_min_rows": 2048 directly inside --attention-config.

3. Bounded wo_a GEMV + Exact Graphs T ≤ 48 · Buckets [1..64]

VLLM_LANGCHAO_BMM_MAX_T=48 routes small/medium decode steps (T ≤ 48) to FP8 GEMV and larger batches to a load-time cached BF16 weight (zero runtime dequant). Exact capture buckets [1,2,4,6,8,12,16,18,20,24...64] eliminate 33% padding waste at C1 and align cleanly with max_num_seqs=16 × (1+K=3) = 64.

4. Dynamic DSpark K5/3 & Fair Prefill 0.67 s Short TTFT

Dynamic DSpark ([[1,4,5],[5,32,3]]) uses K=5 at C1–C4 (pushing code to 373.5 tok/s) and shifts to K=3 at C5–C32 (protecting multi-stream efficiency). Adaptive fair prefill (--long-prefill-token-threshold 2048 --long-prefill-token-threshold-adaptive) dropped short-request TTFT injected during a 128K prefill from 26.5 s to 0.67 s.

# Sanitized Speed10 4-GPU Launch Reference (4 × RTX PRO 6000 Blackwell 96 GB, NUMA 0 pinned)
export VLLM_B12X_MOE_FP4_FORCE_A16=0 VLLM_ALLREDUCE_USE_FLASHINFER_PCIE_IPC=1 VLLM_USE_BREAKABLE_CUDAGRAPH=1
export VLLM_MOET_SM120_GEMV=1 VLLM_MOET_SM120_GEMV_BMM=1 VLLM_LANGCHAO_BMM_MAX_T=48 VLLM_MOET_MOE_MEGA=0
export VLLM_MOET_B12X_MOE_FUSED=1 VLLM_MOET_B12X_MOE_PREFILL_FAST=1 VLLM_MOET_TARGET_LM_HEAD_MXFP8=1 VLLM_MOET_DRAFTER_LM_HEAD_MXFP8=0
export VLLM_MOET_MHC_MXFP8=1 VLLM_MOET_P2P_AR=1 VLLM_MOET_P2P_AG=1 VLLM_MOET_P2P_AR_FUSED_MAX_ROWS=8
export VLLM_MOET_PREFILL_SP=1 VLLM_MOET_PREFILL_SP_RS=nccl VLLM_MOET_PREFILL_SP_GATHER=mxfp8 VLLM_MOET_PREFILL_PIPE=0
export VLLM_MOET_SPARSE_MLA_PREFILL_BF16=0 VLLM_MOET_KV_FP4_FAKE=0 VLLM_LANGCHAO_GRAPH_AUDIT=0

python3 -m vllm.entrypoints.openai.api_server   --model /model --dtype bfloat16 --tensor-parallel-size 4 --pipeline-parallel-size 1   --disable-custom-all-reduce --max-model-len 1048576 --max-num-seqs 16 --max-num-batched-tokens 8192   --gpu-memory-utilization 0.92 --kv-cache-memory-bytes 11811160064 --kv-cache-dtype fp8_ds_mla --block-size 128   --engram-config '{"cpu_offload": true, "use_thp": true}' --numa-bind --numa-bind-nodes 0 0 0 0   --attention-backend FLASHINFER_MLA_SPARSE_DSV41 --linear-backend flashinfer_cutlass --moe-backend b12x   --attention-config '{"indexer_kv_dtype": "fp8", "indexer_tp_shard_min_rows": 2048}'   --long-prefill-token-threshold 2048 --long-prefill-token-threshold-adaptive   --compilation-config '{"cudagraph_mode":"FULL_DECODE_ONLY","compile_sizes":[],"cudagraph_capture_sizes":[1,2,4,6,8,12,16,18,20,24,28,32,36,40,44,48,52,56,60,64],"max_cudagraph_capture_size":64,"cudagraph_decoder_replay":false}'   --speculative-config '{"method":"dspark","num_speculative_tokens":5,"draft_sample_method":"probabilistic","rejection_sample_method":"standard","enable_adaptive_verification":false,"num_speculative_tokens_per_batch_size":[[1,4,5],[5,32,3]]}'

4Stage 2 Screening & Production Decode / Prefill Benchmarks

Four-GPU decode throughput across C1, 1x1M, C4 and C8 alongside single-process prefill TTFT reduction from disabling PREFILL_PIPE
Figure 3. Left: Four-GPU decode throughput on the promoted 11.00 GiB/GPU KV build across C1 (T=0 & T=1.0), sustained 1×1M decode (454.1 tok/s), C4 aggregate and C8 aggregate. Right: Stage 2 single-variable prefill breakthrough showing how PREFILL_PIPE=0 eliminates GIL stalls and frees 2.54 GiB/GPU.
Stage 2 Candidate (4-GPU A/B) Key Experimental Variable C1 Geo (T=0) 163K Cold TTFT 1M Cold TTFT 1M Peak VRAM Decision
cand1_base_pipe2ncclPIPE=2, comm2prio, KV=9.5G303.75 tok/s15.18 s85.95 s97,051 MiBReference (GIL-bound)
cand2_pipe0_sp_mxfp8PIPE=0, SP=1, GATHER=mxfp8307.62 tok/s9.17 s (−39.6%)61.97 s (−27.9%)93,913 MiBPromoted → KV 11G
cand3_pipe2_sharedtail_replayPIPE=2 + SHARED_TAIL + REPLAY303.24 tok/s15.17 s85.42 s96,453 MiBRejected
cand4_sp_rs_p2pSP_RS=p2p + PREWARM=1306.50 tok/s14.11 s89.51 s96,269 MiBRejected
cand5_drafter_lmhead8DRAFTER_LM_HEAD_MXFP8=1302.03 tok/s14.18 s84.09 s96,143 MiBRejected
Stage 3 Production Workload (11 GiB/GPU KV) Chinese Code English Notes
C1 single-stream (T=1.0, prod default)291.67 tok/s373.51 tok/s263.33 tok/sStage 2 repeat: 297.15 / 366.52 / 262.20 tok/s
C1 single-stream (T=0, deterministic)311.07 tok/s344.20 tok/s270.51 tok/sLive post-promotion check: 309.9 / 340.1 / 264.7
C4 batch aggregate (T=0)519.83 tok/s584.61 tok/s462.54 tok/s123.7–157.9 tok/s median per stream
C8 batch aggregate (T=0)821.43 tok/s863.64 tok/s749.96 tok/s99.6–115.6 tok/s median per stream
Single 1M sustained decode (61.0 s hold)—454.11 tok/s—Cold TTFT 62.31 s · Peak KV 19.3% · 1/1 retrieval
Single cold prefill TTFT (0 prefix hits)163K: 9.17 s1M: 62.01 s—Live re-check: 9.35 s / 62.53 s · 100% retrieval

5Long-Context Concurrency Envelope (6×1M, 10×500K & 8×1M Zero-OOM)

Although startup reports 5,238,588 KV tokens (nominally 5.00× at 1M), vLLM V1's unified physical block pool leverages sliding-window-attention (SWA) compactness so a single steady 1M context consumes only ~15.3% of total KV blocks. That enables six simultaneous cold 1M sessions to reside in VRAM together for 60 seconds with zero preemptions, and ten simultaneous 500K sessions at 78.2% KV utilization.

Four-GPU long-context concurrency validation showing 1x1M through 6x1M resident holds, 10x500K, 8x1M zero-OOM overflow queueing and mixed C4x128K plus 1M workload
Figure 4. Four-GPU long-context capacity envelope on 11.00 GiB/GPU FP8 KV: simultaneous cold holds up to 6×1M and 10×500K with zero preemptions, graceful 8×1M overflow queueing with zero OOMs, and mixed C4×128K + 1M throughput recovery.
Concurrency Workload (0 Prefix Hits) Hold Window Aggregate Decode Cold TTFT (Min / Med / Max) Peak KV Status & Notes
4 × 1,000,000 simultaneous60.8 s320.8 tok/s214.3 / 228.3 / 232.1 s63.0%PASS  4/4 retrieval · 75–83/stream · 0 wait
5 × 1,000,000 simultaneous61.0 s410.3 tok/s214.5 / 232.8 / 331.1 s77.5%PASS  5/5 retrieval · 76–95/stream · 0 preempt
6 × 1,000,000 simultaneous60.0 s439.2 tok/s214.5 / 235.6 / 355.6 s92.9%PASS  6/6 retrieval · 65–88/stream · 0 preempt
10 × 500,000 simultaneous46.0 s637.4 tok/s99.5 / 210.1 / 273.6 s78.2%PASS  10/10 retrieval · 59–68/stream · 0 preempt
8 × 1,000,004 overflow shockComplete—214.6 / 339.9 / 458.0 s67.3%PASS  8/8 HTTP 200 · max_run=7, max_wait=4 · 0 OOM
Mixed C4×128K + 1M prefill3 windows525.1 → 61.9 → 603.3New 1M TTFT: 105.85 s—PASS  5/5 retrieval · full recovery

69 Four-GPU Dead Ends to Skip (Tested & Rejected)

We invested hundreds of GPU hours auditing community tuning tips so other four-GPU operators don't have to repeat the same failed experiments. Every item below was measured on this exact hardware:

PREFILL_PIPE=2 on Single-Process PP=1 −39.6% Slower

Dual Python pipeline threads fight over the same CPython 3.12 GIL (~18K CUDA launches/step), dragging 163K/1M cold TTFT to 15.18 s / 85.95 s and wasting ~2.54 GiB/GPU VRAM. Always keep VLLM_MOET_PREFILL_PIPE=0.

FORCE_A16=1 & Env-Only Indexer Sharding Silent Bypass

Leaving VLLM_B12X_MOE_FP4_FORCE_A16=1 silently bypasses W4A8 even when fused flags are set. Direct api_server launches ignore INDEXER_TP_SHARD_MIN_ROWS unless placed inside --attention-config.

NCCL_P2P_LEVEL=SYS & SP_RS=p2p Prefill Regressed

Forcing NCCL_P2P_LEVEL=SYS slowed 128K cold TTFT from 6.84 s → 8.08 s and 1M from 55.73 s → 65.28 s. Switching SP_RS=p2p slowed 1M prefill to 89.51 s. Leave NCCL topology automatic and keep SP_RS=nccl.

DRAFTER_LM_HEAD_MXFP8=1 −0.56% / +0.33 GiB

Quantizing the speculative drafter LM head slowed C1 decode and added 0.33 GiB/GPU VRAM overhead. Keep TARGET_LM_HEAD_MXFP8=1 and DRAFTER_LM_HEAD_MXFP8=0.

LDG on Pure FP8 KV & Adaptive Verify No-Op / Unsupported

Kernel traces across 8 runs proved LDG invoked 0 kernels under pure FP8 KV (requires mixed FP8/FP4 KV). Meanwhile, DeepseekV41IndexerBackend rejects enable_adaptive_verification=true on Blackwell SM120.

CPU Governor, stream_interval=4, K4 & block No Net Gain

75-request A/B/A/B/A CPU governor tests showed only 0.1–0.2% noise; stream_interval=4 slowed end-to-end code by −2.12%; fixed K=4 and block rejection showed no advantage over dynamic K5/3 + standard.

7Quality, Hardware Telemetry & Dedicated Four-GPU Repository

Verification Gate Measured Result Status & Notes
GSM8K fixed 200-question subset (1,024 budget, chat)197 / 200PASS  0 truncated; failed IDs [380, 515, 1019]
Deterministic short tasks (chat / low thinking)29/30 / 30/30PASS  Batch c=10: 28/30 & 30/30
Production sampling quality (T=1.0, 90 tasks)81/90 (repeats 79, 82, 81)PASS  Initial run had 3 equation-format matches (84/90 value-correct); matches 79–84/90 variance
Long text reasoning (long_quality, cold)12 / 12PASS  Includes two 1M-token exact arithmetic tasks
Application & multimodal vision checksApp 10/10 · Vision 2/2 · Long 4/4PASS  Long vision verified at 19,037 prompt tokens
Public HTTPS & three-protocol verificationAccept 10/10 · Cold cancel 3/3PASS  Chat / Messages (literal tokens) / Responses (tool call) all HTTP 200
Hardware telemetry (8,253 samples @ 0.5 s)96,681 MiB · 1,523.6 W · 72 °CPASS  1,206 MiB free VRAM · 0 allocator retries · swap=0
Runtime Boundaries & Reproducibility Scope

Supervised by systemd (active/enabled) with a GPU-scoped health watchdog inspecting only GPUs 0–3 (DS_GPU_DEVICES=0,1,2,3) and enforcing cgroup MemorySwapMax=0 (swap_current=0), with zero container restarts and full OpenAI Chat, Anthropic Messages, OpenAI Responses and Gemini GenAI gateway compatibility.

Built on vLLM 0.32.1rc1.dev117+gdf3bd094a and PyTorch 2.14.0+cu130 with Moet kernels, bounded wo_a GEMV/BF16-BMM dispatch and targeted CLI protocol patches—not a full from-scratch vLLM/PyTorch rebuild. Local container digests are not publicly pullable registry images, no second-host rebuild is claimed, and finite evaluation suites do not prove universal equivalence across every downstream task.

Additional references: Full English engineering guide · Chinese engineering guide · Upstream vLLM-Moet · GSM8K dataset.

Original publication: KINGSING Company News (four-GPU engineering playbook updated November 24, 2026 with Speed10 production benchmarks, 4-stage optimization journey, launch flags and rejected dead ends). DeepSeek, the community model maintainer, vLLM-Moet, vLLM, FlashInfer, PyTorch and GSM8K contributors retain their respective attribution and licensing. Findings describe this specific four-GPU deployment and do not imply endorsement or universal performance guarantees.
Phone Email Chat