# Qwen/Qwen3-Coder-30B-A3B-Instruct — vLLM serving recipe

> Agentic coding Mixture-of-Experts model (30.5B total / 3.3B active) served with vLLM Ascend on Atlas 800I A3, with validated W8A8 presets for high throughput, low latency, and 128K long context.

Configuration: hardware `ascend_910c` (16× Ascend 910C) · strategy `single_node_tp` (Tensor Parallel) · variant `default` (W8A8 (Ascend A3)) · features none · preset `a3_low_latency`

- Interactive page: https://recipes.vllm.ai/Qwen/Qwen3-Coder-30B-A3B-Instruct
- This configuration as JSON: https://recipes.vllm.ai/Qwen/Qwen3-Coder-30B-A3B-Instruct.json?hardware=ascend_910c

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`: `ascend_910c`
- `variant`: `default`, `bf16`
- `strategy`: `single_node_tp` (multi-node strategies also need `nodes=<n>`)
- `features`: comma-separated list of `spec_decoding`, `tool_calling` (default: none). Use `features=none` to turn them all off.
- `preset`: a tuned, evidence-backed configuration (`baseline` opts out of a default one). Each sets its own hardware and strategy:
  - `a3_low_latency` — Low Latency (TP4) (ascend_910c · TP · 2048 input / 2048 output tokens, concurrency 32 · default): `hardware=ascend_910c&strategy=single_node_tp&preset=a3_low_latency`
  - `a3_high_throughput` — High Throughput (TP1) (ascend_910c · TP · 2048 input / 2048 output tokens, concurrency 32 · opt-in): `hardware=ascend_910c&strategy=single_node_tp&preset=a3_high_throughput`
  - `a3_long_context` — Long Context (TP4, 128K) (ascend_910c · TP · 8192 input / 512 output tokens, concurrency 4 · opt-in): `hardware=ascend_910c&strategy=single_node_tp&preset=a3_long_context`

## Install

Requires vLLM >= 0.30.0.

Docker image: `quay.io/ascend/vllm-ascend:v0.30.0-a3-openeuler`

Extra dependencies:

- Optional Eagle3 draft model for speculative decoding (replace your_eagle3_model_path) (optional)

```bash
pip install modelscope && modelscope download --model AngelSlim/Qwen3-a3B_eagle3
```

## Serve

```bash
export HCCL_OP_EXPANSION_MODE=AIV
export HCCL_BUFFSIZE=1024
export OMP_PROC_BIND=false
export OMP_NUM_THREADS=1
export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True
export VLLM_USE_MODELSCOPE=True
vllm serve Eco-Tech/Qwen3-Coder-30B-A3B-Instruct-w8a8 \
  --trust-remote-code \
  --quantization ascend \
  --tensor-parallel-size 4 \
  --max-num-seqs 100 \
  --max-model-len 37364 \
  --max-num-batched-tokens 16384 \
  --enable-expert-parallel \
  --distributed-executor-backend mp \
  --no-enable-prefix-caching \
  --async-scheduling \
  --compilation-config '{"cudagraph_mode": "FULL_DECODE_ONLY"}' \
  --additional-config '{"enable_flashcomm1": true, "weight_nz_mode": 2}' \
  --gpu-memory-utilization 0.95
```

Docker equivalent:

```bash
docker run --device /dev/davinci0 --device /dev/davinci1 --device /dev/davinci2 --device /dev/davinci3 \
  --device /dev/davinci4 --device /dev/davinci5 --device /dev/davinci6 --device /dev/davinci7 \
  --device /dev/davinci8 --device /dev/davinci9 --device /dev/davinci10 --device /dev/davinci11 \
  --device /dev/davinci12 --device /dev/davinci13 --device /dev/davinci14 --device /dev/davinci15 \
  --device /dev/davinci_manager --device /dev/hisi_hdc \
  -v /usr/local/Ascend/driver:/usr/local/Ascend/driver \
  -v /etc/ascend_install.info:/etc/ascend_install.info \
  -v /usr/local/dcmi:/usr/local/dcmi \
  -v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
  --privileged --net=host --shm-size=16g \
  -v ~/.cache/huggingface:/root/.cache/huggingface \
  -e HCCL_OP_EXPANSION_MODE=AIV \
  -e HCCL_BUFFSIZE=1024 \
  -e OMP_PROC_BIND=false \
  -e OMP_NUM_THREADS=1 \
  -e PYTORCH_NPU_ALLOC_CONF=expandable_segments:True \
  -e VLLM_USE_MODELSCOPE=True \
  quay.io/ascend/vllm-ascend:v0.30.0-a3-openeuler \
  vllm serve Eco-Tech/Qwen3-Coder-30B-A3B-Instruct-w8a8 \
  --trust-remote-code \
  --quantization ascend \
  --tensor-parallel-size 4 \
  --max-num-seqs 100 \
  --max-model-len 37364 \
  --max-num-batched-tokens 16384 \
  --enable-expert-parallel \
  --distributed-executor-backend mp \
  --no-enable-prefix-caching \
  --async-scheduling \
  --compilation-config '{"cudagraph_mode": "FULL_DECODE_ONLY"}' \
  --additional-config '{"enable_flashcomm1": true, "weight_nz_mode": 2}' \
  --gpu-memory-utilization 0.95
