localairecipes launch configs for local inference

Qwen3.8-Flash-Next W4A16 2x CMP 170HX TP2 DFlash2 host-RAM PLE

00 upvotes — sign in to vote sign in to vote

community Community submission — verify on your own hardware.

recipe by ElectroHobo↗, Morrowmake (vllm-cmp170hx engine + image + Qwen EXL3 recipe scripts this descends from, MIT)↗, halt95 (W4A16-Merlin checkpoint + companion 3090 engine; not involved in this recipe)↗, inco.ai (DFlash2 drafter, Apache-2.0)↗, Intel (AutoRound INT4 experts) + RadixArk (FP8 n-gram table) + DominikBucko (MTP-head packing)↗, Qwen (Qwen3.8-Flash-Next base model, Qwen Community License 1.0)↗, MiaAI-Lab (benchmark protocol + category prompts, used as data)↗ · listed by localai-recipes

revision r2 · commit 46ed0fb718 · updated 44 h ago · license MIT

chat code vision speculative w4a16 tp2 community-recipe dflash cuda-graphs morrowmake-fork host-ram-ple

Qwen3.8-Flash-Next (125B MoE) INT4-expert W4A16 on two CMP 170HX cards, full 262,144-token context: 241/350/198 tok/s one user (structured/code/prose), 495 tok/s editing code, 895/987/770 across eight, up to 128 requests at once totaling 1,937 tok/s (DFlash 2; 1,966 MTP), 4,696 tok/s cold prefill, 1,475,836-token KV pool. Serves halt95's W4A16-Merlin checkpoint on Morrowmake's vllm-cmp170hx fork @ 18305948acba (stock release image, digest-pinned) with the 51 GB FP8 n-gram table in HOST RAM (cpu_offload; PLE_SHARED_DIR shares one copy across servers), the whole decode step one CUDA graph - built for a 2016 dual-Xeon host. inco.ai's DFlash2 drafter (7/5/3/2 schedule, 44% faster than MTP on code c1, 83% editing code) via engine-file patches plus RecoverSSM one-state GDN; optional KV offload restores an evicted 100k-token context in 0.89 s (21 s without). Measured 2026-10-18/23 from a fresh clone under Morrowmake's protocol (temp 0, 400-token pin, median-of-5 c1 / median-of-3 aggregates).

Launch command

'git clone https://github.com/ElectroHobo/qwen38-flash-next-w4a16-2x-cmp170hx-recipe && cd qwen38-flash-next-w4a16-2x-cmp170hx-recipe' ./start.sh

runtime

