Qwen3.8-Flash-Next W4A16-Merlin on 4x RTX 3090 — TP2xPP2+EP, MTP3, FP8 KV, 925K pool (halt95)
00 upvotes — sign in to vote sign in to votecommunity Community submission — verify on your own hardware.
recipe by halt95↗, Qwen (Qwen3.8-Flash-Next)↗, Intel AutoRound (INT4 experts)↗, RadixArk (FP8 PLE table)↗, DominikBucko (MTP INT4 packing recipe)↗, peakcrosser7 (Flash-Next vLLM branch)↗ · listed by localai-recipes
revision r19 · commit 1894bfe6ed · updated 44 h ago · license CC-BY-4.0
chat code vision agent-cache pipeline-parallel mtp-speculative long-context fp8-kv
Four-card RTX 3090 recipe for Qwen3.8-Flash-Next (125B MoE) in halt95's W4A16-Merlin build (Intel AutoRound INT4 + FP8 PLE + MTP draft, @ 17284bf): TP2 x PP2 with expert parallel, manual layer partition 25,23, FP8 KV with a 924,993-token pool (three full 262K sessions resident; block-size 4096, prefix-match-unit 64), MTP 3-token probabilistic draft with RecoverSSM, host-mapped PLE pull transport, host-resident embeddings, side-cache layout + Model Runner V2, 42 images/request. Agent-focused: 92.5% of follow-up prompt tokens from cache across 8 sessions, median follow-up first token 1.61 s (0.96 s solo). Maintainer-measured (submitter T0, v2.5.1 bench card 2026-10-06): 5,219-5,533 tok/s cold prefill 10K-261K, 158-174 tok/s single-stream decode (thinking on), 534 tok/s aggregate at 8 concurrent, 262K needle exact, GSM8K 198/200. Engine: Merlin 3.0.2.2 wheel (vLLM 0.33.0) @ 5522dd9; argv from tools/merlin/launch.py fn-quad-3090 @ 7a4b3e3; perf rows: 2026-10-06 card (v2.5.1 build).
Launch command
./venv/bin/vllm serve '~/models/Flash-Next-Merlin' --served-model-name flash-next-v2 flash-next flash-mtp flash-next-mtp --host 127.0.0.1 --port 8000 --tensor-parallel-size 2 --pipeline-parallel-size 2 --enable-expert-parallel --disable-custom-all-reduce --speculative-config '{"method":"mtp","num_speculative_tokens":3,"draft_sample_method":"probabilistic"}' --max-model-len 262144 --max-num-seqs 8 --max-num-batched-tokens 1056 --gpu-memory-utilization 0.96 --kv-cache-memory-bytes 4100000000 --kv-cache-dtype fp8_e4m3 --limit-mm-per-prompt '{"image":42,"video":0}' --mm-processor-cache-gb 0 --mm-processor-kwargs '{"size":{"longest_edge":8388608,"shortest_edge":65536}}' --compilation-config '{"cudagraph_mode":"FULL_AND_PIECEWISE","cudagraph_capture_sizes":[1,2,3,4,6,8,12,16,24,32]}' --enable-prefix-caching --mamba-cache-mode align --enable-prompt-tokens-details --long-prefill-token-threshold 512 --no-enable-flashinfer-autotune --enable-auto-tool-choice --tool-call-parser qwen3_coder --reasoning-parser qwen3 --override-generation-config '{"temperature":1.0,"top_p":0.95,"top_k":20,"min_p":0.0,"presence_penalty":0.0,"repetition_penalty":1.0}' --kernel-config '{"qsa_warmup_use_serving_bounds":true,"reuse_gdn_prefill_warmup":true,"persist_triton_autotune":true}' --chat-template models/qwen38-27b/templates/froggeric-qwen-v22.5.jinja --default-chat-template-kwargs '{"enable_thinking": true, "reasoning_effort": "medium"}' --shutdown-timeout 60 --block-size 4096 --use-replayssm --prefix-match-unit 64 --enable-mamba-shared-prefix-checkpoint --sse-keep-alive-interval 15runtime
env: 'VENV=./venv TREE=<repo> | CUDA_VISIBLE_DEVICES=0,1,2,3 | CUDA_DEVICE_ORDER=PCI_BUS_ID | VLLM_SKIP_P2P_CHECK=1 NCCL_P2P_LEVEL=SYS NCCL_PROTO=Simple VLLM_ALLREDUCE_USE_FLASHINFER_PCIE_IPC=1 | VLLM_PP_LAYER_PARTITION=25,23 | VLLM_PLE_OFFLOAD_READY_TIMEOUT=1800 | VLLM_PLE_OFFLOAD_HOME_DEVICE=0 | VLLM_HOST_EMBED_TABLE=1 | VLLM_USE_BREAKABLE_CUDAGRAPH=0 | VLLM_QSA_KV_SCALES=<repo>/models/flash-next/scales/qsa_kv_scales_262k.json (launcher default, required — without it FP8 KV runs at scale 1.0; SCALES= overrides) | VLLM_CACHE_ROOT=<repo>/.vllm-cache | HF_HUB_OFFLINE=1 HF_DATASETS_OFFLINE=1 | VLLM_NO_USAGE_STATS=1 DO_NOT_TRACK=1 | MERLIN_FULL_K=1 MERLIN_QSA_SORT=1 MERLIN_TIE_DET=1 MERLIN_TIE_RECENT=1 MERLIN_TOPK_SORTED_EMIT=1 | VLLM_E2_GUARD_MODE=warn | VLLM_USE_V2_MODEL_RUNNER=1 VLLM_E2_PLE_FAST_IDS=1 VLLM_E2_PLE_EARLY_REQUEST=1 | PYTHONPATH=<repo> VLLM_MEMORY_PROFILER_ESTIMATE_CUDAGRAPHS=0 (all set by tools/merlin/launch.py --profile fn-quad-3090 @ 7a4b3e3, P2P=on row, captured 2026-11-27 via SERVE_PRINT_ENV_AND_EXIT=1; P2P=ipc switches the NCCL group; --swarm raises seqs to 24 with the KV RAM cache at >=12 GiB/rank). Retired in 3.0.x — behavior built in, stale exports refused: VLLM_E2_PLE_PULL_TRANSPORT, VLLM_E2_SIDE_CACHE_LAYOUT, VLLM_E2_MAMBA_RETAIN_CHECKPOINT. Opt-in: AUTO_TOPO=1 topology selector; COUNTERS=1 logging-only counters; HOST=0.0.0.0 then set VLLM_API_KEY.'
notes: "Run path (Merlin 3.0.2.2, author's current lane): clone halt95/merlin-engine @ 5522dd9 (tag merlin-v3.0.2.2; docs tip 7a4b3e3), download the merlin-v3.0.2.2 wheel from its release, MERLIN_WHEEL=<whl> bash release/install-env.sh ./venv, hf download halt95/Qwen3.8-Flash-Next-W4A16-Merlin --local-dir ~/models/Flash-Next-Merlin (115 GiB; the repo's models/flash-next/checkpoint.sha256 pins revision cec53e9f — config.json byte-identical to the served 17284bf pin), then venv/bin/merlin serve ~/models/Flash-Next-Merlin — hardware auto-match selects profile fn-quad-3090 (tested, 4x sm_86 24 GB P2P on) and execs vllm serve with the argv above; ready when 'merlin: Ready' prints. Startup ~5-6 min first boot (kernel JIT), 2-3 min after; the engine reports 'GPU KV cache size: 924,993 tokens' on every boot on the reference host. Requirements: 4x RTX 3090 (sm_86) headless, P2P recommended via the aikitoria open-kernel-module driver (runs without, slower prefill), no NVLink; 96 GB host RAM (3.0.x measured floor: 72 GiB booted, 64 GiB OOM-killed; n-gram table ~48 GiB + ~4.2 GiB pinned embeddings), /dev/shm >= 1 GB, ~250 GB disk. The checkpoint config needs ple_embedding_dtype: float8_e4m3fn inside text_config (verified byte-present at both checkpoint pins). Archived v2.5.1 lane: the legacy release assets (source bundle + compiled-ops tarball @ 28cbb72) remain published (HTTP 200, re-verified 2026-11-27) and reproduce as published via scripts/serve-v2.5.sh — now a deprecation shim at HEAD. PROVENANCE GAP, disclosed: the perf rows stay the 2026-10-06 bench card's numbers (vLLM v0.30.0 v2.5.1 build) — NO maintainer number exists for the 4x24 GB config on 3.0.2.2; the 2026-11-21 card re-measured only the 4x20 GB-emulated row and states verbatim the 24 GB row 'keeps its [2026-11-12 card] figures'. Launch argv/env were re-checked against the 3.0.2.2 launcher on 2026-11-27 (flag survival, not a performance measurement)."
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-merlin-on-4x-rtx-3090-tp2xpp2-ep-mtp3-f.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-merlin-on-4x-rtx-3090-tp2xpp2-ep-mtp3-f.jsonDownloads
- Weights https://huggingface.co/halt95/Qwen3.8-Flash-Next-W4A16-Merlin17284bf480a624aa6f1338a03c146ce8b2b6acc9 — 4-bit build of Qwen3.8-Flash-Next (Intel AutoRound W4A16 experts + FP8 PLE + MTP draft), FP8-KV-ready config; config.json byte-identical to the author's 3.0.2.2 checkpoint pin cec53e9f90e5995b81691604ec0b32191debf797 (models/flash-next/checkpoint.sha256)
- Engine image https://github.com/halt95/merlin-engine/releases/download/merlin-v3.0.2.2/vllm-0.33.0+merlin3.0.2.2.c56eeed392-cp313-cp313-linux_x86_64.whlvllm-0.33.0+merlin3.0.2.2.c56eeed392-cp313-cp313-linux_x86_64.whl — sha256 309922f41b86d916886c17e0117b4778827f0bce56dcaf465116b8dcc229724a (release/merlin-wheel.sha256, asset .sha256 verified 2026-11-27); c56eeed392 is a build id, not a repo commit — native tree ids bound via release/merlin-wheel.native; supersedes the dead fork-commit pointer 96a0d13b
- Reference https://github.com/halt95/merlin-engine7a4b3e37678c97be594fe6af937c262e2fae388b — source recipe lane @ HEAD (tools/merlin/launch.py --profile fn-quad-3090 is the verbatim argv source; models/flash-next/serve.sh, release/install-env.sh, models/flash-next/checkpoint.sha256, benchmarks/2026-11-21/ all at this commit; 28cbb72 is the archived v2.5.1-lane source), replacing the stale '@ HEAD' wording that still named 28cbb72
Revision notes
Community ingest of halt95/qwen38-flash-next-3090s @ 28cbb7293f134c244b443fb43bbf6e74ff4d8e24, release v2.5.1 (owner-named by Casey Oct 6; repo pushed 2026-10-06; Apache-2.0 + Qwen Community 1.0 for weights). Launch argv transcribed verbatim from scripts/serve-v2.5.sh @ 28cbb72 (selector-off legacy path, token-level checked against the raw script before POST); env exports verbatim from the same script. Perf numbers are the maintainer's 2026-10-06 bench card, logged claimed_by=submitter T0. Credits per the repo's own Credits section: Qwen (base), Intel AutoRound + RadixArk (quant components), DominikBucko (MTP packing), peakcrosser7 Flash-Next branch behind vLLM PRs #53896/#53899, aikitoria open-kernel-module P2P patch. Sibling repo halt95/Swift1.5-qwen38-flash-next-3090s is a post-train variant — NOT in scope this wave.
2026-11-27 (t_243162ea, owner-approved Option B): engine re-pinned to Merlin 3.0.2.2 — vLLM 0.33.0 base, tag merlin-v3.0.2.2 = 5522dd9 (repo tip 7a4b3e3, shared with halt95/qwen38-flash-next-3090s); published only as wheel vllm-0.33.0+merlin3.0.2.2.c56eeed392-cp313 (sha256 309922f4…29724a). The old fork pin 96a0d13b stopped resolving after the fork was folded into the monorepo, and the v2.5.1 route is deprecated at HEAD (scripts/serve-v2.5.sh is a shim to models/flash-next/serve.sh). Launch argv + env re-checked 2026-11-27 via the author's launcher hook (SERVE_PRINT_ENV_AND_EXIT=1, tools/merlin/launch.py --profile fn-quad-3090): flag deltas recorded in config (custom-all-reduce off, kv-cache-memory-bytes rename, chunk 1056, LPT 512, mamba flags, kernel-config, froggeric chat template, effort medium, image cap 8388608, NCCL_PROTO Simple); no GPU re-boot. Perf rows intentionally UNCHANGED: no maintainer number exists for this 4x24 GB config on 3.0.2.2 — the 2026-11-21 card re-measured only the 4x20 GB-emulated row.
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
- 0b72bb0940 recipe: update qwen3-8-flash-next-w4a16-merlin-on-4x-rtx-3090-tp2xpp2-ep-mtp3-f (r5: /config/runtime) 28 d ago diff
- 423a58839f recipe: update qwen3-8-flash-next-w4a16-merlin-on-4x-rtx-3090-tp2xpp2-ep-mtp3-f (r4: /artifacts, /engine) 34 d ago diff
- d2343f0bc9 recipe: update qwen3-8-flash-next-w4a16-merlin-on-4x-rtx-3090-tp2xpp2-ep-mtp3-f (r3: /artifacts, /engine, /provenance/credit, /provenance/source_urls) 36 d ago diff
- b634985e6a recipe: update qwen3-8-flash-next-w4a16-merlin-on-4x-rtx-3090-tp2xpp2-ep-mtp3-f (r2: /max_context_len, /kv_pool_tokens, /storage_requirements) 45 d ago diff
- 34599cc52c recipe: create qwen3-8-flash-next-w4a16-merlin-on-4x-rtx-3090-tp2xpp2-ep-mtp3-f 59 d ago
Fork
Sign in to fork this recipe — a fork is your own copy; you own it and only you can update it.