vLLM/Recipes
Search
Qwen

Qwen/Qwen3-235B-A22B-Instruct-2507

Flagship Qwen3 MoE instruct model with 235B total and 22B active parameters, tuned for high-quality text generation.

Verified on 4x/8x H200, MI300X/MI325X/MI355X nodes (BF16 and FP8)

moe235B / 22B262,144 ctxvLLM 0.10.0+Text
Default configuration: 8× H200 · Tensor Parallel · BF16
vllm serve Qwen/Qwen3-235B-A22B-Instruct-2507 \
  --trust-remote-code \
  --tensor-parallel-size 8 \
  --enable-auto-tool-choice \
  --tool-call-parser hermes

The interactive builder loads with JavaScript. Append .md to this page's URL, query string included, for any configuration's command as Markdown — e.g. /Qwen/Qwen3-235B-A22B-Instruct-2507.md.

Overview

Qwen3 is the flagship instruct MoE model in the Qwen3 series, with 235B total parameters and 22B active parameters. This guide covers deploying the model efficiently with vLLM on NVIDIA and AMD GPUs.

Prerequisites

NVIDIA CUDA (pip)

uv venv
source .venv/bin/activate
uv pip install -U vllm --torch-backend=auto

AMD ROCm (pip)

Note: The vLLM wheel for ROCm requires Python 3.12, ROCm 7.0, and glibc >= 2.35. Use the Docker flow if your environment is incompatible.

uv venv
source .venv/bin/activate
uv pip install vllm --extra-index-url https://wheels.vllm.ai/rocm/0.14.1/rocm700

Deployment Configurations

BF16 on MI300X/MI325X/MI355X (4 GPUs)

HIP_VISIBLE_DEVICES="4,5,6,7" \
VLLM_ROCM_USE_AITER=1 \
VLLM_ROCM_USE_AITER_MHA=0 \
SAFETENSORS_FAST_GPU=1 \
vllm serve Qwen/Qwen3-235B-A22B \
  --trust-remote-code \
  -tp 4 \
  --swap-space 32 \
  --distributed-executor-backend mp \
  --max-num-batched-tokens 32768 \
  --max-model-len 32768 \
  --no-enable-prefix-caching

FP8 on MI300X/MI325X/MI355X (4 GPUs)

HIP_VISIBLE_DEVICES="4,5,6,7" \
VLLM_ROCM_USE_AITER=1 \
VLLM_ROCM_USE_AITER_MHA=0 \
SAFETENSORS_FAST_GPU=1 \
vllm serve Qwen/Qwen3-235B-A22B-FP8 \
  --trust-remote-code \
  -tp 4 \
  --swap-space 16 \
  --distributed-executor-backend mp \
  --max-num-batched-tokens 32768 \
  --max-model-len 32768 \
  --no-enable-prefix-caching

AMD MXFP4 (MI350X / MI355X)

The MXFP4 (AMD) variant serves amd/Qwen3-235B-A22B-Instruct-2507-MXFP4, an AMD Quark checkpoint with MXFP4 weights and activations. MXFP4 needs gfx950, so this variant is for MI350X and MI355X only. It runs on one GPU:

  • The weights are 126.8 GB. With an FP8 KV cache a token takes 94 KiB (94 layers x 4 KV heads x 128 x K and V). After the weights and warmup, one 288 GB GPU leaves at least 125 GiB of KV cache, about 1.4M tokens or five full 262,144-token contexts.
  • --attention-backend ROCM_AITER_FA selects the AITER flash-attention backend, and VLLM_ROCM_SHUFFLE_KV_CACHE_LAYOUT=1 stores the KV cache in the layout AITER's assembly paged-attention decode kernel reads.
  • --kv-cache-dtype fp8 stores the KV cache in FP8. The checkpoint has no KV scales, so the scales default to 1.0.
  • --block-size 16 is required with the shuffle layout: the default of 64 fails at startup, and AITER has no FP8 decode kernel for 32-token blocks.
  • SAFETENSORS_FAST_GPU=1 loads the safetensors shards directly to the GPU.

TPU Deployment

Client Usage

vllm bench serve \
  --model "Qwen/Qwen3-235B-A22B-FP8" \
  --dataset-name random \
  --random-input-len 8192 \
  --random-output-len 1024 \
  --request-rate 10000 \
  --num-prompts 16 \
  --ignore-eos \
  --trust-remote-code

Troubleshooting

  • Use --max-num-batched-tokens and --max-model-len to fit memory constraints on smaller nodes.
  • If OOM at startup, lower --max-num-batched-tokens or --max-model-len and disable prefix caching. On GPUs, vLLM sizes the KV cache from memory measured after warmup, so leave --gpu-memory-utilization unset unless the GPU is shared (details).
  • AMD builds require VLLM_ROCM_USE_AITER=1 for best performance.

References