env: "Defaults in .env: CUDA_VISIBLE_DEVICES=0,1 | HOST=127.0.0.1 PORT=8000 (API_KEY optional) | SERVED_MODEL_NAME=qwen3.8-flash-next | KV_OFFLOAD_GB=0 (64 held ~2.2M evicted tokens; KV_OFFLOAD_DIR adds a disk tier) | GRAPH_MODE=FULL_AND_PIECEWISE | P2P=auto | SPEC_MODE=dflash (dflash|mtp|none; none needs BOOT_CHECK=0) | SPEC_N=7 (dflash) / 3 (mtp) | DRAFTER_REPO=incoai/Qwen3.8-Flash-Next-DFlash2 @ a22a1744 (Apache-2.0, 1.1 GiB) | SPEC_SCHEDULE=[[1,2,7],[3,4,5],[5,32,3],[33,128,2]] by request count (SPEC_SCHEDULE= for fixed depth; the mtp mode defaults to its own [[1,4,3],[5,8,2],[9,128,1]]) | MAX_SEQS=128 | MAX_BATCHED=3460 | parsers qwen3/qwen3_coder | BOOT_CHECK=1 | READY_TIMEOUT=1800 | SSM_DTYPE=bfloat16 (float32 accepted; float32 switches the dflash block-size default 912 -> 1680) | RECOVER_SSM=1 exports VLLM_GDN_RECOVER=1 | PLE_SHARED_DIR=/dev/shm/qwen38-ple (empty = this server's own copy) exports VLLM_QWEN_PLE_SHARED_DIR + VLLM_QWEN_PLE_SHARED_NAME=qwen38-flash-next-ple-fp8 | engine env with kill switches: VLLM_QWEN4_QSA_TOPK_CANONICAL=1, VLLM_CUSTOM_ALLREDUCE_FLAGS=1, VLLM_THIN_GEMM=1 (+_GLUON=1), VLLM_FLA_AUTOTUNE_SKIP_SPILLING=1, VLLM_USE_BREAKABLE_CUDAGRAPH=1, VLLM_CUSTOM_ALLREDUCE_PCIE_P2P=1 + NCCL_P2P_LEVEL=SYS after the P2P check, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False, CUDA_DEVICE_ORDER=PCI_BUS_ID | context 262144 + util 0.95 FIXED (serve.sh refuses others); FIRST_LIGHT=1 = 32K diagnostic; DRY=1 ./start.sh prints the exact argv | Compose: docker/container.env carries RECOVER_SSM=1 + SSM_DTYPE=bfloat16; .env.example documents PLE_SHARED_DIR=/dev/shm/qwen38-ple (same path as the compose volume)"
notes: "API on 127.0.0.1:8000 as qwen3.8-flash-next, no key by default; reasoning in message.reasoning, answer in content; thinking off via chat_template_kwargs.enable_thinking=false. Exact vLLM argv (DRY=1, 0.2.0 defaults): --tensor-parallel-size 2 --pipeline-parallel-size 1 --enable-expert-parallel --dtype bfloat16 --kv-cache-dtype bfloat16 --load-format auto --mm-encoder-tp-mode data --attention-config {'indexer_kv_dtype':'bf16'} --engram-config {'cpu_offload':true} --max-model-len 262144 --gpu-memory-utilization 0.95 --max-num-seqs 128 --max-num-batched-tokens 3460 --long-prefill-token-threshold 0 --reasoning-parser qwen3 --enable-auto-tool-choice --tool-call-parser qwen3_coder --prefix-match-unit 16 --block-size 912 --mamba-ssm-cache-dtype bfloat16 --compilation-config {'cudagraph_mode':'FULL_AND_PIECEWISE'} --speculative-config {'method':'dflash','model':'/drafter','num_speculative_tokens':7,'num_speculative_tokens_per_batch_size':[[1,2,7],[3,4,5],[5,32,3],[33,128,2]]}; SPEC_MODE=mtp instead sends {'method':'mtp','num_speculative_tokens':3,'num_speculative_tokens_per_batch_size':[[1,4,3],[5,8,2],[9,128,1]],'disable_eagle_block_drop':true}; RECOVER_SSM=1 (default, also docker/container.env) exports VLLM_GDN_RECOVER=1 and start.sh mounts the 0.2.0 patch set pinned at recipe repo e8862d945b94001fa2dae83e4dab75508b4a4594 — gdn_recover/ (recover.py, gdn_recover_verify.cu, __init__.py) over vllm/sm80/kernels/gdn plus mamba_gdn_qwen_gdn_linear_attn.py, qwen4_exp_nvidia_model_state.py, qwen4_exp_nvidia_ple_layer.py, qwen4_exp_common_ngram_embedding.py (the file PLE_SHARED_DIR reads) and v1_worker_utils.py in every mode, and qwen4_exp_nvidia_model.py + models_config.py under SPEC_MODE=dflash (recoverssm.diff, ple-table.diff, chunked-copy.diff are the diffs against the fork's files; engine fork stays 18305948acba, image digest 5b45c4d6 — 0.2.0 moves the mounted file set, not the engine); PLE_SHARED_DIR exports VLLM_QWEN_PLE_SHARED_DIR + VLLM_QWEN_PLE_SHARED_NAME=qwen38-flash-next-ple-fp8 (one shared host copy of the n-gram table across servers); SSM_DTYPE=float32 raises the dflash block default to 1680; BLOCK_SIZE must be a multiple of 48. KV_OFFLOAD_GB adds --kv-transfer-config (OffloadingConnector/TieringOffloadingSpec) + disable_eagle_block_drop:true (vLLM #52735)."

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/qwen3-8-flash-next-w4a16-2x-cmp-170hx-tp2-dflash2-host-ram-ple.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/qwen3-8-flash-next-w4a16-2x-cmp-170hx-tp2-dflash2-host-ram-ple.json