```

## Tuned preset: Low Latency (TP4)

TP4 with expert parallelism and FlashComm1; highest measured output rate.

- Key: `a3_low_latency` · applied by default on this hardware and strategy (`preset=baseline` drops it)
- Qualified on: hardware `ascend_910c` · strategy `single_node_tp` (Tensor Parallel) · variants `default`
- Workload: 2048 input / 2048 output tokens, concurrency 32
- Every point rendered as JSON: https://recipes.vllm.ai/Qwen/Qwen3-Coder-30B-A3B-Instruct/presets/a3_low_latency.json

### Runbook

Measured on one Atlas 800I A3 with `quay.io/ascend/vllm-ascend:v0.30.0-a3-openeuler`
(4 of 16 chips, TP4) and the W8A8 checkpoint.

- 100/100 requests completed at concurrency 32.
- Output throughput **1219.29 tok/s**.
- Mean TTFT **1007.98 ms**, mean TPOT **21.35 ms**.

## Guide

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

### Overview

Qwen3-Coder-30B-A3B-Instruct is a Mixture-of-Experts coding model with 30.5B total
parameters and 3.3B activated per token. It targets agentic coding, repository-level
code generation, and tool calling, and supports a native context length of 262144
tokens.

### Validation scope and support status

The main vLLM Ascend tutorial marks this model discontinued since v0.30.0 and points at
the v0.23.0 documentation. This recipe migrates that tutorial content to the recipes
format and re-validates it end to end on the v0.30.0 A3 image. All results below were
collected on one Atlas 800I A3 node with
`quay.io/ascend/vllm-ascend:v0.30.0-a3-openeuler` and the W8A8 checkpoint published by
Eco-Tech. The node exposes 16 chips; the presets use one chip (TP1) or four chips (TP4).

### Validated presets

| Preset | Chips | Workload | Requests | Output tok/s | Mean TTFT | Mean TPOT |
| --- | --- | --- | --- | --- | --- | --- |
| Low Latency (TP4) | 4 | 2048 in / 2048 out, concurrency 32 | 100/100 | 1219.29 | 1007.98 ms | 21.35 ms |
| High Throughput (TP1) | 1 | 2048 in / 2048 out, concurrency 32 | 100/100 | 756.42 | 1205.82 ms | 36.56 ms |
| Long Context (TP4) | 4 | 8192 in / 512 out, concurrency 4 | 20/20 | 221.63 | 735.66 ms | 16.64 ms |

The long-context preset also served a 60025-token prompt, which returned the expected
answer in 3.58 s. These numbers are reproducibility measurements on the stated image,
not an official performance baseline.

### Accuracy

EvalScope 1.15.0, 100 GSM8K samples, W8A8, TP1 service:

| Dataset | Metric | Score |
| --- | --- | --- |
| GSM8K | accuracy | 98.00% |

The upstream tutorial reports 90.14% with AISBench; the difference is consistent with
sampling variance on a 100-question subset.

### Weights

The default variant uses the pre-quantized
[Eco-Tech/Qwen3-Coder-30B-A3B-Instruct-w8a8](https://www.modelscope.cn/models/Eco-Tech/Qwen3-Coder-30B-A3B-Instruct-w8a8)
checkpoint. The BF16 variant uses the canonical Qwen checkpoint published on
[ModelScope](https://www.modelscope.cn/models/Qwen/Qwen3-Coder-30B-A3B-Instruct) and
[Hugging Face](https://huggingface.co/Qwen/Qwen3-Coder-30B-A3B-Instruct).

The optional Eagle3 draft model is not part of the default weights. Download it with
`modelscope download --model AngelSlim/Qwen3-a3B_eagle3` and enable the opt-in
`spec_decoding` feature; the measured preset numbers above remain the non-Eagle3 baseline.

Tool calling is exposed as an opt-in component using the `qwen3_coder` parser and is
not enabled in the benchmark presets.

### Limitations

- The optional Eagle3 draft model from the tutorial is exposed as an opt-in `spec_decoding` feature. It was functionally validated on Atlas 800I A3 at TP1 (3/3 HTTP 200 responses, no ERROR/Traceback in the logs); it is not enabled in the default presets or performance baselines. Replace `your_eagle3_model_path` with the local draft-model directory before enabling it.
- Only the W8A8 variant was benchmarked and evaluated. BF16 numbers are not claimed;
  its 37364-token limit is a conservative safety cap, not a performance result.
- Multi-node and PD-separated topologies are out of scope for this recipe.

### References

- [Eagle3 draft model (ModelScope)](https://www.modelscope.cn/models/AngelSlim/Qwen3-a3B_eagle3)

- [Historical vLLM Ascend tutorial (v0.23.0)](https://docs.vllm.ai/projects/ascend/en/v0.23.0/tutorials/models/Qwen3-Coder-30B-A3B.html)
- [Main tutorial support status](https://github.com/vllm-project/vllm-ascend/blob/main/docs/source/tutorials/models/Qwen3-Coder-30B-A3B.md)
- [Qwen3-Coder-30B-A3B-Instruct on ModelScope](https://www.modelscope.cn/models/Qwen/Qwen3-Coder-30B-A3B-Instruct)
- [W8A8 checkpoint on ModelScope](https://www.modelscope.cn/models/Eco-Tech/Qwen3-Coder-30B-A3B-Instruct-w8a8)
