Skip to content

[ModelOPT] Support Qwen 3 Next Coder NVFP4#18224

Merged
b8zhong merged 2 commits intosgl-project:mainfrom
bzhng-development:vz/qwen3-next-nvfp4-coder
Feb 8, 2026
Merged

[ModelOPT] Support Qwen 3 Next Coder NVFP4#18224
b8zhong merged 2 commits intosgl-project:mainfrom
bzhng-development:vz/qwen3-next-nvfp4-coder

Conversation

@vincentzed
Copy link
Contributor

Motivation

This branch include important bugfix for qwen 3 coder next nvfp4

B300

sglang serve --model vincentzed-hf/Qwen3-Coder-Next-NVFP4 --quantization modelopt_fp4

We provide cmd to reproduce the same checkpoint in ModelOpt in the model card above.
https://huggingface.co/vincentzed-hf/Qwen3-Coder-Next-NVFP4

python3 benchmark/gsm8k/bench_sglang.py --num-shots 8 --num-questions 2500 --parallel 399 --platinum
Loading GSM8K Platinum dataset from HuggingFace...
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1209/1209 [00:32<00:00, 36.84it/s]
Accuracy: 0.969
Invalid: 0.000
Latency: 32.889 s
Output throughput: 4610.959 token/s

Modifications

Accuracy Tests

Benchmarking and Profiling

Checklist

Review Process

  1. Ping Merge Oncalls to start the PR flow. See the PR Merge Process.
  2. Get approvals from CODEOWNERS and other reviewers.
  3. Trigger CI tests with comments or contact authorized users to do so.
    • /tag-run-ci-label, /rerun-failed-ci, /tag-and-rerun-ci
  4. After green CI and required approvals, ask Merge Oncalls to merge.

Signed-off-by: vincentzed <207368749+vincentzed@users.noreply.github.com>
@gemini-code-assist
Copy link
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@vincentzed vincentzed marked this pull request as ready for review February 4, 2026 05:04
@gemini-code-assist
Copy link
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

"qkv_proj": ["q_proj", "k_proj", "v_proj"],
"gate_up_proj": ["gate_proj", "up_proj"],
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to do it not inside of model?
You do it in Qwen3-Next and Qwen3 #18189. What about other models? is it framework specific or model specific?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's because qkv and o proj are NVFP4 in these two recipes

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I don't get your point. Can we do it not in the model? I believe it should in the quantization part python/sglang/srt/layers/quantization/

@b8zhong
Copy link
Collaborator

b8zhong commented Feb 4, 2026

/tag-and-rerun-ci

@b8zhong b8zhong enabled auto-merge (squash) February 4, 2026 16:55
@github-actions github-actions bot added the run-ci label Feb 4, 2026
Copy link
Contributor

@ssshinigami ssshinigami left a comment

Choose a reason for hiding this comment

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

Looks not correct to change models for this fix. It is quantization specific things, and should be in quantization part.

@vincentzed
Copy link
Contributor Author

/rerun-failed-ci

@b8zhong b8zhong merged commit bf89cc3 into sgl-project:main Feb 8, 2026
235 of 247 checks passed
@b8zhong b8zhong deleted the vz/qwen3-next-nvfp4-coder branch February 8, 2026 22:43
@b8zhong
Copy link
Collaborator

b8zhong commented Feb 8, 2026

Hi @ssshinigami , we'll try to clean up the code soon, as there is a lot of other related quantization codes in weight loading still unfortunately..

charlesHsuGG pushed a commit to charlesHsuGG/sglang that referenced this pull request Feb 9, 2026
Signed-off-by: vincentzed <207368749+vincentzed@users.noreply.github.com>
Johnsonms pushed a commit to Johnsonms/sglang that referenced this pull request Feb 14, 2026
Signed-off-by: vincentzed <207368749+vincentzed@users.noreply.github.com>
1StepForever pushed a commit to 1StepForever/sglang that referenced this pull request Feb 26, 2026
* www/pr/ks: (265 commits)
  [BugFix][PD]Fix metadata_buffer_index leak when aborted in PD (sgl-project#17483)
  Refactoring Mooncake TE as a shared distributed component (sgl-project#17810)
  [ModelOPT] Support Qwen 3 Next Coder NVFP4 (sgl-project#18224)
  Update author information in pyproject.toml (sgl-project#18453)
  [Kimi-K2.5] Fix missing `quant_config` in `KimiK25` (sgl-project#18440)
  Add tensor parallelism support to LFM2 ShortConv layers (sgl-project#17777)
  [diffusion] chore: revise process title (sgl-project#18446)
  Fix TRT-LLM MLA backend applying k_scale to BF16 KV cache in BMM1 (sgl-project#18396)
  [diffusion] refactor: group component loaders under the component_loaders/ directory (sgl-project#18438)
  [ModelOpt] Fix broken Qwen3-235B-A22B-Instruct-2507-NVFP4 launch (sgl-project#18189)
  [diffusion] feat: support efficient sequence shard (sgl-project#18161)
  [CI] fix: notebook ci may not working (sgl-project#18417)
  fix: sync server_args.kv_cache_dtype when detecting FP8 KV cache (sgl-project#18394)
  [Fix] Fix backend selection after flashinfer version update (sgl-project#18364)
  [diffusion] platform: support WAN/FLUX/Qwen-Image/Qwen-Image-edit on Ascend (sgl-project#13662)
  fix: fix NVFP4 Kimi-K2.5 weight mapping and exclude list (sgl-project#18370)
  [diffusion] feat: support saving videos directly on the server to avoid the overhead of tensor transfer (sgl-project#18253)
  [diffusion] fix: respect dist_timeout option (sgl-project#18386)
  [Doc] Fix outdated `--fp4-gemm-backend` documentation (sgl-project#18350)
  [diffusion] fix: remove unnecessary norm_type argument from GLM-Image dits (sgl-project#18382)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants