Model Overview
- Model Architecture: Qwen3_5MoeForConditionalGeneration
- Input: Text, Image, Video
- Output: Text
- Supported Hardware Microarchitecture: AMD MI350 / MI355
- ROCm: 7.2.0
- PyTorch: 2.9.1
- Transformers: 5.3.0
- Operating System(s): Linux
- Inference Engine: SGLang
- Model Optimizer: AMD-Quark (v0.12.post1)
- Quantized layers: language-model MoE experts and the shared expert (MXFP4), plus language-model attention projections (FP8). Exact patterns:
- MXFP4:
model.language_model.layers.*.mlp.experts.*.{gate,up,down}_proj,model.language_model.layers.*.mlp.shared_expert.{gate,up,down}_proj - FP8:
model.language_model.layers.*.self_attn.{q,k,v,o}_proj,model.language_model.layers.*.linear_attn.{in_proj_qkv,in_proj_z,in_proj_a,in_proj_b,out_proj} - Not quantized (BF16):
lm_head,*mlp.gate,*shared_expert_gate*,mtp.*,model.visual.*, embeddings and norms
- MXFP4:
- Weight quantization:
- self_attn and linear_attn Perchannel, FP8E4M3, Static
- MOE OCP MXFP4, Static
- Activation quantization:
- self_attn and linear_attn Pertoken, FP8E4M3, Dynamic
- MOE OCP MXFP4, Dynamic
- Quantized layers: language-model MoE experts and the shared expert (MXFP4), plus language-model attention projections (FP8). Exact patterns:
- Calibration Dataset: None (data-free quantization; scales are computed from the weights)
This checkpoint extends the routed-expert MXFP4 quantization by also quantizing the shared expert to MXFP4 and fusing it into the routed MoE kernel (FSE: fused shared expert). Compared with keeping the shared expert in bf16, this further reduces the bf16 footprint and improves decode throughput (see Evaluation for the accuracy measured with this checkpoint).
Model serving
This model can be deployed with SGLang on AMD MI350 / MI355. The container, environment and launch command used for the evaluation below are given in Reproduction; the server command is:
SGLang
SGLANG_USE_AITER=1 SGLANG_USE_AITER_UNIFIED_ATTN=1 AITER_FLYDSL_FORCE=1 \
SGLANG_MAMBA_SSM_DTYPE=bfloat16 SGLANG_USE_AITER_FP8_PER_TOKEN=1 ROCM_QUICK_REDUCE_QUANTIZATION=NONE \
python3 -m sglang.launch_server \
--model-path amd/Qwen3.5-397B-A17B-MXFP4-AttnFP8-V2 \
--trust-remote-code --host 0.0.0.0 --port 30000 \
--tensor-parallel-size 4 --context-length 262144 \
--attention-backend aiter --disable-radix-cache --page-size 16 --enable-aiter-allreduce-fusion \
--mem-fraction-static 0.80 --reasoning-parser qwen3 \
--model-loader-extra-config '{"enable_multithread_load": true}' --watchdog-timeout 1200
Model Quantization
The model was quantized from Qwen/Qwen3.5-397B-A17B using AMD-Quark. Weights and activations of the MoE layers are quantized to OCP MXFP4; attention projections use per-channel / per-token FP8.
Quantization script:
MODEL_PATH="Qwen/Qwen3.5-397B-A17B"
OUTPUT_DIR="amd/Qwen3.5-397B-A17B-MXFP4-AttnFP8-V2"
cd /path/to/Quark
python3 examples/torch/language_modeling/llm_ptq/quantize_quark.py \
--model_dir "${MODEL_PATH}" \
--quant_scheme mxfp4 \
--layer_quant_scheme '*linear_attn*' ptpc_fp8 \
--layer_quant_scheme '*self_attn*' ptpc_fp8 \
--no_trust_remote_code \
--model_export hf_format \
--skip_evaluation \
--multi_gpu balanced \
--exclude_layers "lm_head" "*mlp.gate" "mtp.*" "model.visual.*" "*shared_expert_gate*" \
--output_dir "${OUTPUT_DIR}"
For further details or issues, please refer to the AMD-Quark documentation or contact the respective developers.
Evaluation
The model was evaluated using SGLang and EvalScope 1.14.1, in thinking mode, against the BF16 base
Qwen/Qwen3.5-397B-A17B, with the same container, server flags, prompts and sampling for both models.
Accuracy
| Benchmark | Qwen/Qwen3.5-397B-A17B | amd/Qwen3.5-397B-A17B-MXFP4-AttnFP8-V2 (this model) | Recovery |
|---|---|---|---|
| GSM8K (flexible-extract, 5-shot) | 97.71 | 97.24 | 99.55% |
| GPQA Diamond (mean@8) | 86.74 | 86.36 | 99.56% |
| AIME26 (mean@16) | 93.33 | 92.71 | 99.34% |
| MMMU Pro, standard (mean@1) | 79.83 | 79.48 | 99.56% |
| MMMU Pro, vision (mean@1) | 79.48 | 78.32 | 98.54% |
| AA-LCR v1.1 (mean@16) | 74.06 | 73.31 | 98.99% |
Recovery is the quantized score as a percentage of the BF16 score, measured with the same harness, prompts and sampling.
All reasoning-benchmark rows use temperature 0.6, top_p 0.95, top_k 20, min_p 0, presence_penalty 0 and max_tokens 81920, as recommended on the base model card.
Scores are the EvalScope-reported scores.
Note: Results may vary from run to run.
Reproduction
The following results were obtained using SGLang built into the Docker image below and EvalScope 1.14.1.
Launching server
Image: lmsysorg/sglang-rocm:v0.5.20-rocm720-mi35x-20260927
(digest sha256:a2b277dff0be18113d4eb013b607aa281b6020c3fe3e240770eebe9935b2015f, SGLang 0.5.20.dev20260927, ROCm 7.2.0, MI355X).
docker pull lmsysorg/sglang-rocm:v0.5.20-rocm720-mi35x-20260927
docker image inspect --format '{{json .RepoDigests}}' lmsysorg/sglang-rocm:v0.5.20-rocm720-mi35x-20260927
# expect lmsysorg/sglang-rocm@sha256:a2b277dff0be18113d4eb013b607aa281b6020c3fe3e240770eebe9935b2015f
Start the server container (4 GPUs; model directories mounted read-only at /models):
docker run -d --name qwen35-srv --init --network host --ipc host --shm-size 64g \
--cap-add SYS_PTRACE --security-opt seccomp=unconfined --ulimit memlock=-1 \
--device /dev/kfd --device /dev/dri --group-add <render gid> --group-add <kfd gid> --group-add video \
-v <models dir>:/models:ro -v <work dir>:/work \
-e HIP_VISIBLE_DEVICES=0,1,2,3 \
-e SGLANG_USE_AITER=1 -e SGLANG_USE_AITER_UNIFIED_ATTN=1 -e AITER_FLYDSL_FORCE=1 \
-e SGLANG_MAMBA_SSM_DTYPE=bfloat16 -e SGLANG_USE_AITER_FP8_PER_TOKEN=1 \
-e ROCM_QUICK_REDUCE_QUANTIZATION=NONE \
lmsysorg/sglang-rocm:v0.5.20-rocm720-mi35x-20260927 \
python3 -m sglang.launch_server \
--model-path /models/Qwen3.5-397B-A17B-MXFP4-AttnFP8-V2 --served-model-name qwen35-397b-mxfp4 \
--trust-remote-code --host 0.0.0.0 --port 30000 \
--tensor-parallel-size 4 --context-length 262144 \
--attention-backend aiter --disable-radix-cache --page-size 16 --enable-aiter-allreduce-fusion \
--mem-fraction-static 0.80 --reasoning-parser qwen3 \
--model-loader-extra-config '{"enable_multithread_load": true}' --watchdog-timeout 1200
The BF16 baseline used the same command with --model-path /models/Qwen3.5-397B-A17B, --served-model-name qwen35-397b-bf16 and
--mem-fraction-static 0.90. ROCM_QUICK_REDUCE_QUANTIZATION=NONE overrides the image default (INT8) so the all-reduce is not quantized.
Wait for GET /health to return 200 before starting any client.
Evaluating model in a new terminal
Run the clients against http://127.0.0.1:30000/v1 (use qwen35-397b-bf16 as the model name for the BF16 baseline). All commands use the same generation config:
GEN='{"max_tokens": 81920, "temperature": 0.6, "top_p": 0.95, "top_k": 20, "presence_penalty": 0.0, "repetition_penalty": 1.0, "stream": true, "timeout": 7200.0, "retries": 3, "extra_body": {"min_p": 0.0, "chat_template_kwargs": {"enable_thinking": true}}}'
export API=http://127.0.0.1:30000/v1/chat/completions M=qwen35-397b-mxfp4
GPQA Diamond (we ran this as two shards of --repeats 4 and pooled them)
evalscope eval --model $M --api-url $API --api-key EMPTY --eval-type openai_api \
--datasets gpqa_diamond --repeats 8 --eval-batch-size 64 \
--generation-config "$GEN" --work-dir logs/gpqa_diamond --no-timestamp --ignore-errors
AIME26 (two shards of --repeats 8, pooled)
evalscope eval --model $M --api-url $API --api-key EMPTY --eval-type openai_api \
--datasets aime26 --repeats 16 --eval-batch-size 64 --dataset-hub huggingface \
--dataset-args '{"aime26": {"hf_dataset_revision": "79037aebdb6580008fb960d17cb21fd3099083e3"}}' \
--generation-config "$GEN" --work-dir logs/aime26 --no-timestamp --ignore-errors
MMMU Pro (standard & vision): one pass, 1730 questions each. Set FORMAT to standard (10 options) or vision:
FORMAT="standard (10 options)" # or: FORMAT=vision
evalscope eval --model $M --api-url http://127.0.0.1:30000/v1 --api-key EMPTY --eval-type openai_api \
--datasets mmmu_pro --dataset-hub huggingface \
--dataset-args "{\"mmmu_pro\": {\"hf_dataset_revision\": \"0d7426df4ccb3d8704a992fe6850abee7c262127\", \"extra_params\": {\"dataset_format\": \"${FORMAT}\"}}}" \
--generation-config "$GEN" \
--eval-batch-size 48 --repeats 1 --work-dir ./mmmu_pro --no-timestamp --ignore-errors
AA-LCR (v1.1): 16 repeats.
Judge configuration (aa-lcr-judge.json):
{
"strategy": "llm",
"models": [
{
"model_id": "gpt-5.6-luna",
"api_key": "EMPTY",
"eval_type": "openai_responses_api",
"generation_config": {
"reasoning_effort": "medium",
"max_tokens": 4096,
"timeout": 7200,
"extra_query": {
"api-version": "2025-04-01-preview"
}
}
}
]
}
evalscope eval --model $M --api-url $API --datasets aa_lcr --repeats 16 --eval-batch-size 12 \
--dataset-hub huggingface \
--dataset-args '{"aa_lcr":{"hf_dataset_revision":"9a77ef56b717057ade24ceab4d273712a0b4f19e"}}' \
--judge "$(cat aa-lcr-judge.json)" \
--generation-config "$GEN" --work-dir logs/aa_lcr
License
This model is a quantized derivative of Qwen/Qwen3.5-397B-A17B and is subject to the license of the base model: LICENSE.
Modifications Copyright(c) 2026 Advanced Micro Devices, Inc. All rights reserved.