{"slug":"qwen3-8-flash-next-w4a16-merlin-on-4x-rtx-3090-tp2xpp2-ep-mtp3-f","title":"Qwen3.8-Flash-Next W4A16-Merlin on 4x RTX 3090 \u2014 TP2xPP2+EP, MTP3, FP8 KV, 925K pool (halt95)","summary":"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).","license":"CC-BY-4.0","tier":"community","beta":false,"revision":{"no":19,"commit_sha":"1894bfe6ed6e13c0a47764941454a5febe1cbb1a","content_hash":"52af169e1859f58296f826cdad1808c8c54746d3","created_at":"2026-11-26 21:52:04.061448-07","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 \u2014 NOT in scope this wave.\n\n2026-11-27 (t_243162ea, owner-approved Option B): engine re-pinned to Merlin 3.0.2.2 \u2014 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\u202629724a). 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 \u2014 the 2026-11-21 card re-measured only the 4x20 GB-emulated row."},"engine_source":{"type":"fork","git_url":"https://github.com/halt95/merlin-engine","base_engine":"vllm","pip_package":null,"base_version":"Merlin 3.0.2.2 (vLLM 0.33.0 base)","image_digest":null,"install_note":"Wheel install \u2014 Merlin 3.0.2.2 is published ONLY as a wheel: clone halt95/merlin-engine, download vllm-0.33.0+merlin3.0.2.2.c56eeed392-cp313-cp313-linux_x86_64.whl (+ its .sha256) from the merlin-v3.0.2.2 release, then MERLIN_WHEEL=<whl> bash release/install-env.sh ./venv \u2014 the installer checks the wheel against release/merlin-wheel.sha256 (sha256 309922f4\u202629724a, verified 2026-11-27) and the checkout's native tree ids against release/merlin-wheel.native; without MERLIN_WHEEL it builds from source (~1.5 h on 8 cores). Serve: venv/bin/merlin serve <ckpt-dir> (profile auto-match) or tools/merlin/launch.py --profile fn-quad-3090. Needs python 3.13 (cp313), CUDA 13.0 toolkit (installer pulls the nvcc wheel), ninja/C compiler for first-serve FlashInfer/Triton JIT; compiled ops sm_86. The legacy v2.5.1 bundle route (scripts/build-v2.5.sh @ 28cbb72) still reproduces \u2014 release assets published \u2014 but is deprecated at HEAD (scripts/serve-v2.5.sh is now a shim).","pinned_commit":"5522dd91266d42b628ba2ffab801b364ed5e384c"},"credit":[{"name":"halt95","url":"https://github.com/halt95/merlin-engine"},{"name":"Qwen (Qwen3.8-Flash-Next)","url":"https://huggingface.co/Qwen/Qwen3.8-Flash-Next"},{"name":"Intel AutoRound (INT4 experts)","url":"https://huggingface.co/Intel/Qwen3.8-Flash-Next-W4A16-AutoRound"},{"name":"RadixArk (FP8 PLE table)","url":"https://huggingface.co/RadixArk/Qwen3.8-Flash-Next-NVFP4"},{"name":"DominikBucko (MTP INT4 packing recipe)","url":"https://github.com/DominikBucko/qwen38-flash-next-2x3090"},{"name":"peakcrosser7 (Flash-Next vLLM branch)","url":"https://github.com/peakcrosser7/vllm/commits/release/qwen38next_offload"}],"author":{"name":"localai-recipes","isSite":false},"uploaded_by":"localai-recipes","config":{"launch":["./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","15"],"runtime":{"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 \u2014 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 \u2014 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 \u2014 config.json byte-identical to the served 17284bf pin), then venv/bin/merlin serve ~/models/Flash-Next-Merlin \u2014 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 \u2014 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) \u2014 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)."},"kv_pool_tokens":924993,"max_context_len":262144,"storage_requirements":{"ram_gb":96}},"models":[{"slug":"qwen3-8-flash-next-w4a16-merlin","name":"Qwen3.8-Flash-Next-W4A16-Merlin","hf_repo":"halt95/Qwen3.8-Flash-Next-W4A16-Merlin","quant":"w4a16-fp8-kv"}],"hardware":[{"slug":"rtx-3090-x4","vendor":"nvidia","card":"RTX 3090","card_family":"rtx-3090","vram_gb":24,"device_count":4}],"generation":"ampere","tags":["agent-cache","fp8-kv","long-context","mtp-speculative","pipeline-parallel"],"tasks":["chat","code","vision"],"aa":{"aa_index":28.5799999999999982946974341757595539093017578125,"aa_provenance":"measured","aa_source_url":"https://artificialanalysis.ai/models/qwen3-8-flash-next","aa_index_version":null,"aa_methodology_version":"v5.0.1","aa_published_fetched_at":"2026-11-18 22:27:52.619159-07","aa_family_slug":"qwen3-8-flash-next","aa_resolved_slug":"qwen3-8-flash-next"},"performance":[{"claimed_by":"submitter","metrics":"{\"notes\": \"Maintainer bench card benchmarks/2026-10-06/BENCH-CARD.md (repo @ 28cbb72, reference host 4x RTX 3090 220 W PCIe P2P driver 610.43.02, submitter T0 \u2014 no run file ingested; import via POST /api/v1/benchmarks to upgrade). Single-stream decode (thinking on, MTP): 157.9 tok/s @4K, 159.2 @32K, 161.8 @131K, 174.3 @261K (thinking off ~115-118). Aggregate 533.7 tok/s at N=8, 124.4 at N=1. Cold prefill (ctx_pp medians): 5,219 tok/s @10K to 5,236 @261K (peak 5,533 @50K). Follow-up cache reuse 92.5% @8 sessions (v2.2.0: 7.5%), median follow-up TTFT 1.61 s (0.96 s one conversation). KV pool 924,993 FP8 tokens; 3x full 262K or 6x 131K sessions resident, 0 preemptions. Quality vs BF16 teacher: divergence 0.0334, 262,144-token needle exact, GSM8K 198/200, structured output 80/80.\", \"tok_s\": 533.700000000000045474735088646411895751953125, \"points\": [{\"notes\": \"bench card 2026-10-06 @ repo 28cbb72: ctx_pp 5,484 tok/s median @100K depth; ctx_tg 161.8 tok/s @131K thinking-on (ITL 19.85 ms, ~3.13 tokens/event with MTP)\", \"concurrency\": 1, \"context_len\": 131072, \"decode_tok_s\": 161.80000000000001136868377216160297393798828125, \"prefill_tok_s\": 5484}, {\"notes\": \"bench card 2026-10-06: ctx_pp 5,236 tok/s @261K; ctx_tg 174.3 tok/s thinking-on @261K; 0.96 s median follow-up first token (one conversation, 26 turns 36K-76K)\", \"ttft_ms\": 960, \"concurrency\": 1, \"context_len\": 262144, \"decode_tok_s\": 174.30000000000001136868377216160297393798828125, \"prefill_tok_s\": 5236}, {\"notes\": \"bench card 2026-10-06: aggregate 533.7 tok/s across 8 concurrent (v2.2.0 comparator 531.5); cold prefill median 5,219 tok/s @10K\", \"concurrency\": 8, \"context_len\": 4096, \"decode_tok_s\": 533.700000000000045474735088646411895751953125, \"prefill_tok_s\": 5219}], \"context_len\": 262144}"}],"perf_points":[{"id":13257,"context_len":4096,"prefill_tok_s":5219,"decode_tok_s":533.700000000000045474735088646411895751953125,"ttft_ms":null,"concurrency":8,"claimed_by":"submitter","notes":"bench card 2026-10-06: aggregate 533.7 tok/s across 8 concurrent (v2.2.0 comparator 531.5); cold prefill median 5,219 tok/s @10K"},{"id":13258,"context_len":131072,"prefill_tok_s":5484,"decode_tok_s":161.80000000000001136868377216160297393798828125,"ttft_ms":null,"concurrency":1,"claimed_by":"submitter","notes":"bench card 2026-10-06 @ repo 28cbb72: ctx_pp 5,484 tok/s median @100K depth; ctx_tg 161.8 tok/s @131K thinking-on (ITL 19.85 ms, ~3.13 tokens/event with MTP)"},{"id":13259,"context_len":262144,"prefill_tok_s":5236,"decode_tok_s":174.30000000000001136868377216160297393798828125,"ttft_ms":960,"concurrency":1,"claimed_by":"submitter","notes":"bench card 2026-10-06: ctx_pp 5,236 tok/s @261K; ctx_tg 174.3 tok/s thinking-on @261K; 0.96 s median follow-up first token (one conversation, 26 turns 36K-76K)"}],"agent":{"prompt":"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.","curl":"curl -fsSL https://localairecipes.com/api/v1/recipes/qwen3-8-flash-next-w4a16-merlin-on-4x-rtx-3090-tp2xpp2-ep-mtp3-f.json"},"requirements":null,"artifacts":[{"kind":"model_weights","pointer_type":"hf_model","pointer":"https://huggingface.co/halt95/Qwen3.8-Flash-Next-W4A16-Merlin","pin":"17284bf480a624aa6f1338a03c146ce8b2b6acc9 \u2014 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)"},{"kind":"engine_image","pointer_type":"url","pointer":"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.whl","pin":"vllm-0.33.0+merlin3.0.2.2.c56eeed392-cp313-cp313-linux_x86_64.whl \u2014 sha256 309922f41b86d916886c17e0117b4778827f0bce56dcaf465116b8dcc229724a (release/merlin-wheel.sha256, asset .sha256 verified 2026-11-27); c56eeed392 is a build id, not a repo commit \u2014 native tree ids bound via release/merlin-wheel.native; supersedes the dead fork-commit pointer 96a0d13b"},{"kind":"reference","pointer_type":"git_commit","pointer":"https://github.com/halt95/merlin-engine","pin":"7a4b3e37678c97be594fe6af937c262e2fae388b \u2014 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"}],"links":{"self":"/api/v1/recipes/qwen3-8-flash-next-w4a16-merlin-on-4x-rtx-3090-tp2xpp2-ep-mtp3-f.json","alternate":"/r/qwen3-8-flash-next-w4a16-merlin-on-4x-rtx-3090-tp2xpp2-ep-mtp3-f","describedby":"/openapi.json"},"updated_at":"2026-12-02 23:22:59.444478-07","created_at":"2026-10-06 17:12:38.288062-06","speeds":{"decode_tok_s":168.099999999999994315658113919198513031005859375,"prefill_tok_s":5360,"leaderboard":"/api/v1/leaderboard.json"}}