[AMD] [Qwen 3.5 Day 0] Add Qwen 3.5 nightly accuracy tests (#19479)
This commit is contained in:
69
.github/workflows/nightly-test-amd-rocm720.yml
vendored
69
.github/workflows/nightly-test-amd-rocm720.yml
vendored
@@ -43,11 +43,13 @@ on:
|
||||
- 'nightly-8-gpu-deepseek-v32-mtp-rocm720'
|
||||
- 'nightly-8-gpu-kimi-k25-rocm720'
|
||||
- 'nightly-8-gpu-qwen3-235b-rocm720'
|
||||
- 'nightly-8-gpu-qwen35-rocm720'
|
||||
- 'nightly-8-gpu-glm5-rocm720'
|
||||
- 'nightly-8-gpu-minimax-m25-rocm720'
|
||||
# MI35x ROCm 7.2 jobs
|
||||
- 'nightly-test-1-gpu-mi35x-rocm720'
|
||||
- 'nightly-8-gpu-mi35x-qwen3-235b-mxfp4-rocm720'
|
||||
- 'nightly-8-gpu-mi35x-qwen35-rocm720'
|
||||
- 'nightly-accuracy-8-gpu-mi35x-rocm720'
|
||||
- 'nightly-8-gpu-mi35x-grok1-int4-rocm720'
|
||||
- 'nightly-8-gpu-mi35x-grok2-rocm720'
|
||||
@@ -551,6 +553,38 @@ jobs:
|
||||
echo "$(<github_summary.md )" >> $GITHUB_STEP_SUMMARY || true
|
||||
exit ${TEST_EXIT_CODE:-0}
|
||||
|
||||
# 8-GPU Qwen 3.5 (Accuracy) ROCm 7.2
|
||||
nightly-8-gpu-qwen35-rocm720:
|
||||
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && (inputs.job_filter == '' || inputs.job_filter == 'all' || inputs.job_filter == 'nightly-8-gpu-qwen35-rocm720')
|
||||
runs-on: linux-mi325-gpu-8
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.ref || github.ref }}
|
||||
|
||||
- name: Setup docker (ROCm 7.2)
|
||||
run: |
|
||||
touch github_summary.md
|
||||
bash scripts/ci/amd/amd_ci_start_container.sh --rocm-version rocm720
|
||||
env:
|
||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
bash scripts/ci/amd/amd_ci_install_dependency.sh --skip-aiter-build --skip-test-time-deps
|
||||
bash scripts/ci/amd/amd_ci_exec.sh pip install git+https://github.com/huggingface/transformers.git mistral-common "lm-eval[api]" --upgrade
|
||||
|
||||
- name: Accuracy Test ROCm 7.2 (8-GPU Qwen 3.5)
|
||||
timeout-minutes: 120
|
||||
run: |
|
||||
> github_summary.md # Clear summary file
|
||||
bash scripts/ci/amd/amd_ci_exec.sh -w /sglang-checkout/test \
|
||||
-e GITHUB_STEP_SUMMARY="/sglang-checkout/github_summary.md" \
|
||||
python3 run_suite.py --hw amd --suite nightly-amd-accuracy-8-gpu-qwen35 --nightly --timeout-per-file 3600 --continue-on-error || TEST_EXIT_CODE=$?
|
||||
echo "$(<github_summary.md )" >> $GITHUB_STEP_SUMMARY || true
|
||||
exit ${TEST_EXIT_CODE:-0}
|
||||
|
||||
# 8-GPU GLM-5 (Accuracy) ROCm 7.2
|
||||
nightly-8-gpu-glm5-rocm720:
|
||||
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && (inputs.job_filter == '' || inputs.job_filter == 'all' || inputs.job_filter == 'nightly-8-gpu-glm5-rocm720')
|
||||
@@ -978,6 +1012,39 @@ jobs:
|
||||
echo "$(<github_summary.md )" >> $GITHUB_STEP_SUMMARY || true
|
||||
exit ${TEST_EXIT_CODE:-0}
|
||||
|
||||
# MI35x 8-GPU Qwen 3.5 (Accuracy) ROCm 7.2
|
||||
nightly-8-gpu-mi35x-qwen35-rocm720:
|
||||
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && (inputs.job_filter == '' || inputs.job_filter == 'all' || inputs.job_filter == 'nightly-8-gpu-mi35x-qwen35-rocm720')
|
||||
runs-on: linux-mi35x-gpu-8
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.ref || github.ref }}
|
||||
|
||||
- name: Setup docker (ROCm 7.2)
|
||||
run: |
|
||||
touch github_summary.md
|
||||
bash scripts/ci/amd/amd_ci_start_container.sh --rocm-version rocm720
|
||||
env:
|
||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
bash scripts/ci/amd/amd_ci_install_dependency.sh --skip-aiter-build --skip-test-time-deps
|
||||
bash scripts/ci/amd/amd_ci_exec.sh pip install tabulate
|
||||
bash scripts/ci/amd/amd_ci_exec.sh pip install git+https://github.com/huggingface/transformers.git mistral-common "lm-eval[api]" --upgrade
|
||||
|
||||
- name: Accuracy Test MI35x ROCm 7.2 (8-GPU Qwen 3.5)
|
||||
timeout-minutes: 120
|
||||
run: |
|
||||
> github_summary.md # Clear summary file
|
||||
bash scripts/ci/amd/amd_ci_exec.sh -w /sglang-checkout/test \
|
||||
-e GITHUB_STEP_SUMMARY="/sglang-checkout/github_summary.md" \
|
||||
python3 run_suite.py --hw amd --suite nightly-amd-accuracy-8-gpu-mi35x-qwen35 --nightly --timeout-per-file 3600 --continue-on-error || TEST_EXIT_CODE=$?
|
||||
echo "$(<github_summary.md )" >> $GITHUB_STEP_SUMMARY || true
|
||||
exit ${TEST_EXIT_CODE:-0}
|
||||
|
||||
nightly-8-gpu-mi35x-glm5-rocm720:
|
||||
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && (inputs.job_filter == '' || inputs.job_filter == 'all' || inputs.job_filter == 'nightly-8-gpu-mi35x-glm5-rocm720')
|
||||
runs-on: linux-mi35x-gpu-8
|
||||
@@ -1098,6 +1165,7 @@ jobs:
|
||||
- nightly-8-gpu-deepseek-v32-mtp-rocm720
|
||||
- nightly-8-gpu-kimi-k25-rocm720
|
||||
- nightly-8-gpu-qwen3-235b-rocm720
|
||||
- nightly-8-gpu-qwen35-rocm720
|
||||
- nightly-8-gpu-glm5-rocm720
|
||||
- nightly-8-gpu-minimax-m25-rocm720
|
||||
# MI35x ROCm 7.2 jobs
|
||||
@@ -1112,6 +1180,7 @@ jobs:
|
||||
- nightly-perf-8-gpu-mi35x-deepseek-v32-mtp-rocm720
|
||||
- nightly-8-gpu-mi35x-kimi-k25-rocm720
|
||||
- nightly-8-gpu-mi35x-qwen3-235b-mxfp4-rocm720
|
||||
- nightly-8-gpu-mi35x-qwen35-rocm720
|
||||
- nightly-8-gpu-mi35x-glm5-rocm720
|
||||
- nightly-8-gpu-mi35x-minimax-m25-rocm720
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
69
.github/workflows/nightly-test-amd.yml
vendored
69
.github/workflows/nightly-test-amd.yml
vendored
@@ -43,11 +43,13 @@ on:
|
||||
- 'nightly-8-gpu-deepseek-v32-mtp'
|
||||
- 'nightly-8-gpu-kimi-k25'
|
||||
- 'nightly-8-gpu-qwen3-235b'
|
||||
- 'nightly-8-gpu-qwen35'
|
||||
- 'nightly-8-gpu-glm5'
|
||||
- 'nightly-8-gpu-minimax-m25'
|
||||
# MI35x jobs
|
||||
- 'nightly-test-1-gpu-mi35x'
|
||||
- 'nightly-8-gpu-mi35x-qwen3-235b-mxfp4'
|
||||
- 'nightly-8-gpu-mi35x-qwen35'
|
||||
- 'nightly-8-gpu-mi35x-kimi-k25'
|
||||
- 'nightly-8-gpu-mi35x-glm5'
|
||||
- 'nightly-8-gpu-mi35x-minimax-m25'
|
||||
@@ -555,6 +557,38 @@ jobs:
|
||||
echo "$(<github_summary.md )" >> $GITHUB_STEP_SUMMARY || true
|
||||
exit ${TEST_EXIT_CODE:-0}
|
||||
|
||||
# 8-GPU Qwen 3.5 (Accuracy)
|
||||
nightly-8-gpu-qwen35:
|
||||
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && (inputs.job_filter == '' || inputs.job_filter == 'all' || inputs.job_filter == 'nightly-8-gpu-qwen35')
|
||||
runs-on: linux-mi325-gpu-8
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.ref || github.ref }}
|
||||
|
||||
- name: Setup docker
|
||||
run: |
|
||||
touch github_summary.md
|
||||
bash scripts/ci/amd/amd_ci_start_container.sh
|
||||
env:
|
||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
bash scripts/ci/amd/amd_ci_install_dependency.sh
|
||||
bash scripts/ci/amd/amd_ci_exec.sh pip install git+https://github.com/huggingface/transformers.git mistral-common "lm-eval[api]" --upgrade
|
||||
|
||||
- name: Accuracy Test (8-GPU Qwen 3.5)
|
||||
timeout-minutes: 120
|
||||
run: |
|
||||
> github_summary.md # Clear summary file
|
||||
bash scripts/ci/amd/amd_ci_exec.sh -w /sglang-checkout/test \
|
||||
-e GITHUB_STEP_SUMMARY="/sglang-checkout/github_summary.md" \
|
||||
python3 run_suite.py --hw amd --suite nightly-amd-accuracy-8-gpu-qwen35 --nightly --timeout-per-file 3600 || TEST_EXIT_CODE=$?
|
||||
echo "$(<github_summary.md )" >> $GITHUB_STEP_SUMMARY || true
|
||||
exit ${TEST_EXIT_CODE:-0}
|
||||
|
||||
nightly-8-gpu-glm5:
|
||||
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && (inputs.job_filter == '' || inputs.job_filter == 'all' || inputs.job_filter == 'nightly-8-gpu-glm5')
|
||||
runs-on: linux-mi325-8gpu-sglang
|
||||
@@ -984,6 +1018,39 @@ jobs:
|
||||
echo "$(<github_summary.md )" >> $GITHUB_STEP_SUMMARY || true
|
||||
exit ${TEST_EXIT_CODE:-0}
|
||||
|
||||
# MI35x 8-GPU Qwen 3.5 (Accuracy)
|
||||
nightly-8-gpu-mi35x-qwen35:
|
||||
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && (inputs.job_filter == '' || inputs.job_filter == 'all' || inputs.job_filter == 'nightly-8-gpu-mi35x-qwen35')
|
||||
runs-on: linux-mi35x-gpu-8
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.ref || github.ref }}
|
||||
|
||||
- name: Setup docker
|
||||
run: |
|
||||
touch github_summary.md
|
||||
bash scripts/ci/amd/amd_ci_start_container.sh
|
||||
env:
|
||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
bash scripts/ci/amd/amd_ci_install_dependency.sh
|
||||
bash scripts/ci/amd/amd_ci_exec.sh pip install tabulate
|
||||
bash scripts/ci/amd/amd_ci_exec.sh pip install git+https://github.com/huggingface/transformers.git mistral-common "lm-eval[api]" --upgrade
|
||||
|
||||
- name: Accuracy Test MI35x (8-GPU Qwen 3.5)
|
||||
timeout-minutes: 120
|
||||
run: |
|
||||
> github_summary.md # Clear summary file
|
||||
bash scripts/ci/amd/amd_ci_exec.sh -w /sglang-checkout/test \
|
||||
-e GITHUB_STEP_SUMMARY="/sglang-checkout/github_summary.md" \
|
||||
python3 run_suite.py --hw amd --suite nightly-amd-accuracy-8-gpu-mi35x-qwen35 --nightly --timeout-per-file 3600 || TEST_EXIT_CODE=$?
|
||||
echo "$(<github_summary.md )" >> $GITHUB_STEP_SUMMARY || true
|
||||
exit ${TEST_EXIT_CODE:-0}
|
||||
|
||||
nightly-8-gpu-mi35x-glm5:
|
||||
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && (inputs.job_filter == '' || inputs.job_filter == 'all' || inputs.job_filter == 'nightly-8-gpu-mi35x-glm5')
|
||||
runs-on: linux-mi35x-gpu-8
|
||||
@@ -1104,6 +1171,7 @@ jobs:
|
||||
- nightly-8-gpu-deepseek-v32-mtp
|
||||
- nightly-8-gpu-kimi-k25
|
||||
- nightly-8-gpu-qwen3-235b
|
||||
- nightly-8-gpu-qwen35
|
||||
- nightly-8-gpu-glm5
|
||||
- nightly-8-gpu-minimax-m25
|
||||
# MI35x jobs
|
||||
@@ -1116,6 +1184,7 @@ jobs:
|
||||
- nightly-accuracy-8-gpu-mi35x-deepseek-v32-mtp
|
||||
- nightly-8-gpu-mi35x-kimi-k25
|
||||
- nightly-8-gpu-mi35x-qwen3-235b-mxfp4
|
||||
- nightly-8-gpu-mi35x-qwen35
|
||||
- nightly-8-gpu-mi35x-glm5
|
||||
- nightly-8-gpu-mi35x-minimax-m25
|
||||
# MI35x perf jobs excluded from check - perf failures don't block CI
|
||||
|
||||
@@ -13,6 +13,7 @@ For more usage examples and recipes, visit the `SGLang Cookbook <https://cookboo
|
||||
gpt_oss.md
|
||||
minimax_m2.md
|
||||
qwen3.md
|
||||
qwen3_5.md
|
||||
qwen3_vl.md
|
||||
deepseek_ocr.md
|
||||
llama4.md
|
||||
|
||||
76
docs/basic_usage/qwen3_5.md
Normal file
76
docs/basic_usage/qwen3_5.md
Normal file
@@ -0,0 +1,76 @@
|
||||
# Qwen 3.5 Usage
|
||||
|
||||
Qwen 3.5 is Alibaba's latest generation LLM featuring a hybrid attention architecture, advanced MoE with shared experts, and native multimodal capabilities.
|
||||
|
||||
Key architecture features:
|
||||
- **Hybrid Attention**: Gated Delta Networks (linear, O(n) complexity) combined with full attention every 4th layer for high associative recall
|
||||
- **MoE with Shared Experts**: Top-8 active out of 64 routed experts plus a dedicated shared expert for universal features
|
||||
- **Multimodal**: DeepStack Vision Transformer with Conv3d for native image and video understanding
|
||||
|
||||
## Launch Qwen 3.5 with SGLang
|
||||
|
||||
### Dense Model
|
||||
|
||||
To serve `Qwen/Qwen3.5-397B-A17B` on 8 GPUs:
|
||||
|
||||
```bash
|
||||
python3 -m sglang.launch_server \
|
||||
--model-path Qwen/Qwen3.5-397B-A17B \
|
||||
--tp 8 \
|
||||
--trust-remote-code
|
||||
```
|
||||
|
||||
### AMD GPU (MI300X / MI325X / MI35X)
|
||||
|
||||
On AMD Instinct GPUs, use the `triton` attention backend. Both the full attention layers and the Gated Delta Net (linear attention) layers use Triton-based kernels on ROCm:
|
||||
|
||||
```bash
|
||||
SGLANG_USE_AITER=1 python3 -m sglang.launch_server \
|
||||
--model-path Qwen/Qwen3.5-397B-A17B \
|
||||
--tp 8 \
|
||||
--attention-backend triton \
|
||||
--trust-remote-code
|
||||
```
|
||||
|
||||
```{tip}
|
||||
Set `SGLANG_USE_AITER=1` to enable AMD's optimized aiter kernels for MoE and GEMM operations.
|
||||
```
|
||||
|
||||
### Configuration Tips
|
||||
|
||||
- `--attention-backend`: Use `triton` on AMD GPUs for Qwen 3.5. The hybrid attention architecture (Gated Delta Networks + full attention) works best with the Triton backend on ROCm. The linear attention (GDN) layers always use Triton kernels internally via the `GDNAttnBackend`.
|
||||
- `--watchdog-timeout`: Increase to `1200` or higher for this large model, as weight loading takes significant time.
|
||||
- `--model-loader-extra-config '{"enable_multithread_load": true}'`: Enables parallel weight loading for faster startup.
|
||||
|
||||
### Reasoning and Tool Calling
|
||||
|
||||
Qwen 3.5 supports reasoning and tool calling via the Qwen3 parsers:
|
||||
|
||||
```bash
|
||||
python3 -m sglang.launch_server \
|
||||
--model-path Qwen/Qwen3.5-397B-A17B \
|
||||
--tp 8 \
|
||||
--trust-remote-code \
|
||||
--reasoning-parser qwen3 \
|
||||
--tool-call-parser qwen3_coder
|
||||
```
|
||||
|
||||
## Accuracy Evaluation
|
||||
|
||||
You can evaluate the model accuracy using `lm-eval`:
|
||||
|
||||
```bash
|
||||
pip install lm-eval[api]
|
||||
|
||||
lm_eval --model local-completions \
|
||||
--model_args '{"base_url": "http://localhost:8000/v1/completions", "model": "Qwen/Qwen3.5-397B-A17B", "num_concurrent": 256, "max_retries": 10, "max_gen_toks": 2048}' \
|
||||
--tasks gsm8k \
|
||||
--batch_size auto \
|
||||
--num_fewshot 5 \
|
||||
--trust_remote_code
|
||||
```
|
||||
|
||||
## Additional Resources
|
||||
|
||||
- [AMD Day 0 Support for Qwen 3.5 on AMD Instinct GPUs](https://www.amd.com/en/developer/resources/technical-articles/2026/day-0-support-for-qwen-3-5-on-amd-instinct-gpus.html)
|
||||
- [HuggingFace Model Card](https://huggingface.co/Qwen/Qwen3.5-397B-A17B)
|
||||
@@ -29,7 +29,7 @@ in the GitHub search bar.
|
||||
| **Kimi K2** (Thinking, Instruct) | `moonshotai/Kimi-K2-Instruct` | Moonshot AI's 1 trillion parameter MoE model (32B active) with 128K–256K context; state-of-the-art agentic intelligence with stable long-horizon agency across 200–300 sequential tool calls. Features MLA attention and native INT4 quantization. [See Reasoning Parser docs](../advanced_features/separate_reasoning.ipynb)|
|
||||
| **Kimi Linear** (48B-A3B) | `moonshotai/Kimi-Linear-48B-A3B-Instruct` | Moonshot AI's hybrid linear attention model (48B total, 3B active) with 1M token context; features Kimi Delta Attention (KDA) for up to 6× faster decoding and 75% KV cache reduction vs full attention. |
|
||||
| **GPT-OSS** | `openai/gpt-oss-20b`, `openai/gpt-oss-120b` | OpenAI’s latest GPT-OSS series for complex reasoning, agentic tasks, and versatile developer use cases.|
|
||||
| **Qwen** (3, 3MoE, 3Next, 2.5, 2 series) | `Qwen/Qwen3-0.6B`, `Qwen/Qwen3-30B-A3B` `Qwen/Qwen3-Next-80B-A3B-Instruct ` | Alibaba’s latest Qwen3 series for complex reasoning, language understanding, and generation tasks; Support for MoE variants along with previous generation 2.5, 2, etc. [SGLang provides Qwen3 specific reasoning parser](../advanced_features/separate_reasoning.ipynb)|
|
||||
| **Qwen** (3.5, 3, 3MoE, 3Next, 2.5, 2 series) | `Qwen/Qwen3.5-397B-A17B`, `Qwen/Qwen3-0.6B`, `Qwen/Qwen3-30B-A3B` | Alibaba’s latest Qwen3 series for complex reasoning, language understanding, and generation tasks; Support for MoE variants along with previous generation 2.5, 2, etc. [SGLang provides Qwen3 specific reasoning parser](../advanced_features/separate_reasoning.ipynb)|
|
||||
| **Llama** (2, 3.x, 4 series) | `meta-llama/Llama-4-Scout-17B-16E-Instruct` | Meta's open LLM series, spanning 7B to 400B parameters (Llama 2, 3, and new Llama 4) with well-recognized performance. [SGLang provides Llama-4 model-specific optimizations](../basic_usage/llama4.md) |
|
||||
| **Mistral** (Mixtral, NeMo, Small3) | `mistralai/Mistral-7B-Instruct-v0.2` | Open 7B LLM by Mistral AI with strong performance; extended into MoE (“Mixtral”) and NeMo Megatron variants for larger scale. |
|
||||
| **Gemma** (v1, v2, v3) | `google/gemma-3-1b-it` | Google’s family of efficient multilingual models (1B–27B); Gemma 3 offers a 128K context window, and its larger (4B+) variants support vision input. |
|
||||
|
||||
13
test/lm_eval_configs/Qwen3.5-397B-A17B.yaml
Normal file
13
test/lm_eval_configs/Qwen3.5-397B-A17B.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
model_name: "Qwen/Qwen3.5-397B-A17B"
|
||||
tasks:
|
||||
- name: "gsm8k"
|
||||
metrics:
|
||||
- name: "exact_match,strict-match"
|
||||
value: 0.9704
|
||||
- name: "exact_match,flexible-extract"
|
||||
value: 0.9697
|
||||
limit: 1319
|
||||
num_concurrent: 256
|
||||
num_fewshot: 5
|
||||
gen_kwargs: "max_gen_toks=2048"
|
||||
rtol: 0.05
|
||||
64
test/registered/amd/accuracy/mi30x/test_qwen35_eval_amd.py
Normal file
64
test/registered/amd/accuracy/mi30x/test_qwen35_eval_amd.py
Normal file
@@ -0,0 +1,64 @@
|
||||
"""AMD Qwen 3.5 GSM8K lm-eval Evaluation Test (8-GPU)
|
||||
|
||||
Tests Qwen/Qwen3.5-397B-A17B (MoE, Hybrid Attention with Gated Delta Networks)
|
||||
with lm-eval GSM8K benchmark on MI325/MI300X, matching the AMD Day 0 article.
|
||||
|
||||
Registry: nightly-amd-accuracy-8-gpu-qwen35 suite
|
||||
"""
|
||||
|
||||
import os
|
||||
import unittest
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ci.ci_register import register_amd_ci
|
||||
from sglang.test.kits.lm_eval_kit import LMEvalMixin
|
||||
from sglang.test.test_utils import (
|
||||
DEFAULT_URL_FOR_TEST,
|
||||
CustomTestCase,
|
||||
popen_launch_server,
|
||||
)
|
||||
|
||||
register_amd_ci(est_time=3600, suite="nightly-amd-accuracy-8-gpu-qwen35", nightly=True)
|
||||
|
||||
QWEN35_MODEL_PATH = "Qwen/Qwen3.5-397B-A17B"
|
||||
SERVER_LAUNCH_TIMEOUT = 3600
|
||||
TP_SIZE = 8
|
||||
|
||||
|
||||
class TestQwen35EvalAMD(LMEvalMixin, CustomTestCase):
|
||||
"""Qwen 3.5 GSM8K lm-eval Test for AMD MI325/MI300X."""
|
||||
|
||||
model_config_name = "lm_eval_configs/Qwen3.5-397B-A17B.yaml"
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.model = QWEN35_MODEL_PATH
|
||||
cls.base_url = DEFAULT_URL_FOR_TEST
|
||||
other_args = [
|
||||
"--tp",
|
||||
str(TP_SIZE),
|
||||
"--attention-backend",
|
||||
"triton",
|
||||
"--trust-remote-code",
|
||||
"--model-loader-extra-config",
|
||||
'{"enable_multithread_load": true}',
|
||||
"--watchdog-timeout",
|
||||
"1200",
|
||||
]
|
||||
env = os.environ.copy()
|
||||
env["SGLANG_USE_AITER"] = "1"
|
||||
cls.process = popen_launch_server(
|
||||
cls.model,
|
||||
cls.base_url,
|
||||
timeout=SERVER_LAUNCH_TIMEOUT,
|
||||
other_args=other_args,
|
||||
env=env,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
kill_process_tree(cls.process.pid)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
74
test/registered/amd/accuracy/mi35x/test_qwen35_eval_mi35x.py
Normal file
74
test/registered/amd/accuracy/mi35x/test_qwen35_eval_mi35x.py
Normal file
@@ -0,0 +1,74 @@
|
||||
"""MI35x Qwen 3.5 GSM8K lm-eval Evaluation Test (8-GPU)
|
||||
|
||||
Tests Qwen/Qwen3.5-397B-A17B (MoE, Hybrid Attention with Gated Delta Networks)
|
||||
with lm-eval GSM8K benchmark on MI35x, matching the AMD Day 0 article.
|
||||
|
||||
Registry: nightly-amd-accuracy-8-gpu-mi35x-qwen35 suite
|
||||
"""
|
||||
|
||||
import os
|
||||
import unittest
|
||||
|
||||
import requests
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ci.ci_register import register_amd_ci
|
||||
from sglang.test.kits.lm_eval_kit import LMEvalMixin
|
||||
from sglang.test.test_utils import (
|
||||
DEFAULT_URL_FOR_TEST,
|
||||
CustomTestCase,
|
||||
popen_launch_server,
|
||||
)
|
||||
|
||||
register_amd_ci(
|
||||
est_time=3600, suite="nightly-amd-accuracy-8-gpu-mi35x-qwen35", nightly=True
|
||||
)
|
||||
|
||||
QWEN35_MODEL_PATH = "Qwen/Qwen3.5-397B-A17B"
|
||||
SERVER_LAUNCH_TIMEOUT = 3600
|
||||
TP_SIZE = 8
|
||||
|
||||
|
||||
class TestQwen35EvalMI35x(LMEvalMixin, CustomTestCase):
|
||||
"""Qwen 3.5 GSM8K lm-eval Test for AMD MI35x."""
|
||||
|
||||
model_config_name = "lm_eval_configs/Qwen3.5-397B-A17B.yaml"
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.model = QWEN35_MODEL_PATH
|
||||
cls.base_url = DEFAULT_URL_FOR_TEST
|
||||
|
||||
def test_lm_eval(self):
|
||||
"""Override to handle server lifecycle within test method (MI35x pattern)."""
|
||||
other_args = [
|
||||
"--tp",
|
||||
str(TP_SIZE),
|
||||
"--attention-backend",
|
||||
"triton",
|
||||
"--trust-remote-code",
|
||||
"--model-loader-extra-config",
|
||||
'{"enable_multithread_load": true}',
|
||||
"--watchdog-timeout",
|
||||
"1200",
|
||||
]
|
||||
env = os.environ.copy()
|
||||
env["SGLANG_USE_AITER"] = "1"
|
||||
|
||||
process = popen_launch_server(
|
||||
QWEN35_MODEL_PATH,
|
||||
self.base_url,
|
||||
timeout=SERVER_LAUNCH_TIMEOUT,
|
||||
other_args=other_args,
|
||||
env=env,
|
||||
)
|
||||
|
||||
try:
|
||||
requests.get(self.base_url + "/flush_cache")
|
||||
super().test_lm_eval()
|
||||
finally:
|
||||
kill_process_tree(process.pid)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user