localairecipes launch configs for local inference

Qwen3.8-Flash-Next W4A16 2x CMP 170HX TP2+EP MTP4 FP8 PLE 92GB Host

00 upvotes — sign in to vote sign in to vote

community Community submission — verify on your own hardware.

recipe by moriyasujapan (recipe, local FP8 PLE conversion, measurements)↗, alesha-pro/qwen38-flash-next-4x3090 (PLE offload overlays + manifest tooling, pinned not vendored)↗, VnimanieAI (base W4A16 quantization)↗, trohrbaugh (heretic-2 refusals-removed checkpoint) + densohax (its W4A16 quantization)↗, loktar00/qwen38-flash-next-vllm-3090-recipe (starting settings + MTP findings)↗, RadixArk/Qwen3.8-Flash-Next-NVFP4 (FP8 PLE layout reproduced bit-identically)↗ · listed by localai-recipes

revision r2 · commit e55df425b6 · updated 10 d ago · license CC-BY-4.0

chat code mtp-speculative bf16-kv sm80 moriyasujapan low-ram-host fp8-ple-offload ple-conversion tp2-expert-parallel heretic-uncensored docker-image

vLLM recipe for plain Qwen3.8-Flash-Next W4A16 on two STOCK CMP 170HX (Gen2 x16, no P2P) on a LOW-RAM 92 GiB host. Differentiator: the 95.4 GiB BF16 PLE table is converted LOCALLY to FP8 E4M3 (amax/448 global scale) into alesha-pro's offload-overlay layout - scale bit-identical to RadixArk's published FP8 PLE, no second 180 GB download - halving host residency to 47.7 GiB. Serves refusal-removed heretic-2 (densohax W4A16) via the image's AutoGPTQ path (BF16 MTP head grafted); MODEL_DIR=$BASE_MODEL_DIR serves the Vnimanie base. Pinned vLLM image + alesha-pro overlays read-only. TP2 + expert-parallel REQUIRED (MoE 640/2 fails group 128), MTP k=4, BF16 KV, seqs 8, batched tokens 8192 + 17.6 GiB KV/card (Oct 7 retune), 262K ctx. Measured (base ckpt, median of 3): decode 104.5 ja / 101.1 en / 114.0 list / 173 code @64K, 392 agg @4 conc, prefill 2637-3068, 200K needle 11/12. Negatives: FP8 KV -6..-11% decode, PP unsupported by PLE offload, 4096 batched tokens 500s, xhigh trap (use medium).

Launch command

'GPUS=1,2 ./scripts/run.sh' '# docker run (inside run.sh) exec: vllm image entrypoint:' /model --served-model-name flash-next-w4a16 --tensor-parallel-size 2 --enable-expert-parallel --max-model-len 262144 --max-num-seqs 8 --max-num-batched-tokens 8192 --gpu-memory-utilization 0.92 --kv-cache-dtype auto --compilation-config '{"mode":0,"cudagraph_mode":"FULL_DECODE_ONLY"}' --speculative-config '{"method":"mtp","num_speculative_tokens":4}' --kv-cache-memory 18897856102 --enable-auto-tool-choice --tool-call-parser qwen3_xml --reasoning-parser qwen3 --no-enable-flashinfer-autotune --host 0.0.0.0 --port 18024

runtime

