localairecipes launch configs for local inference

Qwen3.8-27B W8A16 MTP3 split-KV on 1x CMP 170HX

00 upvotes — sign in to vote sign in to vote

community Community submission — verify on your own hardware.

recipe by mamutou↗ · listed by localai-recipes

Initial version · updated 3 d ago · license Apache-2.0

chat code prefix-cache spec-decode patched-vllm split-kv single-gpu bf16-kv cuda-graphs mtp-speculative int8 hyperqwen mtp3 long-context

Qwen3.8-27B W8A16 (int8 g128, native MTP head, weights untouched) on ONE NVIDIA CMP 170HX 64GB (GA100/sm80, 190W), vLLM 0.32.0 + HyperQwen opt-170hx patch overlay: a Triton split-KV verify attention kernel (NSEG=16, bf16 KV) makes MTP verify scale with context. 3-run medians: single-stream decode 121 tok/s @4K (+65% vs vLLM 0.27.1 FA2), 110 @32K (+65%), 87 @128K (+382%), 69 @262K (+296%); 32K-in/128-out aggregates C4 220 / C8 218 tok/s; 262K cold prefill 335 s -> 218 s (1201 tok/s). 60-min 4-stream soak 0 failures / 0 Xid; quality 17/18 (one metric false positive). Recipe by mamutou (github.com/mamutou/cmp170hx-qwen27b-serving @ 018dba432c37).

Launch command

vllm serve /models/Qwen3.8-27B-W8A16 --served-model-name qwen3.8-27b --host 0.0.0.0 --port 18020 --gpu-memory-utilization 0.95 --max-model-len 262144 --max-num-seqs 8 --api-server-count 1 --language-model-only --attention-backend FLASH_ATTN --kv-cache-dtype bfloat16 --mamba-ssm-cache-dtype float16 --async-scheduling --max-num-batched-tokens 2048 --speculative-config '{"method":"mtp","num_speculative_tokens":3,"draft_sample_method":"probabilistic"}' --compilation-config '{"max_cudagraph_capture_size":32,"custom_ops":["+rms_norm","+silu_and_mul"],"cudagraph_mode":"PIECEWISE"}' --reasoning-parser qwen3 --enable-prompt-tokens-details --enable-auto-tool-choice --tool-call-parser qwen3_coder --tool-strict-level parameter --prefix-cache-retention-interval None --enable-prefix-caching --mamba-cache-mode align --max-num-batched-tokens 16384 --sse-keep-alive-interval 30

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-27b-w8a16-mtp3-split-kv-on-1x-cmp-170hx.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-27b-w8a16-mtp3-split-kv-on-1x-cmp-170hx.json

Engine

Install note: vLLM 0.32.0 release wheel + HyperQwen feat/170hx-decode-tuning patch overlay (NOT stock). Clone https://github.com/aiultrayang/HyperQwen-CMP170hx -b feat/170hx-decode-tuning, checkout b2e687e3a58f; python3.12 venv; pip install vllm==0.32.0 + nvidia cuda-13 toolchain pins (flashinfer-python==0.7.0.post1 rides as vllm's own pin); bash patches/apply.sh <site-packages>/vllm (~50 patches, all p1); cp opt-170hx/{envs.py,spec_decode_attn.py,flash_attn.py,triton_attn.py} into site-packages vllm. Recipe + bench provenance: mamutou/cmp170hx-qwen27b-serving @ 018dba432c37 (serve.sh env defaults, docs/). vLLM + HyperQwen upstream credited.

Model

Context

  • max context: 256K tokens

Performance

Speed by context

ContextConc.PrefillDecodeTTFT
4,0961—121 tok/s—reported
32,7681—110 tok/s—reported
32,7684—220 tok/s—reported
32,7688—218 tok/s—reported
131,0721—87 tok/s—reported
262,144—1201 tok/s—218200 msreported
262,1441—69 tok/s—reported

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

reported

notesAll numbers 3-run medians, controlled single-GPU bench (mamutou scripts/probe.py: exact token-id prompts, ignore_eos, temperature 0, warm prefix cache except 128K/262K), docs/benchmarks.md @ 018dba432c37. Single-stream decode = 1000/step-median; MTP k=3, ~3.8 tok/step accepted. Aggregate rows: 32K input / 128 output, batch_tok_s. Prefill row: cold 262K, base 335.1 s / 782 tok/s -> 218.2 s / 1201 tok/s (gain from 0.32.0 + batched tokens, not split-KV). Base arm = vLLM 0.27.1 FA2, same weights. 60-min 4-stream soak (8K in/128 out): 162 tok/s median, 164 rounds, 0 failed requests, 0 Xid, 83C/200W peak. Quality 17/18 (the repeat-detection item was a metric false positive; body-only retest 0.0% 30-gram).

Downloads

Revision notes

Initial version.

Revision history

Initial version.

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)