# Qwen/Qwen3-30B-A3B-Thinking-2507 — vLLM serving recipe

> Thinking-only Qwen3 MoE model (30.5B total / 3.3B active) with a 262K context, with an AMD PTPC FP8 variant for Instinct GPUs

Configuration: hardware `h200` (8× H200) · strategy `single_node_tp` (Tensor Parallel) · variant `default` (BF16) · features `tool_calling`, `reasoning`

- Interactive page: https://recipes.vllm.ai/Qwen/Qwen3-30B-A3B-Thinking-2507
- This configuration as JSON: https://recipes.vllm.ai/Qwen/Qwen3-30B-A3B-Thinking-2507.json?hardware=h200

The commands below were rendered for exactly this configuration and take precedence over any example in the guide.

## Other configurations

Change the query string (the same parameters as the page URL) and fetch this URL again. Unknown or incompatible values fall back to the recipe default, so check the Configuration line.

- `hardware`: `h100`, `h200`, `b200`, `gb200`, `b300`, `gb300`, `mi300x`, `mi325x`, `mi350x`, `mi355x`
- `variant`: `default`, `amd_ptpc_fp8`
- `strategy`: `single_node_tp`, `single_node_tep`, `single_node_dep`, `multi_node_tp` (multi-node strategies also need `nodes=<n>`)
- `features`: comma-separated list of `tool_calling`, `reasoning` (default: `tool_calling`, `reasoning`). Use `features=none` to turn them all off.

## Install

Requires vLLM >= 0.10.0.

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

Docker image: `vllm/vllm-openai:latest`

## Serve

```bash
vllm serve Qwen/Qwen3-30B-A3B-Thinking-2507 \
  --tensor-parallel-size 1 \
  --enable-auto-tool-choice \
  --tool-call-parser hermes \
  --reasoning-parser qwen3
```

Docker equivalent:

```bash
docker run --gpus all \
  --privileged --ipc=host -p 8000:8000 \
  -v ~/.cache/huggingface:/root/.cache/huggingface \
  vllm/vllm-openai:latest Qwen/Qwen3-30B-A3B-Thinking-2507 \
  --tensor-parallel-size 1 \
  --enable-auto-tool-choice \
  --tool-call-parser hermes \
  --reasoning-parser qwen3
```

## Guide

> Background reference. Commands in it are examples and may target another configuration — use the Serve section above.

### Overview

[Qwen3-30B-A3B-Thinking-2507](https://huggingface.co/Qwen/Qwen3-30B-A3B-Thinking-2507)
is the July 2025 thinking-only update of Qwen3-30B-A3B: a mixture-of-experts model
with 30.5B total and 3.3B active parameters (128 experts, 8 active), 48 layers and
a native 262,144-token context. Unlike the hybrid
[Qwen3-30B-A3B](https://huggingface.co/Qwen/Qwen3-30B-A3B), it always thinks: the
chat template opens the `<think>` block, so the output contains only the closing
`</think>`. The Qwen3 reasoning parser handles this and returns the trace in
`message.reasoning`.

#### AMD PTPC FP8 (MI300X / MI325X / MI350X / MI355X)

The PTPC FP8 (AMD) variant serves
[amd/Qwen3-30B-A3B-Thinking-2507-PTPC-FP8](https://huggingface.co/amd/Qwen3-30B-A3B-Thinking-2507-PTPC-FP8),
an AMD Quark checkpoint with per-channel FP8 weights and dynamic per-token FP8
activations. It runs on one GPU:

- The weights are 31.2 GB. With an FP8 KV cache a token takes 48 KiB
  (48 layers x 4 KV heads x 128 x K and V), so a full 262,144-token sequence
  needs 12 GiB. After the weights and warmup, one MI300X leaves at least
  130 GiB of KV cache, about 2.9M tokens.
- `--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.

The first AITER launch may take several minutes while ROCm kernels are compiled
and cached.

### Client Usage

The model card recommends temperature 0.6, top-p 0.95 and top-k 20, and an output
budget of 32,768 tokens for most tasks (81,920 for competition math and code).

```python
from openai import OpenAI

client = OpenAI(base_url="http://localhost:8000/v1", api_key="unused")
response = client.chat.completions.create(
    model="Qwen/Qwen3-30B-A3B-Thinking-2507",
    messages=[{"role": "user", "content": "How many primes are there below 100?"}],
    temperature=0.6,
    top_p=0.95,
    max_tokens=32768,
    extra_body={"top_k": 20},
)
print(response.choices[0].message.reasoning)
print(response.choices[0].message.content)
```

Use the served model id (for example `amd/Qwen3-30B-A3B-Thinking-2507-PTPC-FP8`)
as `model` when serving a variant.

### References

- [Model card](https://huggingface.co/Qwen/Qwen3-30B-A3B-Thinking-2507)
- [AMD PTPC FP8 checkpoint](https://huggingface.co/amd/Qwen3-30B-A3B-Thinking-2507-PTPC-FP8)
- [AMD Quark](https://quark.docs.amd.com/latest/index.html)
