Eight-GPU DeepSeek-V4.1-Flash-1017 Engineering Guide: Why TP4×PP2 Beats TP8, 36s 1M Prefill, 1,151 tok/s & 24×1M on 8× RTX PRO 6000
When teams deploy DeepSeek-V4.1-Flash-1017 on a dual-socket 8 × NVIDIA RTX PRO 6000 Blackwell Server Edition 96 GB (768 GB total VRAM) PCIe 5.0 server, the instinctive first step is --tensor-parallel-size 8. On a PCIe 5.0 system without NVSwitch, our controlled same-machine testing proved that TP8 pays a heavy cross-socket UPI penalty—slowing 1M cold prefill by +32.9% (80.85 s) and missing our fixed 1,024-budget GSM8K quality gate.
This playbook shares KINGSING's complete eight-GPU architecture and lossless optimization guide (Speed9): why locking to symmetrical dual-NUMA TP4×PP2 (20/20 layers) + CPU Engram offload preserves 288 GiB of FP8 KV (24 simultaneous 1M slots), how four targeted kernel, CUDA graph and dual-NCCL prefill optimizations achieved 36.17 s 1M cold prefill (2.23× faster than TP8), 349.0 tok/s single-stream code, 1,150.8 tok/s 10-way aggregate, and −37% to −47% faster 10×1M startup—plus all 9 rejected eight-GPU dead ends documented with exact failure data so you can deploy cleanly on day one.
Every numerical precision guard and capacity envelope remains intact: W4A8 experts, FP8 DS MLA KV at 36 GiB per GPU (288 GiB total, 24 scheduler slots), CPU Engram offload (~188.83 GiB), DSpark dynamic K=5/3, 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 DeepSeek checkpoint, and refusal rates were not evaluated.
1Architecture Showdown: Why TP4×PP2 Decisively Beats TP8
Our dual-socket host runs eight RTX PRO 6000 Blackwell 96 GB GPUs (all observed at PCIe 5.0 ×16 under load), dual Intel Xeon Platinum 8558P CPUs and 512 GB DDR5 (499 GiB visible), with GRUB iommu=pt enabling PCIe P2P and cgroup MemorySwapMax=0 enforced on the Docker scope. Before optimizing kernels, we ran a controlled same-server showdown between TP8 (32 GiB/GPU KV) and TP4×PP2 (36 GiB/GPU KV, 20/20 layer split):
TP4×PP2 Speed9 beats TP8 by 2.23× on 1M cold prefill, cuts 10×1M worst-stream TTFT by 47.7%, and passes GSM8K 197/200. Right: Five major eight-GPU dead ends to skip.| Metric (Same 8-GPU Server & Checkpoint) | Rejected TP8 (32 GiB KV) |
Prior TP4×PP2 Baseline |
Speed9 TP4×PP2 Winner |
Verdict |
|---|---|---|---|---|
| Single 1M cold prefill TTFT (0 hits) | 80.85 s (+32.9%) | 61.24 s | 36.17 s | Speed9 is 2.23× faster than TP8 |
10 × 1M worst-stream cold TTFT | 715.95 s (+20.2%) | 595.56 s | 374.15 s | −47.7% vs. TP8 (no cross-UPI AllReduce) |
Single-stream Code / English (T=0) | 312.5 / 236.1 tok/s | 320.2 / 251.1 tok/s | 349.0 / 287.2 tok/s | +11.7% / +21.6% over TP8 |
8-way / 10-way Code aggregate (T=0) | 1,068.4 / 1,212.3 tok/s | 934.7 / 998.2 tok/s | 1,030.0 / 1,150.8 tok/s | Near-parity short bursts without 1M penalty |
| GSM8K fixed 1,024-budget gate | 196 / 200 (FAIL) | 197 / 200 (PASS) | 197 / 200 (PASS) | TP8 truncated 1 item under 1024 budget |
| GPU FP8 KV capacity & slots | 256 GiB (32G/GPU) | 288 GiB (24 slots) | 288 GiB (24 slots) | Preserves full 24×1M VRAM headroom |
Why dual-NUMA TP4×PP2 aligns with hardware physics: Each TP=4 rank group stays 100% inside a single CPU socket's PCIe 5.0 root complex—GPUs 0–3 on NUMA 0 run layers 0–19 with local zero-copy reads into ~188.83 GiB pinned THP Engram tables, while GPUs 4–7 on NUMA 1 run layers 20–39 plus DSpark K5/3. Only compact hidden states cross the inter-socket UPI bus once per stage.
TP4×PP2 + CPU Engram offload topology on dual-socket Xeon Platinum 8558P: PP Stage 0 (GPUs 0–3, NUMA 0) runs layers 0–19 with overlapped dual-NCCL sequence-parallel prefill and local zero-copy Engram reads; PP Stage 1 (GPUs 4–7, NUMA 1) runs layers 20–39 plus DSpark K5/3 with bounded wo_a MXFP8 GEMV (T ≤ 48) and exact CUDA graph buckets.2Four Lossless Speed9 Optimizations & Ready-to-Adapt Launch Reference
1. Bounded wo_a MXFP8 GEMV T ≤ 48 Cutoff
Per-GPU microbenchmarks proved FP8 GEMV beats BF16 BMM by 1.24×–2.09× up to T=48 and crosses over at T=56 (0.92×). Setting VLLM_LANGCHAO_BMM_MAX_T=48 with a load-time cached BF16 weight for T > 48 captures the full C1–C8 gain while turning unbounded GEMV's −8.2% C10 drop into +13.6% to +15.3%.
2. Exact Decode CUDA Graph Buckets Zero C1 Padding
Default 8-step graph buckets padded C1 (6 tokens) to 8 (+33% wasted compute), C2 (12→16), C3 (18→24), C5 (20→24) and C7 (28→32). Capturing exact sizes [1,2,4,6,8,12,16,18,20,24,28,32,36,40,44,48,...128] with GRAPH_AUDIT=0 eliminates padding across everyday concurrency.
3. PP0 Dual-NCCL Prefill Pipeline −40.9% 1M TTFT
Because PP Stage 0 runs in its own OS process (independent GIL, layers 0–19 only), enabling PP2_PREFILL_SP=1, PREFILL_PIPE=2, SP_RS=nccl, SP_GATHER=mxfp8 (0.52× bytes) and ORDER=comm2prio overlaps two 4,096-row microbatches on dual high-priority NCCL communicators, cutting 1M cold TTFT from 61.24 s to 36.17 s while avoiding prior p2p_rs timeouts.
4. Decode Micro-Fusions & Guardrails 8.8–9.0 ms/step
Enabling TARGET_LM_HEAD_MXFP8=1, MHC_MXFP8=1, CANDIDATE_DET_TOPK=1, ROUTER_TOPK_FUSED=1, DSV4_TOPK_PDL=1, P2P_AG=1 while locking P2P_AR_FUSED_MAX_ROWS=8 and MOE_MEGA=0 cuts single-request step time by 11.2%–12.5%.
# Sanitized Speed9 8-GPU Launch Reference (8 × RTX PRO 6000 Blackwell 96 GB, dual-NUMA TP4×PP2) export VLLM_PP_LAYER_PARTITION=20,20 VLLM_B12X_MOE_FP4_FORCE_A16=0 VLLM_ALLREDUCE_USE_FLASHINFER_PCIE_IPC=1 export VLLM_USE_BREAKABLE_CUDAGRAPH=1 VLLM_MOET_SM120_GEMV=1 VLLM_MOET_SM120_GEMV_BMM=1 VLLM_LANGCHAO_BMM_MAX_T=48 export VLLM_MOET_MOE_MEGA=0 VLLM_MOET_B12X_MOE_FUSED=1 VLLM_MOET_B12X_MOE_PREFILL_FAST=1 export VLLM_MOET_TARGET_LM_HEAD_MXFP8=1 VLLM_MOET_DRAFTER_LM_HEAD_MXFP8=0 VLLM_MOET_MHC_MXFP8=1 export VLLM_MOET_CANDIDATE_DET_TOPK=1 VLLM_MOET_ROUTER_TOPK_FUSED=1 VLLM_MOET_DSV4_TOPK_PDL=1 export 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_LANGCHAO_PP2_PREFILL_SP=1 VLLM_MOET_PREFILL_SP_RS=nccl VLLM_MOET_PREFILL_SP_GATHER=mxfp8 export VLLM_MOET_PREFILL_PIPE=2 VLLM_MOET_PREFILL_PIPE_ORDER=comm2prio VLLM_LANGCHAO_PP2_DSPARK_LOCAL_AUX=1 VLLM_LANGCHAO_GRAPH_AUDIT=0 python3 -m vllm.entrypoints.openai.api_server --model /model --dtype bfloat16 --tensor-parallel-size 4 --pipeline-parallel-size 2 --disable-custom-all-reduce --max-model-len 1048576 --max-num-seqs 24 --max-num-batched-tokens 8192 --kv-cache-memory-bytes 38654705664 --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 1 1 1 1 --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,72,80,88,96,104,112,120,128],"max_cudagraph_capture_size":128,"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]]}'
3Same-Day Paired Generation Speed (Baseline vs. Speed9)
Both profiles ran on the exact same eight-GPU server, checkpoint and short-prompt suite (temperature=0, thinking disabled, 1,024-token output budget; C1 = single-stream median; C4/C8/C10 = batch aggregate). Two independent repeats (R1 and R2) separate kernel speedups from speculative acceptance variance:
wo_a microbenchmark confirming the exact T=48 cutoff before BF16 BMM takes over at T=56.| Concurrency | Task | Prior TP4×PP2 Baseline (tok/s) | Speed9 R1 (tok/s) | Speed9 R2 (tok/s) | Speed9 vs. Baseline |
|---|---|---|---|---|---|
| 1 | Chinese | 266.32 | 292.58 | 291.67 | +9.5% to +9.9% |
| 1 | Code | 320.20 | 349.01 | 346.64 | +8.3% to +9.0% |
| 1 | English | 251.09 | 280.68 | 287.17 | +11.8% to +14.4% |
| 4 | Chinese (agg) | 519.70 | 547.78 | 551.60 | +5.4% to +6.1% |
| 4 | Code (agg) | 615.31 | 642.45 | 648.36 | +4.4% to +5.4% |
| 4 | English (agg) | 483.17 | 519.02 | 525.59 | +7.4% to +8.8% |
| 8 | Chinese (agg) | 835.94 | 883.63 | 919.27 | +5.7% to +10.0% |
| 8 | Code (agg) | 934.69 | 963.33 | 1029.95 | +3.1% to +10.2% |
| 8 | English (agg) | 789.06 | 870.34 | 901.34 | +10.3% to +14.2% |
| 10 | Chinese (agg) | 1002.97 | 998.66 | 1008.71 | −0.4% to +0.6% |
| 10 | Code (agg) | 998.18 | 1150.78 | 1133.89 | +13.6% to +15.3% |
| 10 | English (agg) | 862.51 | 964.75 | 976.13 | +11.9% to +13.2% |
Normalizing for speculative acceptance confirms single-request step time fell uniformly from 10.09–10.20 ms/step to 8.80–9.04 ms/step (−11.2% to −12.5%). Under production default sampling (temperature=1.0, top_p=1.0), single-request decode reached 283.80 / 342.88 / 270.15 tok/s (+16.6% / +14.4% / +12.7% over the prior unoptimized TP4×PP2 T=1.0 reference), with short-task quality at 28/30.
4Cold Prefill, 10×1M / 24×1M Capacity & Mixed Workloads
| Workload | Previous Eight-GPU Baseline | Speed9 Optimized Eight-GPU | Change |
|---|---|---|---|
| Single 163K cold prefill TTFT (0 hits) | 9.40 s | 5.37 s (GPU-warm: 0.547 s) | −42.9% (1.75×) |
| Single 1M cold prefill TTFT (0 hits) | 61.24 s | 36.17 s (36.23 / 36.17 s) | −40.9% (1.69×) |
10 × 1M cold TTFT (min / med / max) | 233.5 / 465.5 / 595.6 s | 123.59 / 267.25 / 374.15 s | −47.1% / −42.6% / −37.2% |
10 × 1M shared 60s steady decode | 572.48 tok/s | 571.02 tok/s (53.29–64.12/stream) | Parity; 10/10 retrieval, 0 preemptions |
24 × 1M full-envelope 60s steady decode | — | 755.09 tok/s (26.66–35.60/stream) | 24/24 retrieval, 0 preemptions (med TTFT 831.5 s) |
Mixed C10×128K + 1M: baseline window | 909.81 tok/s | 1,033.56 tok/s | +13.6% |
Mixed C10×128K + 1M: during 1M prefill | 159.33 tok/s | 190.71 tok/s | +19.7% |
Mixed C10×128K + 1M: new 1M TTFT | 62.95 s | 55.39 s | −12.0% |
Mixed C10×128K + 1M: recovery window | 991.06 tok/s | 1,102.00 tok/s | +11.2% |
All 10×1M and 24×1M sessions carried 1,000,004 independent salted input tokens each, zero initial prefix-cache hits, zero waiting requests and zero preemptions throughout the shared generation window. A separate single-request 1M 60.67-second hold test passed at 388.80 tok/s steady decode.
59 Eight-GPU Dead Ends to Skip (Tested & Rejected)
Every candidate below failed either our latency, concurrency or zero-regression quality gate. Sharing these exact failure numbers lets other eight-GPU teams avoid repeating them:
TP8 Across Dual PCIe Sockets +32.9% 1M TTFT
Cross-UPI 8-way AllReduce slowed 1M cold prefill to 80.85 s, slowed 10×1M max TTFT to 715.95 s (+20.2%), dipped C1 code/English, and failed the fixed 1,024-budget GSM8K gate (196/200). Stick with TP4×PP2.
Unbounded SM120_GEMV_BMM C10 −8.2%
Running FP8 GEMV across all batch sizes helped C1 (+9.4%) but regressed 10-way code by −8.2% once T > 48. Always bound at VLLM_LANGCHAO_BMM_MAX_T=48 with load-time cached BF16 BMM.
Cand5 (WS1=9/WS2=3 + MXFP8 Autotune) Long 11/12 FAIL
Eliminated FlashInfer autotune warnings and trimmed 1M TTFT by only 0.21 s (35.94 s), but C1 slowed ~0.9% and failed 1/12 long_quality checks (id=5 1M sum emitted 10466610 instead of 1046610).
fair1024 & indexer1024 +55.7% 1M TTFT
Tightening fair-prefill threshold to 1024 slowed competing 1M TTFT by +55.7% for only +2.2% mixed decode; indexer1024 reduced mixed decode by −4.9%. Keep both at 2048.
p2p_rs + PIPE=2, MAX_ROWS=32, MOE_MEGA=1, batch16k Hangs / Regressed
p2p_rs triggered PCIe receive timeouts (use SP_RS=nccl); P2P_AR_FUSED_MAX_ROWS=32 regressed C4/C8 by 5–14%; MOE_MEGA=1 ran 1.9 µs/layer slower; batch=16384 regressed 1M TTFT from 56.48 s → 59.34 s.
CPU RAM L2 KV Cache (OffloadingConnector) Not Enabled
Three code-verified blockers on TP4×PP2: incompatible with PREFILL_PIPE=2 (+31% 163K regression), replicated_layout restricted to pp_size == 1, and 288 GiB GPU KV already fits 24×1M in VRAM (163K warm TTFT 0.547 s).
6Full Quality Qualification, Safeguards & Dedicated Eight-GPU Repository
| Evaluation Suite | Prior Eight-GPU Baseline | Speed9 Optimized | Status & Notes |
|---|---|---|---|
| GSM8K fixed 200-question subset (1024 budget, chat) | 197/200 | 197/200 | PASS 0 truncated; exact same 3 errors [52, 55, 150] |
| Authored short tasks (chat / low thinking) | 28/30 / 30/30 | 28/30 / 30/30 | PASS Batch c=10: 28/30 & 30/30 |
Production sampling quality (T=1.0, 90 tasks) | Gate ≥82/90 | 83/90 | PASS Above production gate |
| Application / short & long vision checks | 10/10 · 2/2 · 4/4 | 10/10 · 2/2 · 4/4 | PASS Includes 60s soak & multimodal long context |
| Long text checks (10×163K + 2×1M, cold) | 12/12 | 12/12 | PASS Zero prefix hits |
| Public HTTPS acceptance / cold cancel | 10/10 / 3/3 | 10/10 / 3/3 | PASS Chat / Messages (literal tokens) / Responses (tool call) all HTTP 200 |
Supervised by systemd (active/enabled) with an engine-health watchdog, enforcing cgroup MemorySwapMax=0 (verified after daemon reloads so memory.swap.current=0), holding idle VRAM at ~78–80 GiB / 96 GiB per GPU with zero OOMs or restarts, and retaining 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, targeted Python source patches and selected compiled CUDA extensions—not a full from-scratch vLLM/PyTorch rebuild. Local image digests are not publicly pullable registry images, no second-host rebuild is claimed, and an operator-cancelled one-hour 24-client soak remains unexecuted.
Additional references: Full English engineering guide · Chinese engineering guide · Upstream vLLM-Moet · GSM8K dataset.
English