env: 'GPUS=<two 170HX indices or UUIDs, required> | VLLM_PLE_CPU_OFFLOAD=1 | VLLM_PLE_MODEL_PATH=/ple-model | VLLM_PLE_MANIFEST=/ple-manifest/manifest.json | VLLM_PLE_EMBEDDING_DTYPE=float8_e4m3fn | PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True | VLLM_HTTP_TIMEOUT_KEEP_ALIVE=75 | HF_HOME=/hf-cache | TORCHINDUCTOR_CACHE_DIR=/compile-cache/torchinductor | (docker: --cap-add SYS_PTRACE --security-opt seccomp=unconfined --ipc=host --restart unless-stopped)'
notes: "Serve profile = scripts/run.sh @ dc8e0c1e402988c48162425d3cb3c822a48f68bc with scripts/env.sh defaults, transcribed token-for-token (defaults are the Oct 7 heretic-2 retune: batched tokens 8192 + 17.6 GiB KV/card; README Results tables = PRE-update config 1024/24383208960 on the base Vnimanie checkpoint - both recorded). Serves densohax/Qwen3.8-Flash-Next-heretic2-W4A16-FP8PLE @ 705a2ce7f529f61bcd94723bcde66866e0b63286 by default (heretic-2 = trohrbaugh/Qwen3.8-Flash-Next-heretic-2 @ 207cd22c347a, refusals removed; AutoRound W4A16 reworked by prepare-heretic2.sh into the image's AutoGPTQ path: w4 g128 sym, only routed experts quantized (73,728 qweight tensors under .experts.), dynamic -:.*mtp.* keeps MTP head BF16, Marlin experts; base checkpoint's BF16 MTP head grafted as model-mtp-graft.safetensors 4.9 GiB; base tokenizer/chat template byte-identical after rewrite; heretic generation_config stops on 248044 only vs base 248046+248044; repo's own FP8 PLE shards NOT downloaded - locally derived table from the base checkpoint is used). MODEL_DIR=$BASE_MODEL_DIR serves VnimanieAI/Qwen3.8-Flash-Next-W4A16 @ 9236d703b25f25eb5c17e9640204f84fa1ce0c6e (checkpoint every Results-table number was measured on). Expert parallel NOT optional (moe_intermediate_size 640/TP2=320 not divisible by group 128). KV_CACHE_MEMORY= (empty) falls back to gpu-memory-utilization 0.92 sizing (15.5 GiB, 1,016,505 KV tokens, safe side); MAX_NUM_BATCHED_TOKENS=1024 KV_CACHE_MEMORY=24383208960 restores the measured-Results configuration. FP8 KV available via KV_CACHE_DTYPE=fp8_e4m3 + QSA_SCALES=<scales.json> (calibrated example shipped: results/fp8-kv-scales-w4a16-tp2-mtp4.json - MTP drafter's attention layer has no entry in alesha-pro's file so per-composition calibration was required); QSA overlay files mount only in fp8/calibration modes. Measured startup 5 min 50 s (weights 103 s, MTP drafter 9 s, FP8 PLE ~40 s, engine init + CUDA graphs 122 s). Peak disk ~335 GB during preparation (179.8 base + 74 heretic-2 + 51.3 FP8 PLE + 28.8 image; base deletable to ~155 GB). Host RAM: container 61.2 GiB (PLE worker 48.4 GiB) on the 91.9 GiB host; ~64 GiB free required. Cards unmodded: 70 SMs, PCIe Gen2 x16 (lspci LnkSta 5 GT/s x16 - NOT x4; 6.6 GB/s pinned host-device = ~83% of ceiling), no P2P (can_device_access_peer false), HW Power Brake Slowdown Not Active. If a 170HX runs far below these numbers check motherboard PWRBRK# first (cross-ref allover326/deepseek-v4-cmp170hx troubleshooting). Bench method: bench/bench.py streaming, temp 0.7, reasoning_effort medium, decode = (completion-1)/(last-first) excluding TTFT, completion includes reasoning, prefill = prompt/TTFT with random nonce to defeat prefix cache, fresh container per config, median of 3. Chat template defaults reasoning_effort xhigh - xhigh never answered within a 20K budget in 5 of 6 runs (send chat_template_kwargs {\"reasoning_effort\": \"medium\"}; valid xhigh/medium/low, high rejected). Optional LiteLLM gateway config gateway/litellm-config.yaml (motivated the keep-alive fix)."

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-ep-mtp4-fp8-ple-92gb-h.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-ep-mtp4-fp8-ple-92gb-h.json

Engine

