Qwen3-30B-A3B
A Mixture-of-Experts (MoE) model in the Qwen3 series, featuring 30.5B total parameters with 3.3B activated per token. The sparse MoE architecture enables efficient training and inference, delivering strong performance across reasoning, instruction-following, and agent capabilities while maintaining lower computational cost.
Single-node deployment on Atlas 800 A2/A3 with BF16 and W8A8 precision
Preparation
Qwen3-30B-A3B is a Mixture-of-Experts (MoE) model in the Qwen3 series, featuring 30.5B total parameters with 3.3B activated per token. The sparse MoE architecture enables efficient training and inference, delivering strong performance across reasoning, instruction-following, and agent capabilities while maintaining lower computational cost compared to dense models of similar capability.
Deployment Guide
Select NPU type and deployment options to view the corresponding deployment instructions.
Verification
After the service is started, the model can be invoked by sending a prompt.
Chat Completions API:
curl http://localhost:<port>/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3",
"messages": [
{"role": "user", "content": "Give me a short introduction to large language models."}
],
"temperature": 0.6,
"top_p": 0.95,
"top_k": 20,
"max_completion_tokens": 4096
}'- URL: Replacelocalhostwith your server IP and use the port from thevllm servecommand.
-model: Must match the--served-model-namevalue from thevllm servecommand (e.g.,qwen3).
Expected result: HTTP 200 with a JSON response containing the choices field with generated text.
More Info
Accuracy
Using AISBench
Refer to Using AISBench for details.
Accuracy Results (Atlas 800I A3, vLLM-Ascend v0.22.1rc, W8A8):
| Dataset | Metric | Score |
|---|---|---|
| GSM8K | accuracy (4-shot CoT) | 92.87% |
| GPQA-Diamond | accuracy (0-shot CoT) | 60.10% |
| AIME 2024 | accuracy (0-shot) | 76.67% |
Accuracy
Using AISBench
For setup details, including installation, dataset download, and configuration, please refer to Using AISBench.
The following is an example configuration for the accuracy evaluation config file, demonstrated using the GSM8K dataset:
# Example configuration: benchmarks/ais_bench/benchmark/configs/models/vllm_api/vllm_api_general_chat.py
from ais_bench.benchmark.models import VLLMCustomAPIChat
models = [
dict(
attr="service",
type=VLLMCustomAPIChat,
abbr='vllm-api-general-chat',
path="your_model_path",
model="qwen3",
request_rate=0,
retry=2,
host_ip="localhost",
host_port=8000,
max_out_len=32768,
batch_size=32,
trust_remote_code=True,
generation_kwargs=dict(
temperature=0.6,
top_k=20,
top_p=0.95,
),
)
]Run the accuracy evaluation using the gsm8k dataset as an example:
ais_bench --models vllm_api_general_chat --datasets gsm8k_gen_4_shot_cot_str --mode all --dump-eval-details --debugThe following table lists the --datasets parameter for each evaluation dataset:
| Dataset | `--datasets` Parameter |
|---|---|
| GSM8K | `gsm8k_gen_4_shot_cot_str` |
| GPQA-Diamond | `gpqa_gen_0_shot_cot_chat_prompt` |
| AIME 2024 | `aime2024_gen_0_shot_str` |
| LiveCodeBench | `livecodebench_0_shot_chat_v4_v5_v6` |
The--modelsparameter value corresponds to the configuration file name (e.g.,vllm_api_general_chatforvllm_api_general_chat.py). Adjustmax_out_len,batch_size, and dataset tasks based on your scenario.
For dataset preparation, please refer to the AISBench Datasets Guide.
vLLM-Ascend also supports the following evaluation tools:
Accuracy Results (Atlas 800I A3, vLLM-Ascend v0.22.1rc, W8A8):
| Dataset | Metric | Score |
|---|---|---|
| GSM8K | accuracy (4-shot CoT) | 92.87% |
| GPQA-Diamond | accuracy (0-shot CoT) | 60.10% |
| LiveCodeBench | pass@1 (0-shot) | 60.05% |
| AIME 2024 | accuracy (0-shot) | 76.67% |
Benchmark
Recommended Configurations
Note: The following configurations are validated in specific test environments and are for reference only. The optimal configuration depends on factors such as maximum input/output length, prefix cache hit rate, precision requirements, and deployment machine ratios. It is recommended to refer to Section 9.2 for tuning based on actual conditions.
Table 1: Scenario Overview
| Scenario | Deployment Mode | *Total NPUs | Weight Version | Key Considerations |
|---|---|---|---|---|
| High Throughput | Single-Node (TP1) | 1 (A3) 2 (A2) | W8A8 | Single-card deployment maximizes concurrent request processing |
| Low Latency | Single-Node (TP4) | 2 (A3) 4 (A2) | W8A8 | Multi-card TP reduces per-token latency with expert parallelism |
| Long Context | Single-Node (TP4) | 2 (A3) 4 (A2) | W8A8 | Reduces concurrent sequences to accommodate longer max-model-len |
*Total NPUs indicates the total number of NPUs used across all nodes. On Atlas 800I A3, each NPU contains two dies (chips), so TP4 requires 4 chips = 2 NPUs.
Table 2: Detailed Node Configuration
| Scenario | NPUs | TP | max-model-len | max-num-seqs | FUSED_MC2 | EP | hf-overrides |
|---|---|---|---|---|---|---|---|
| High Throughput | 1 (A3) | 1 | 37364 | 100 | Off | Off | - |
| Low Latency | 2 (A3) | 4 | 37364 | 100 | Off | On | - |
| Long Context | 2 (A3) | 4 | 131072 | 14 | Off | On | YaRN |
For detailed parameter descriptions, please refer to the deployment examples in Section 5.
Low Latency Configuration:
export ASCEND_RT_VISIBLE_DEVICES=0,1,2,3
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
vllm serve your_model_path \
--served-model-name qwen3 \
--trust-remote-code \
--max-num-seqs {{max_num_seqs}} \
--max-model-len 37364 \
--max-num-batched-tokens 16384 \
--tensor-parallel-size 4 \
--enable-expert-parallel \
--distributed_executor_backend "mp" \
{{prefix_caching}} \
{{async_scheduling}} \
--quantization ascend \
{{compilation_config}} \
{{flashcomm1}} \
--gpu-memory-utilization {{gpu_memory_utilization}} \
--port 8000 \
--speculative-config '{"method": "eagle3","model": "your_eagle3_model_path", "num_speculative_tokens": 3}'Example AISBench settings for this configuration:
request_rate: 0batch_size: 32- Input/Output length: 2048/2048 or 3500/1500
High Throughput Configuration:
export ASCEND_RT_VISIBLE_DEVICES=0
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
vllm serve your_model_path \
--served-model-name qwen3 \
--trust-remote-code \
--max-num-seqs {{max_num_seqs}} \
--max-model-len 37364 \
--max-num-batched-tokens 16384 \
--tensor-parallel-size 1 \
--distributed_executor_backend "mp" \
{{prefix_caching}} \
{{async_scheduling}} \
--quantization ascend \
{{compilation_config}} \
--additional-config '{"weight_nz_mode": 2}' \
--gpu-memory-utilization {{gpu_memory_utilization}} \
--port 8000 \
--speculative-config '{"method": "eagle3","model": "your_eagle3_model_path", "num_speculative_tokens": 3}'Example AISBench settings for this configuration:
request_rate: 0batch_size: 32- Input/Output length: 2048/2048 or 3500/1500
Long Context Configuration:
export ASCEND_RT_VISIBLE_DEVICES=0,1,2,3
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
vllm serve your_model_path \
--served-model-name qwen3 \
--trust-remote-code \
--max-num-seqs 14 \
--max-model-len 131072 \
--max-num-batched-tokens 16384 \
--tensor-parallel-size 4 \
--enable-expert-parallel \
--distributed_executor_backend "mp" \
{{prefix_caching}} \
{{async_scheduling}} \
--quantization ascend \
{{compilation_config}} \
{{flashcomm1}} \
--gpu-memory-utilization {{gpu_memory_utilization}} \
--port 8000 \
--speculative-config '{"method": "eagle3","model": "your_eagle3_model_path", "num_speculative_tokens": 3}' \
--hf-overrides '{"rope_parameters": {"rope_type":"yarn","factor":4,"original_max_position_embeddings":32768}}'Example AISBench settings for this configuration:
request_rate: 0batch_size: 32- Input/Output length: 65536/1024 or 131072/1024
Benchmark
Using AISBench
For setup details, please refer to Using AISBench for performance evaluation.
First, configure the model for streaming performance testing (ais_bench/benchmark/configs/models/vllm_api/vllm_api_stream_chat.py):
from ais_bench.benchmark.models import VLLMCustomAPIChat
from ais_bench.benchmark.utils.postprocess.model_postprocessors import extract_non_reasoning_content
models = [
dict(
attr="service",
type=VLLMCustomAPIChat,
abbr='vllm-api-stream-chat',
path="your_model_path",
model="qwen3",
stream=True,
request_rate=0,
retry=2,
host_ip="localhost",
host_port=8000,
max_out_len=1500,
batch_size=32,
trust_remote_code=True,
generation_kwargs=dict(
temperature=0.01,
ignore_eos=True,
),
pred_postprocessor=dict(type=extract_non_reasoning_content),
)
]Key differences from the accuracy config:stream=True,ignore_eos=True(ensures output reachesmax_out_lenfor consistent TPOT measurement), andbatch_sizecontrols concurrency.
Then, configure the synthetic dataset distribution (ais_bench/datasets/synthetic/synthetic_config.py). Adjust the configuration based on your actual scenario. Note that random synthetic data is not suitable for benchmarking scenarios where prefix caching is enabled, as random inputs produce zero cache hit rate.
synthetic_config = {
"Type": "string",
"RequestCount": 200,
"StringConfig": {
"Input": {
"Method": "uniform",
"Params": {"MinValue": 3500, "MaxValue": 3500}
},
"Output": {
"Method": "uniform",
"Params": {"MinValue": 1500, "MaxValue": 1500}
}
}
}Then run the performance evaluation:
ais_bench --models vllm_api_stream_chat --datasets synthetic_gen --mode perf --debugThe--modelsvalue should match theabbrin your model config file. Use--num-promptsto limit the number of test requests.
Using vLLM Benchmark
Refer to vLLM benchmark for more details.
Take the serve subcommand as an example. The --random-output-len parameter controls the number of output tokens per request; adjust it based on your target scenario (e.g., 2048 for short outputs, 32768 for long outputs).
vllm bench serve \
--model your_model_path \
--served-model-name qwen3 \
--port 8000 \
--dataset-name random \
--random-input 200 \
--random-output-len 2048 \
--num-prompts 200 \
--request-rate 1 \
--save-result \
--result-dir ./