DeepSeek-V4.1-Flash-1017 Fidelity-First 4x CMP 170HX alanoo81
00 upvotes — sign in to vote sign in to votecommunity Community submission — verify on your own hardware.
recipe by alanoo81 (recipe, graft, measurements)↗, GNmac-lab (base recipe 1.2.0 @ 2ad5741ab1, MIT)↗, LibertAIDAI (EXL3 2.9bpw @ 0be63c33 / 3.5bpw @ 04a492fc)↗, Curtis White (hybrid layout + quantization_config.json)↗, vcruz305/vllm-exl3 (AGPL-3.0-only, inside the built image)↗, Morrowmake 1.0.1 CMP170HX engine (vllm_sm80 plugin 0b34823c)↗ · listed by localai-recipes
revision r3 · commit 0740456f1a · updated 2 d ago · license MIT (recipe); engine image contains AGPL-3.0-only vllm-exl3
chat code vision sm80 prefix-caching community-recipe hybrid-checkpoint long-context fidelity-first fp8-kv exl3 tp4 engram-ram
DeepSeek-V4.1-Flash-1017 (748B MoE) on 4x CMP 170HX (sm_80, 64 GB each, PCIe Gen2 x16), TP4, as a fidelity-first variant of the GNmac-lab recipe 1.2.0 @ 2ad5741ab1 with four changes: routed experts of layers 18-22 grafted 2-bit to 3-bit (LibertAIDAI EXL3 3.5bpw shards 00020-00024-of-00044 into the 2.9bpw pack, all 40 layers 3-bit); no DSpark drafter (SPEC_TOKENS=0, frees ~2.8 GiB/card for KV); Engram tables genuinely loaded (ENGRAM_STORAGE=ssd from a 200 GiB RAM tmpfs); gpu_memory_utilization 0.98, KV pool 2,717,420 tokens at 262,144 context. Author-measured: 300/300 exact identifier copies, byte-identical repeats; perplexity -1.80% overall / -4.45% French vs the 2.9bpw pack (95% CIs exclude zero); ~105 tok/s decode c1, 449-560 tok/s aggregate c8; cold prefill 2,514 tok/s median. Documents a silent failure: leaving DSV41_ENGRAM_STORAGE unset (host mode) leaves the Engram tables unfilled - layers 1 and 14 act as identity functions, 15/20 copies, temp-0 output drift, no error.
Launch command
'docker run -d --name ds41-flash --device nvidia.com/gpu=all --ipc=host --cap-add SYS_NICE' '--ulimit memlock=-1 --ulimit stack=67108864' '-v <MODELS_DIR>:/models:ro -v /opt/engram-ram/DeepSeek-V4.1-Flash-1017-engram:/engram:ro' '-v <CACHE_DIR>/root-cache:/root/.cache -v <CACHE_DIR>/triton:/root/.triton -v <CACHE_DIR>/tilelang:/root/.tilelang' '-p 127.0.0.1:8011:8011' '-e VLLM_PLUGINS=vllm_exl3 -e VLLM_ENGINE_READY_TIMEOUT_S=3600 -e VLLM_EXL3_MODEL_DIR=/models/DeepSeek-V4.1-Flash-1017-hybrid' '-e VLLM_USE_V2_MODEL_RUNNER=0 -e DSV41_DSPARK_V1=1 -e VLLM_EXL3_COOP=1' '-e VLLM_EXL3_TC_MOE_V2=1 -e VLLM_EXL3_TC_MOE_PREFILL=1 -e VLLM_EXL3_TC_PREFILL_ROWS=2048' '-e VLLM_EXL3_TC_MOE_SO=/opt/dsv41-tc-moe/_dsv41_tc_moe_C.abi3.so -e VLLM_EXL3_TC_HOOK=/opt/dsv41-tc-moe/exl3_tc_hook.py' '-e VLLM_EXL3_MOE_TP_ALIGN=128 -e VLLM_EXL3_MOE_TP_ROTATE=1' '-e NCCL_CUMEM_ENABLE=0 -e NCCL_CUMEM_HOST_ENABLE=0 -e NCCL_P2P_LEVEL=SYS -e VLLM_ALLREDUCE_USE_FLASHINFER_PCIE_IPC=1' '-e DSV41_ENGRAM_DIR=/engram -e DSV41_ENGRAM_STORAGE=ssd' '-e DSV41_EXPERTS_ONLY_FILES_RE=^model-[0-9]+-of-000(43|44|39)\.safetensors$' '-e TORCH_CUDA_ARCH_LIST=8.0 -e TORCHINDUCTOR_CACHE_DIR=/root/.cache/inductor' '-e VLLM_DSV41_DECODE_SPLITK=1 -e DSV41_SHARED_HEAVY_BLOCKS=1 -e DSV41_DRAFT_HEAD_FP8=1' '-e DSV41_PREFILL_CHUNK_REQS=1 -e DSV41_INDEXER_BUF_MULT=4 -e VLLM_EXL3_FAT_THRESHOLD=2048' '--entrypoint vllm ds41-cmp170hx:1.2.0-fidelity serve /models/DeepSeek-V4.1-Flash-1017-hybrid' '--quantization exl3 --load-format safetensors --safetensors-load-strategy lazy' '--tensor-parallel-size 4 --pipeline-parallel-size 1' '--served-model-name deepseek-v4.1-flash --host 0.0.0.0 --port 8011' '--max-model-len 262144 --max-num-seqs 8 --max-num-batched-tokens 2048 --gpu-memory-utilization 0.98' '--kv-cache-dtype fp8_ds_mla --enable-prefix-caching' '--compilation-config {"cudagraph_mode": "FULL_AND_PIECEWISE", "cudagraph_capture_sizes": [1,2,3,4,5,6,8,12,16,18,20,24,28,30,32,36,42,48]}' --async-scheduling '--tokenizer-mode deepseek_v41 --enable-auto-tool-choice --tool-call-parser deepseek_v41 --reasoning-parser deepseek_v41' --enable-prompt-tokens-detailsenv
P2P: 1
BIND: 127.0.0.1
PORT: 8011
IMAGE: 'ds41-cmp170hx:1.2.0-fidelity'
LAYOUT: tp4
EXTRA_ARGS: '--enable-prompt-tokens-details'
SPEC_TOKENS: 0
MAX_NUM_SEQS: 8
MAX_MODEL_LEN: 262144
ENGRAM_STORAGE: ssd
ENGRAM_HOST_DIR: /opt/engram-ram/DeepSeek-V4.1-Flash-1017-engram
GPU_MEMORY_UTILIZATION: 0.98
VLLM_EXL3_FAT_THRESHOLD: 2048
runtime
notes: "Patched serve.sh: SPEC_TOKENS=0 drops --speculative-config entirely (no DSpark drafter, no DSV41_DYNK); ENGRAM_HOST_DIR mounted read-only at /engram with DSV41_ENGRAM_STORAGE=ssd; start.sh runs engram-ram.sh first when ENGRAM_HOST_DIR is under /opt/engram-ram/ (tmpfs ENGRAM_TMPFS_SIZE=200G, copy ~94 s from NVMe). API has no auth by default - bind stays 127.0.0.1 until EXTRA_ARGS carries --api-key. Startup log must show 'Built engram token map (129280 -> 99092 ids) for layers (1, 14)' per rank and NO 'offloaded to pinned' line; 'GPU KV cache size: 2,717,420 tokens' at 0.98 (2,417,392 at 0.97, 1,817,233 at 0.95). Graft build: tools/make_hybrid_graft.py k3 = 188,241 tensors, 23,040 grafted at 3 bits, 88 links. SECOND, OPT-IN ENGINE LANE at repo pin 2009574b3299 (NOT part of the launch above, which stays the GNmac 1.2.0 build and owns every perf point on this record): Morrowmake 1.0.1 (image ghcr.io/morrowmake/vllm-cmp170hx@sha256:32ae8b0e..., plugin vllm_sm80 0b34823c, Apache-2.0) plus the author's compact KV cache. morrowmake/compact-kv/build-overlay.sh extracts and patches 7 engine files from the pinned image and start.sh.patch mounts them read-only over it (sm80_kv_pack.py added); inert unless the env sets VLLM_SM80_COMPACT_KV=1. Launchers: start-dspark.sh (DSpark on, ~1.47M-token pool) and start-nospec.sh (no drafter, ~3.09M). The author reports prompt log-probabilities bit-identical to Morrowmake's BF16 rows over ~1.39M tokens, at 2-5% decode and 6-10% prefill cost, KV pool x1.99; the compact-cache timings were measured on 1.0.0 and not repeated on 1.0.1. All of that is self-measured on the author's own harness, so it is carried as author-claimed, never as a site-measured fact. The repo's new bench rows (m101-*, mm-*, gnmac-dspark) come from different stacks (Morrowmake engine and/or DSpark enabled) and are deliberately NOT published as site perf points against this GNmac no-drafter configuration."
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-fidelity-first-4x-cmp-170hx-alanoo81.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-fidelity-first-4x-cmp-170hx-alanoo81.jsonDownloads
- Weights https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash-1017official FP8 1017 @ 1bae0e1088993b9b82de08f59de5be5a34e42170 - non-expert tensors + Engram shards 00047/00048-of-00048
- Weights https://huggingface.co/LibertAIDAI/DeepSeek-V4.1-Flash-1017-EXL3-2.9bpwEXL3 2.9bpw routed experts @ 0be63c3337efbb2a0061d5b8bb4006fa186d433f
- Weights https://huggingface.co/LibertAIDAI/DeepSeek-V4.1-Flash-1017-EXL3-3.5bpwEXL3 3.5bpw @ 04a492fc3b4d25ddbab8f2d2f07f235ec77c9010 - shards 00020-00024-of-00044 grafted into layers 18-22
- Reference https://github.com/alanoo81/deepseek-v41-flash-4x-cmp170hx2009574b32991668951e284aec36ae92b3c2e9e6 (patches, scripts, tests, bench harness with API-key auth, raw measurement data; no weights, no engine code, plus the morrowmake/compact-kv overlay)
- Reference https://github.com/GNmac-lab/deepseek-v41-flash-1017-cmp170hx2ad5741ab1a278d64f33b842706a41717dfbf181 (base recipe release 1.2.0, image + kernels + benchmarks)
- Reference https://github.com/CurtisAccelerate/DeepSeekv41-Flash-1017-EXL3-CMP170HXb8b9e99 - hybrid layout + quantization_config.json (Curtis White)
Revision notes
Community ingest by localai-recipes from alanoo81's repo @ da967740 (single commit, verified live 2026-10-30; HEAD at sweep == HEAD at ingest). Recipe by alanoo81 - a fidelity-first variant of GNmac-lab 1.2.0 @ 2ad5741ab1 with four changes (3-bit graft layers 18-22, no DSpark, Engram genuinely loaded, 0.98). KEY FINDING (silent-failure disclosure, the most valuable part of this recipe): DSV41_ENGRAM_STORAGE unset / host mode fails SILENTLY. The stack reserves 2 x 23.6 GiB pinned per rank but never fills it; the hybrid index contains only the small Engram tensors (q, k, wkv), not engram.embed.*; vLLM skips its missing-weights check when a quantization method is set. Symptoms: 15/20 exact copies, identifiers with dropped _ separators, output changing between runs at temperature 0 - no error, and decode speed is unchanged, so benchmarks do not catch it. The upstream author never tested host mode; the documented path is ssd. Startup log data/logs/01-first-start-engram-NOT-loaded.txt; those benchmarks kept as data/bench/INVALID-no-engram*. Fix: ENGRAM_STORAGE=ssd reading a 200 GiB tmpfs (2 x ~101.5 GB shards, ~189 GiB); after the fix copy test 20/20 then 100/100 x 3 passes, byte-identical repeats. NOT a dupe: distinct launch from all three existing DS41 4x-170HX recipes (GNmac EXL3 2.9bpw TC-MoE, Morrowmake hybrid, EXL3 3bpw TC-MoE) - English/French documented, no drafter, RAM-tmpfs Engram, 3-bit graft at 0.98. License: repo MIT (LICENSE 1,065 B); the built engine image contains AGPL-3.0-only vllm-exl3 code per NOTICE.md - do not claim the image is MIT. All perf/fidelity numbers author-reported (T0). corrections_to_card: none - README 17,317 B + README.fr.md, NOTICE.md 5,759 B, MIT LICENSE, HEAD, and every quoted figure match the repo at the pin; the c8 speed rows published per-suite (559.7/482.4/449.2) and the card's 505 aggregate mid-range are both carried (505 as the aggregate headline with the published range 449-560 in notes). UPDATE 2026-10-31 (repo @ 7615d9e): A-B-A on the SAME machine (4x CMP 170HX 200 W, cmpunlocker driver + P2P patch, no TRAP31, EPYC 7F52, 512 GB), both stacks, same tools, frozen windows, fresh server each. Supersedes the earlier inferences. To 1,024 tokens the two ENGINES score equal within 0.3%; ours is better by ~2% overall (5% French) because of its WEIGHTS (layers 18-22 at 3 bits), NOT its engine. Ours bit-identical across A1/A2 and to k3-098 (zero noise floor). Self-check |decode-prefill| logprob 0.0205 vs 0.0476; prefill-argmax mismatch 1.2% vs 3.9% (internal consistency only). HumanEval/164 157/158 vs 153 (p 0.22); GSM8K/1,319 1,277/1,280 vs 1,271 (p 0.11): these do NOT separate the stacks - the gap is our own noise (11 GSM8K differ at temp 0). Long contexts and speed NOT measured. CORRECTED CRASH FINDING: prompt_logprobs on a 2,001-token prompt is CUDA OOM on GPU 0 (~1 GiB requested) and the ENGINE DIES; the server has no restart policy, so it STAYS DOWN. The earlier advice to use 0.97 with 1,024-token windows is narrowed accordingly - the 1,024-token NLL windows (peaking ~0.23 GiB) are explicitly NOT the failing case. Harness changes shipped alongside: recipe/quality.py.patch adds QUALITY_API_KEY auth so GNmac's bench/quality.py can reach a key-protected server, tests/nll_eval.py gains the same path; raw run files under data/nll/ and data/quality/. UPDATE 2026-11-06 (repo @ 2009574b3299): the repo now ALSO ships an OPT-IN second engine lane - Morrowmake 1.0.1 (image sha256:32ae8b0e..., plugin vllm_sm80 0b34823c) + the author's compact KV cache, on only when VLLM_SM80_COMPACT_KV=1. NOT a replacement: the published launch and every perf point here remain the GNmac 1.2.0 engine, unchanged. Author reports bit-identical caches vs BF16 over ~1.39M tokens at 2-5% decode cost - author-measured, never site-measured. No new perf points added (different stacks). The 2026-10-31 A-B-A above is condensed for the notes cap with every published figure kept; its crash finding and narrowed advice are unchanged.
Revision history
- 527dbfa912 recipe: sync 34 from preprod (wave 14 — 6 NEW: glm fp4-local hyperflare tp3, wtogami dspark-k7, dsv4+qwen r9700 radiance tp4, glm-3090 tiered-experts, qwen max-q lmcache + max-q eager; 28 revision bumps incl kraken .12.2 r21, Radiance 2.0.0, hotsplit seqs r2, dgx-spark r5 — owner go 2026-11-15/18) 16 d ago diff
- cb05cc4f52 recipe: update deepseek-v4-1-flash-1017-fidelity-first-4x-cmp-170hx-alanoo81 (r2: /artifacts, /engine, /performance, /provenance/notes) 35 d ago diff
- 5af1460f4a recipe: create deepseek-v4-1-flash-1017-fidelity-first-4x-cmp-170hx-alanoo81 36 d ago
Fork
Sign in to fork this recipe — a fork is your own copy; you own it and only you can update it.