Install note: setup.sh @ dc8e0c1e: clone alesha-pro/qwen38-flash-next-4x3090 into vendor/ @ 9b36aaec3f604d726c6b751e29f7de8225fc203b (env.sh OVERLAY_REV); docker pull vllm/vllm-openai:qwen38-flash-next-x86_64-cu130 (digest sha256:0aea30240f... live 2026-10-08). run.sh mounts 8 overlays read-only INTO the image's vLLM tree (ple_layer.py, ple_offload/worker.py + ple_external_source.py, gpu_worker.py, multiproc_executor.py, qwen_gdn_linear_attn.py, shared_experts.py; +qsa.py/ops_qsa.py fp8-KV only). Builds: download-model.sh, build-ple-fp8.sh -> quantize_ple_fp8.py (BF16 PLE -> FP8 E4M3 + manifest), download-heretic2.sh, prepare_heretic2.py (GPTQ rewrite + MTP graft). Serve: GPUS=<idx/UUIDs> ./scripts/run.sh. Launch token-for-token from run.sh + env.sh @ dc8e0c1e: len 262144, seqs 8, batched 8192 (Oct 7 retune), util 0.92, KV auto, kv-mem 18897856102, spec mtp k4; docker --ipc=host --cap-add SYS_PTRACE --security-opt seccomp=unconfined. Full env+flag dump in config.runtime.env.

Model

Context

  • max context: 256K tokens

Performance

Speed by context

ContextConc.PrefillDecodeTTFT
65,5361—104.5 tok/s—reported
65,5364—333 tok/s—reported
200,08712839 tok/s69 tok/s70500 msreported
262,1441—101.3 tok/s—reported
262,1444—392 tok/s—reported

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

reported

notesAuthor-measured on the BASE Vnimanie checkpoint with the then-default config (262144 ctx, MTP k=4, max-num-seqs 8, batched tokens 1024, BF16 KV, kv-cache-memory 24383208960; 64K rows measured at --max-model-len 65536 before the default moved) - README Results tables + results/2026-09-21-sweep.jsonl @ dc8e0c1e402988c48162425d3cb3c822a48f68bc, 2026-09-21. claimed_by=submitter T0 - no run file ingested; import via POST /api/v1/benchmarks to upgrade. Heretic-2 (current default serve target) measured separately (bench-of-us depth ladder, PRE-retune defaults): 32K prefill 3323 / decode 186.2 synthetic (accept 0.94) / 97.1 real (0.39); 128K 2994/184.6/89.1; 258K 2575/178.3/69.7 - synthetic-vs-real 2.6x gap = MTP acceptance alone; NOT comparable with the base bench.py tables.

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

Ingested from GitHub repo moriyasujapan/qwen38-flash-next-vllm-2x170hx @ dc8e0c1e402988c48162425d3cb3c822a48f68bc (lar-scout ingest, kanban t_cbb08e7d). Repo created 2026-09-21; Oct 7 commit made heretic-2 the default serve target and retuned defaults to batched tokens 8192 + 17.6 GiB KV - launch transcribed from scripts @ HEAD, NOT from README tables (which document the pre-update config on the base checkpoint; both recorded here). 4th 2x CMP 170HX Qwen3.8-Flash-Next recipe on site: distinct checkpoint row (VnimanieAI plain W4A16 vs mannydelrio Uncensored-AWQ / DUFRelic INT4PLE / bozocentral INT4-Mixed / bluespace3 albucino W4A16-FP8PLE), distinct topology (TP2+expert-parallel vs the PP2 builds), distinct trick (LOCAL FP8 conversion of the PLE table with RadixArk-bit-identical scale instead of off-the-shelf quant checkpoints), distinct constraint story (92 GiB host RAM). Recipe code Apache-2.0; weights under the Qwen Community License (no weights in repo). Dedupe nuance flagged to owner at ingest: 4th/5th 2x170HX flash-next recipe - droppable on owner word if coverage considered saturated.

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)