Engine

Install note: One command from fresh clone after one-time host setup: git clone https://github.com/ElectroHobo/qwen38-flash-next-w4a16-2x-cmp170hx-recipe && cd qwen38-flash-next-w4a16-2x-cmp170hx-recipe && ./start.sh (preflight checks -> engine image pull -> checkpoint download at pinned HF revision -> detached launch -> /health wait -> two-request boot check); docker compose up is the equivalent. First start compiles kernels (~17 min), later starts ~5 min. DFLASH mode bind-mounts two engine files from patches/ over the image's (drafter capture hook + speculation-method check, 48 lines, over /opt/vllm-src/vllm/models/qwen4_exp/nvidia/model.py and config.py); SPEC_MODE=mtp runs the checkpoint's MTP head unmodified. Host: 2x CMP 170HX 64 GiB PCIe x16 (capacitor mod), P2P verified at start, driver >=580 (measured 610.57.04), 96 GB host RAM MINIMUM (51 GB is the n-gram table; measured on 204 GiB), ~130 GiB disk.

Model

Context

  • max context: 256K tokens

KV pool

  • 1,475,836 tokens across concurrent requests

Performance

Speed by context

ContextConc.PrefillDecodeTTFT
10—4696 tok/s——reported
262,1441—241.2 tok/s—reported
262,1448—894.5 tok/s—reported
262,144128—1937.3 tok/s—reported
272,3841—349.7 tok/s—reported
272,3848—986.8 tok/s—reported
282,6241—198.4 tok/s—reported
282,6248—769.7 tok/s—reported

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

reported

notesclaimed_by=submitter T0 (author's own bench, Morrowmake protocol; 0.2.0 release run measured 2026-10-18/23 from a fresh clone at e8862d945b; 74 SMs/card, P2P on, 180 W/card, PCIe x16, dual Xeon E5-2697A v4 / 204 GiB). Single-user median of 5, aggregates median of 3; context_len markers +10240/+20480 = code/prose rows; c2/c4 values in point notes. 128-user rows are the release concurrency_sweep.py (700-token replies, temp 0): 1,937.3 tok/s DFlash 2, 1,966.3 MTP. A development mixed-load script (different prompts per request, not in the repo) measured 1,555 DFlash 2 / 1,814 MTP at 128 users. Code editing one user: 495 tok/s DFlash 2, 271 MTP. Quality (thinking on, temp 0.6, 16k budget): HumanEval 162/164, GSM8K 198/200. KV offload (0.1.0-era figures, carried): 100k ctx evicted by 1.8M tokens restored in 0.89 s (21-22 s without). Comparators (their columns, not re-run): Morrowmake EXL3 152.8 c1, 2651 prefill; AlexBrandes 250.8 c1 / 999.5 c8; mannydelrio 192.4 c1 / 986.4 c8.

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

Community ingest of ElectroHobo's recipe (MIT), made to the shape of Morrowmake's community-recipes guidelines, which state Morrowmake has not tested/endorsed it and neither has halt95. All perf numbers are the author's own measurements (claimed_by=submitter T0, bench harness + raw result files in-repo bench/results/release-0.2.0/) - import via POST /api/v1/benchmarks to upgrade. Measured on x16-capacitor-modded cards with P2P verified; PCIe-gen2-x8 no-P2P rigs will land near the club-3090 henrykrinkle01 numbers instead. Title shortened to land the slug inside the 64-char cut; ElectroHobo credited in provenance. Repo verified against ElectroHobo/qwen38-flash-next-w4a16-2x-cmp170hx-recipe (renamed from qwen38-flash-next-w4a16-cmp170hx-recipe, same repo id 1425969048): ingest matched HEAD ab437e0b18a8 (tag v0.1.0, 2026-10-21); perf validated at e8862d94 (tag v0.2.0, 2026-10-24) - pins, env defaults and numbers match the README exactly. Sibling recipes stay: alexbrandes PP2-mtp5 and moriyasujapan TP2+EP mtp4-fp8 - different engine paths, checkpoints and drafter.

Revision history

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)