Skip to content

feat: add fused moe config for Qwen3-Next-80B-A3B-Instruct on B200#10631

Merged
zhyncs merged 1 commit intosgl-project:mainfrom
bytedance-iaas:feat/add-config-Qwen3-80B-on-B200
Sep 19, 2025
Merged

feat: add fused moe config for Qwen3-Next-80B-A3B-Instruct on B200#10631
zhyncs merged 1 commit intosgl-project:mainfrom
bytedance-iaas:feat/add-config-Qwen3-80B-on-B200

Conversation

@zixuanzhang226
Copy link
Copy Markdown
Contributor

Motivation

Add fused MoE config for Qwen3-Next-80B-A3B-Instruct on NVIDIA B200

Accuracy Tests

With config:
Screenshot 2025-09-18 at 4 54 21 PM
Without config:
Screenshot 2025-09-18 at 4 58 09 PM

Benchmarking

With config:

============ Serving Benchmark Result ============
Successful requests:                     512
Maximum request concurrency:             256
Request rate configured (RPS):           12.00
Benchmark duration (s):                  108.26
Total input tokens:                      1789330
Total generated tokens:                  768000
Request throughput (req/s):              4.73
Request goodput (req/s):                 4.73
Output token throughput (tok/s):         7094.27
Total Token throughput (tok/s):          23622.92
---------------Time to First Token----------------
Mean TTFT (ms):                          683.71
Median TTFT (ms):                        497.53
P50 TTFT (ms):                           497.53
P90 TTFT (ms):                           1422.95
P95 TTFT (ms):                           1652.33
P99 TTFT (ms):                           2197.77
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms):                          31.87
Median TPOT (ms):                        33.19
P50 TPOT (ms):                           33.19
P90 TPOT (ms):                           35.73
P95 TPOT (ms):                           36.00
P99 TPOT (ms):                           36.41
---------------Inter-token Latency----------------
Mean ITL (ms):                           31.87
Median ITL (ms):                         24.51
P50 ITL (ms):                            24.51
P90 ITL (ms):                            25.25
P95 ITL (ms):                            28.83
P99 ITL (ms):                            161.44
==================================================

Without config:

============ Serving Benchmark Result ============
Successful requests:                     512
Maximum request concurrency:             256
Request rate configured (RPS):           12.00
Benchmark duration (s):                  114.89
Total input tokens:                      1789330
Total generated tokens:                  768000
Request throughput (req/s):              4.46
Request goodput (req/s):                 4.46
Output token throughput (tok/s):         6684.48
Total Token throughput (tok/s):          22258.37
---------------Time to First Token----------------
Mean TTFT (ms):                          850.26
Median TTFT (ms):                        592.93
P50 TTFT (ms):                           592.93
P90 TTFT (ms):                           1909.28
P95 TTFT (ms):                           2278.52
P99 TTFT (ms):                           2565.70
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms):                          33.98
Median TPOT (ms):                        35.52
P50 TPOT (ms):                           35.52
P90 TPOT (ms):                           37.65
P95 TPOT (ms):                           37.89
P99 TPOT (ms):                           38.23
---------------Inter-token Latency----------------
Mean ITL (ms):                           33.98
Median ITL (ms):                         26.17
P50 ITL (ms):                            26.17
P90 ITL (ms):                            26.69
P95 ITL (ms):                            26.93
P99 ITL (ms):                            150.05
==================================================

Checklist

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @zixuanzhang226, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces an optimized configuration for the Qwen3-Next-80B-A3B-Instruct large language model, leveraging a fused Mixture-of-Experts architecture on NVIDIA B200 hardware. The primary goal is to boost inference performance, which has been successfully validated through comprehensive benchmarking, showing improved efficiency and responsiveness.

Highlights

  • New Fused MoE Configuration: A new fused Mixture-of-Experts (MoE) configuration has been added specifically for the Qwen3-Next-80B-A3B-Instruct model, optimized for deployment on NVIDIA B200 GPUs.
  • Performance Improvement: Benchmarking results demonstrate significant performance enhancements with the new configuration, including increased request throughput (from 4.46 req/s to 4.73 req/s), higher output token throughput (from 6684.48 tok/s to 7094.27 tok/s), and reduced Time to First Token (TTFT) and Time per Output Token (TPOT) latencies.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new fused MoE configuration for the Qwen3-Next-80B-A3B-Instruct model running on NVIDIA B200 GPUs. The change consists of adding a single JSON file with tuned Triton kernel parameters for various batch sizes. The benchmark results provided in the description clearly demonstrate a performance improvement with this new configuration. The implementation is straightforward and correct. This is a valuable addition for optimizing performance on newer hardware.

@zhyncs
Copy link
Copy Markdown
Collaborator

zhyncs commented Sep 19, 2025

Did you tune this on the sglang b200 using a script, or did you copy and paste it? Please paste the gsm8k result.

@zixuanzhang226
Copy link
Copy Markdown
Contributor Author

Did you tune this on the sglang b200 using a script, or did you copy and paste it? Please paste the gsm8k result.

I tuned it using benchmark/kernels/fused_moe_triton/tuning_fused_moe_triton.py, and the gsm8k result screenshot was included in the PR description already. Thanks!

@zhyncs zhyncs merged commit 8c52de6 into sgl-project:main Sep 19, 2025
2 checks passed
chenxu140 added a commit to ping1jing2/sglang that referenced this pull request Sep 20, 2025
* origin/qwen3: (30 commits)
  chore: bump sgl-kernel 0.3.11 (sgl-project#10630)
  feat: add fused moe config for Qwen3-Next-80B-A3B-Instruct on B200 (sgl-project#10631)
  model support: Sarashina2VisionForCausalLM (sgl-project#10632)
  [Performance] Qwen3-Next: speed up update_mamba_state_after_mtp_verify by 10x; e2e up to 3.54% faster (sgl-project#10586)
  [Performance] Qwen3-Next: replace arange to cached query_start_loc_li… (sgl-project#10553)
  [Feature] Speculative decoding support lookahead (sgl-project#9873)
  refactor: use registry for _get_attention_backend_from_str (sgl-project#10629)
  [router] refactor worker to builder pattern 1/n (sgl-project#10628)
  Garbage collector regression in the online server (sgl-project#10621)
  feat: Add FlexAttention Backend for Efficient Sparse Attention (sgl-project#9947)
  Fix bias handling in TritonMoeQuantInfo within quantization/mxfp4.py (sgl-project#10579)
  [Performance] qwen3-next improve causal conv1d in prefill phase (sgl-project#10595)
  Fix sgl_kernel import failure on devices other than CUDA (sgl-project#10610)
  support qwen3-next-fp8 deepep (sgl-project#10622)
  update deepep version for qwen3-next deepep moe (sgl-project#10624)
  Feat/add heartbeat mechanism for nixl conn (sgl-project#10222)
  [RL] Add destroy process group api (sgl-project#9979)
  fix deepep assert when PD disaggregation == null (sgl-project#8274)
  Scale kkt after reduction (sgl-project#10604)
  [improvement] add average input/output token length for hicache benchmark stats output (sgl-project#10525)
  ...
@HanHan009527 HanHan009527 deleted the feat/add-config-Qwen3-80B-on-B200 branch December 16, 2025 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants