Skip to content

Conversation

Funatiq
Copy link
Collaborator

@Funatiq Funatiq commented Oct 8, 2025

Summary by CodeRabbit

  • Documentation

    • Added a quick-start guide for running Qwen3-Next on TensorRT-LLM, including setup, configuration, server launch, usage examples, troubleshooting, and benchmarking.
    • Updated supported models and feature matrix to include Qwen3NextForCausalLM.
  • Tests

    • Introduced accuracy tests for Qwen3-Next-80B-A3B-Thinking with predefined parallelism settings.
    • Added new accuracy references for GSM8K and MMLU.
  • Chores

    • Updated CI pipelines to trigger and run new Qwen3-Next test stages on supported hardware.

Description

Test Coverage

PR Checklist

Please review the following before submitting your PR:

  • PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.

  • PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.

  • Test cases are provided for new code paths (see test instructions)

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • The reviewers assigned automatically/manually are appropriate for the PR.

  • Please check this after reviewing the above items as appropriate for this PR.

GitHub Bot Help

/bot [-h] ['run', 'kill', 'skip', 'reuse-pipeline'] ...

Provide a user friendly way for developers to interact with a Jenkins server.

Run /bot [-h|--help] to print this help message.

See details below for each supported subcommand.

run [--reuse-test (optional)pipeline-id --disable-fail-fast --skip-test --stage-list "A10-PyTorch-1, xxx" --gpu-type "A30, H100_PCIe" --test-backend "pytorch, cpp" --add-multi-gpu-test --only-multi-gpu-test --disable-multi-gpu-test --post-merge --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" --detailed-log --debug(experimental)]

Launch build/test pipelines. All previously running jobs will be killed.

--reuse-test (optional)pipeline-id (OPTIONAL) : Allow the new pipeline to reuse build artifacts and skip successful test stages from a specified pipeline or the last pipeline if no pipeline-id is indicated. If the Git commit ID has changed, this option will be always ignored. The DEFAULT behavior of the bot is to reuse build artifacts and successful test results from the last pipeline.

--disable-reuse-test (OPTIONAL) : Explicitly prevent the pipeline from reusing build artifacts and skipping successful test stages from a previous pipeline. Ensure that all builds and tests are run regardless of previous successes.

--disable-fail-fast (OPTIONAL) : Disable fail fast on build/tests/infra failures.

--skip-test (OPTIONAL) : Skip all test stages, but still run build stages, package stages and sanity check stages. Note: Does NOT update GitHub check status.

--stage-list "A10-PyTorch-1, xxx" (OPTIONAL) : Only run the specified test stages. Examples: "A10-PyTorch-1, xxx". Note: Does NOT update GitHub check status.

--gpu-type "A30, H100_PCIe" (OPTIONAL) : Only run the test stages on the specified GPU types. Examples: "A30, H100_PCIe". Note: Does NOT update GitHub check status.

--test-backend "pytorch, cpp" (OPTIONAL) : Skip test stages which don't match the specified backends. Only support [pytorch, cpp, tensorrt, triton]. Examples: "pytorch, cpp" (does not run test stages with tensorrt or triton backend). Note: Does NOT update GitHub pipeline status.

--only-multi-gpu-test (OPTIONAL) : Only run the multi-GPU tests. Note: Does NOT update GitHub check status.

--disable-multi-gpu-test (OPTIONAL) : Disable the multi-GPU tests. Note: Does NOT update GitHub check status.

--add-multi-gpu-test (OPTIONAL) : Force run the multi-GPU tests in addition to running L0 pre-merge pipeline.

--post-merge (OPTIONAL) : Run the L0 post-merge pipeline instead of the ordinary L0 pre-merge pipeline.

--extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" (OPTIONAL) : Run the ordinary L0 pre-merge pipeline and specified test stages. Examples: --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx".

--detailed-log (OPTIONAL) : Enable flushing out all logs to the Jenkins console. This will significantly increase the log volume and may slow down the job.

--debug (OPTIONAL) : Experimental feature. Enable access to the CI container for debugging purpose. Note: Specify exactly one stage in the stage-list parameter to access the appropriate container environment. Note: Does NOT update GitHub check status.

For guidance on mapping tests to stage names, see docs/source/reference/ci-overview.md
and the scripts/test_to_stage_mapping.py helper.

kill

kill

Kill all running builds associated with pull request.

skip

skip --comment COMMENT

Skip testing for latest commit on pull request. --comment "Reason for skipping build/test" is required. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

reuse-pipeline

reuse-pipeline

Reuse a previous pipeline to validate current commit. This action will also kill all currently running builds associated with the pull request. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

@Funatiq
Copy link
Collaborator Author

Funatiq commented Oct 8, 2025

/bot run

@Funatiq Funatiq changed the title Dev/qwen3 next guide [None][doc] Add Qwen3 Next Quick Start Guide Oct 8, 2025
@Funatiq Funatiq force-pushed the dev/qwen3-next-guide branch from 14293a4 to f34375f Compare October 8, 2025 10:17
@tensorrt-cicd
Copy link
Collaborator

PR_Github #20786 [ run ] triggered by Bot

faradawn and others added 3 commits October 8, 2025 10:21
Signed-off-by: Faradawn Yang <[email protected]>
- Updated L0_Test.groovy to include auto_trigger for Qwen3Next.
- Added TestQwen3NextThinking class in test_llm_api_pytorch.py for accuracy testing.
- Updated l0_dgx_h100.yml to include new test case for Qwen3Next under specific conditions.

Signed-off-by: Robin Kobus <[email protected]>
@Funatiq Funatiq force-pushed the dev/qwen3-next-guide branch from f34375f to 5596ca7 Compare October 8, 2025 10:22
@Funatiq
Copy link
Collaborator Author

Funatiq commented Oct 8, 2025

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #20787 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #20786 [ run ] completed with state ABORTED
LLM/main/L0_MergeRequest_PR #15714 (Blue Ocean) completed with status: ABORTED

@tensorrt-cicd
Copy link
Collaborator

PR_Github #20787 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #15715 completed with status: 'FAILURE'

@Funatiq
Copy link
Collaborator Author

Funatiq commented Oct 9, 2025

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #20870 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #20870 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #15786 completed with status: 'FAILURE'

@Funatiq
Copy link
Collaborator Author

Funatiq commented Oct 9, 2025

/bot skip --comment "Unrelated test failure"

@Funatiq Funatiq marked this pull request as ready for review October 9, 2025 10:57
@Funatiq Funatiq requested review from a team as code owners October 9, 2025 10:57
Copy link
Contributor

coderabbitai bot commented Oct 9, 2025

📝 Walkthrough

Walkthrough

Adds Qwen3-Next documentation (quick-start for TensorRT-LLM and supported models entries), extends CI to recognize and launch Qwen3Next-specific Jenkins stages, and introduces accuracy references and an integration test for Qwen3-Next-80B-A3B-Thinking with corresponding test gating on DGX H100 (4 GPUs).

Changes

Cohort / File(s) Summary
Docs — Qwen3-Next quick start and model listings
docs/source/deployment-guide/quick-start-recipe-for-qwen3-next-on-trtllm.md, docs/source/models/supported-models.md
New quick-start guide for running Qwen3-Next on TensorRT-LLM; updates supported models tables to include Qwen3NextForCausalLM entries.
CI — Jenkins stage routing
jenkins/L0_Test.groovy
Adds detection of “-Qwen3Next-” in stage names to set auto_trigger=qwen3_next; introduces a corresponding DGX H100 4-GPU PyTorch test job entry.
Tests — Accuracy references
tests/integration/defs/accuracy/references/gsm8k.yaml, tests/integration/defs/accuracy/references/mmlu.yaml
Adds accuracy entries for Qwen3/Qwen3-Next-80B-A3B-Thinking to GSM8K and MMLU reference YAMLs.
Tests — Integration harness
tests/integration/defs/accuracy/test_llm_api_pytorch.py
Adds TestQwen3NextThinking with parameterized auto-dtype test for (tp=4, pp=1, ep=4); configures KV cache and CUDA graphs; runs MMLU and GSM8K.
Tests — Gating list
tests/integration/test_lists/test-db/l0_dgx_h100.yml
Adds pre-merge gating blocks for TestQwen3NextThinking::test_auto_dtype[tp4ep4] on 4 GPUs with auto_trigger: qwen3_next.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev as Developer
  participant Git as Repo
  participant J as Jenkins
  participant M as getMakoArgsFromStageName
  participant L as launchTestJobs

  Dev->>Git: Push/PR with stage name containing "-Qwen3Next-"
  J->>M: Resolve MakO args for stage name
  M-->>J: auto_trigger = qwen3_next
  J->>L: Launch tests with auto_trigger=qwen3_next
  L-->>J: Queue DGX_H100-4_GPUs-PyTorch-Qwen3Next-1
  J->>J: Run TestQwen3NextThinking (tp4, pp1, ep4)
  J-->>Dev: Report test results
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description remains populated only with the template placeholders and lacks any actual content in the Description and Test Coverage sections, so it fails to convey the purpose of the changes and the associated test coverage. Please fill in the Description section with a concise summary of the changes and their rationale and complete the Test Coverage section by listing the relevant tests that validate those changes.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title correctly follows the repository naming convention and succinctly describes the addition of the Qwen3 Next quick start guide, matching the main change introduced by this documentation update.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
docs/source/deployment-guide/quick-start-recipe-for-qwen3-next-on-trtllm.md (2)

24-30: Add language specifier to code block.

The code block starting at line 24 should specify shell as the language for proper syntax highlighting and rendering.

Apply this diff:

-```
+```shell
 cd TensorRT-LLM

176-178: Add language specifier to code block.

The response example should specify json as the language for proper syntax highlighting.

Apply this diff:

-```
+```json
 {"id":"chatcmpl-64ac201c77bf46a7a3a4eca7759b1fd8",...}
tests/integration/test_lists/test-db/l0_dgx_h100.yml (1)

171-185: Consider adding orchestrator term for consistency.

The new Qwen3Next gating block is missing the orchestrator: mpi term. While the Jenkins pipeline will add this by default (line 1291 in jenkins/L0_Test.groovy), explicitly including it would improve consistency with other similar blocks at lines 14-16 (auto_trigger: others), 103-104 (auto_trigger: deepseek), and 161-162 (auto_trigger: gpt_oss).

Apply this diff:

     terms:
       stage: pre_merge
       backend: pytorch
       auto_trigger: qwen3_next
+      orchestrator: mpi
   tests:
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e986165 and 5596ca7.

📒 Files selected for processing (7)
  • docs/source/deployment-guide/quick-start-recipe-for-qwen3-next-on-trtllm.md (1 hunks)
  • docs/source/models/supported-models.md (2 hunks)
  • jenkins/L0_Test.groovy (2 hunks)
  • tests/integration/defs/accuracy/references/gsm8k.yaml (1 hunks)
  • tests/integration/defs/accuracy/references/mmlu.yaml (1 hunks)
  • tests/integration/defs/accuracy/test_llm_api_pytorch.py (1 hunks)
  • tests/integration/test_lists/test-db/l0_dgx_h100.yml (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{h,hpp,hh,hxx,cpp,cxx,cc,cu,cuh,py}

📄 CodeRabbit inference engine (CODING_GUIDELINES.md)

Use only spaces, no tabs; indent with 4 spaces.

Files:

  • tests/integration/defs/accuracy/test_llm_api_pytorch.py
**/*.py

📄 CodeRabbit inference engine (CODING_GUIDELINES.md)

**/*.py: Python code must target Python 3.8+.
Indent Python code with 4 spaces; do not use tabs.
Maintain module namespace when importing; prefer 'from package.subpackage import foo' then 'foo.SomeClass()' instead of importing the class directly.
Python filenames should be snake_case (e.g., some_file.py).
Python classes use PascalCase names.
Functions and methods use snake_case names.
Local variables use snake_case; prefix 'k' for variables that start with a number (e.g., k_99th_percentile).
Global variables use upper SNAKE_CASE prefixed with 'G' (e.g., G_MY_GLOBAL).
Constants use upper SNAKE_CASE (e.g., MY_CONSTANT).
Avoid shadowing variables from an outer scope.
Initialize all externally visible members of a class in the constructor.
Prefer docstrings for interfaces that may be used outside a file; comments for in-function or file-local interfaces.
Use Google-style docstrings for classes and functions (Sphinx-parsable).
Document attributes and variables inline so they render under the class/function docstring.
Avoid reflection when a simpler, explicit approach suffices (e.g., avoid dict(**locals()) patterns).
In try/except, catch the most specific exceptions possible.
For duck-typing try/except, keep the try body minimal and use else for the main logic.

Files:

  • tests/integration/defs/accuracy/test_llm_api_pytorch.py
**/*.{cpp,cxx,cc,h,hpp,hh,hxx,cu,cuh,py}

📄 CodeRabbit inference engine (CODING_GUIDELINES.md)

Prepend the NVIDIA Apache-2.0 copyright header with current year to the top of all source files (e.g., .cpp, .h, .cu, .py).

Files:

  • tests/integration/defs/accuracy/test_llm_api_pytorch.py
🧠 Learnings (1)
📚 Learning: 2025-08-26T09:49:04.956Z
Learnt from: pengbowang-nv
PR: NVIDIA/TensorRT-LLM#7192
File: tests/integration/test_lists/test-db/l0_dgx_b200.yml:56-72
Timestamp: 2025-08-26T09:49:04.956Z
Learning: In TensorRT-LLM test configuration files, the test scheduling system handles wildcard matching with special rules that prevent duplicate test execution even when the same tests appear in multiple yaml files with overlapping GPU wildcards (e.g., "*b200*" and "*gb200*").

Applied to files:

  • tests/integration/test_lists/test-db/l0_dgx_h100.yml
🧬 Code graph analysis (1)
tests/integration/defs/accuracy/test_llm_api_pytorch.py (4)
tests/integration/defs/accuracy/accuracy_core.py (5)
  • LlmapiAccuracyTestHarness (844-855)
  • MMLU (315-329)
  • evaluate (184-245)
  • evaluate (763-773)
  • GSM8K (332-347)
tests/integration/defs/conftest.py (2)
  • llm_models_root (78-92)
  • get_device_count (1978-1980)
tensorrt_llm/llmapi/llm_args.py (2)
  • KvCacheConfig (1106-1240)
  • CudaGraphConfig (109-166)
tensorrt_llm/llmapi/llm.py (1)
  • LLM (1084-1100)
🪛 markdownlint-cli2 (0.18.1)
docs/source/deployment-guide/quick-start-recipe-for-qwen3-next-on-trtllm.md

24-24: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


176-176: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🔇 Additional comments (1)
tests/integration/defs/accuracy/test_llm_api_pytorch.py (1)

3563-3592: Verify the max_batch_size configuration.

The test implementation follows established patterns correctly and properly integrates with the test harness. However, max_batch_size=720 (line 3579) is significantly higher than similar models:

  • Qwen3-30B-A3B uses max_batch_size=32 (line 2883)
  • Qwen3-8B uses max_batch_size=64 (line 2673)

For an 80B model with 60% KV cache memory allocation, verify whether:

  1. 720 is intentional for specific throughput testing scenarios
  2. This should be a lower value to avoid potential OOM issues in CI
  3. This is a typo (e.g., should be 72)

Otherwise, the implementation is clean and consistent with the codebase patterns.

--result-filename "concurrency_${concurrency}.json"
```

For more benchmarking options see <https://github.com/NVIDIA/TensorRT-LLM/blob/main/tensorrt\_llm/serve/scripts/benchmark\_serving.py>.
Copy link
Contributor

@coderabbitai coderabbitai bot Oct 9, 2025

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix broken URL with escaped underscores.

The URL contains escaped underscores (\_) which will break the link. These should be regular underscores.

Apply this diff:

-For more benchmarking options see <https://github.com/NVIDIA/TensorRT-LLM/blob/main/tensorrt\_llm/serve/scripts/benchmark\_serving.py>.
+For more benchmarking options see <https://github.com/NVIDIA/TensorRT-LLM/blob/main/tensorrt_llm/serve/scripts/benchmark_serving.py>.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
For more benchmarking options see <https://github.com/NVIDIA/TensorRT-LLM/blob/main/tensorrt\_llm/serve/scripts/benchmark\_serving.py>.
For more benchmarking options see <https://github.com/NVIDIA/TensorRT-LLM/blob/main/tensorrt_llm/serve/scripts/benchmark_serving.py>.
🤖 Prompt for AI Agents
In docs/source/deployment-guide/quick-start-recipe-for-qwen3-next-on-trtllm.md
around line 237 the link contains escaped underscores (`\_`) which break the
URL; replace each `\_` with a plain underscore so the URL reads
https://github.com/NVIDIA/TensorRT-LLM/blob/main/tensorrt_llm/serve/scripts/benchmark_serving.py
(update the markdown to use the corrected, unescaped underscores).

Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe this change should be applied. @Funatiq , @faradawn

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

@tensorrt-cicd
Copy link
Collaborator

PR_Github #20889 [ skip ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #20889 [ skip ] completed with state SUCCESS
Skipping testing for commit 5596ca7

Copy link
Contributor

@faradawn faradawn left a comment

Choose a reason for hiding this comment

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

Looks good. Old PR: #8007

@Funatiq
Copy link
Collaborator Author

Funatiq commented Oct 10, 2025

/bot run --stage-list "DGX_H100-4_GPUs-PyTorch-Others-1"

@tensorrt-cicd
Copy link
Collaborator

PR_Github #21021 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #21021 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #15894 (Partly Tested) completed with status: 'SUCCESS'

- Remove Qwen3Next stage.
- Add Qwen3Next test to PyTorch-Others stage instead.

Signed-off-by: Robin Kobus <[email protected]>
@Funatiq Funatiq force-pushed the dev/qwen3-next-guide branch from 9aed666 to 10f48af Compare October 10, 2025 11:51
@Funatiq
Copy link
Collaborator Author

Funatiq commented Oct 10, 2025

/bot run --stage-list "DGX_H100-4_GPUs-PyTorch-Others-1"

@tensorrt-cicd
Copy link
Collaborator

PR_Github #21031 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #21031 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #15900 (Partly Tested) completed with status: 'SUCCESS'


## Introduction

This is a functional quick-start guide for running the Qwen3-Next model on TensorRT LLM. It focuses on a working setup with recommended defaults. Additional performance optimizations and support (such as Blackwell) will be rolled out in future updates.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's remove such on Blackwell


## Prerequisites

* GPU: NVIDIA Hopper Architecture
Copy link
Collaborator

Choose a reason for hiding this comment

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

GPU: NVIDIA Blackwell and Hopper Architecture

trtllm-serve Qwen/Qwen3-Next-80B-A3B-Thinking \
--host 0.0.0.0 \
--port 8000 \
--backend pytorch \
Copy link
Collaborator

Choose a reason for hiding this comment

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

No need to specify --bakcend Pytorch explicitly.

* **Description:** A value between `0.0` and `1.0` that specifies the fraction of free GPU memory to reserve for the KV cache after the model is loaded. Since memory usage can fluctuate, this buffer helps prevent out-of-memory (OOM) errors.
* **Recommendation:** If you experience OOM errors, try reducing this value to `0.7` or lower.

#### `--backend pytorch`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove this section

- accuracy/test_llm_api_pytorch.py::TestLlama3_1_8BInstruct::test_fp8_4gpus[tp2pp2-fp8kv=True-attn_backend=TRTLLM-torch_compile=False]
- accuracy/test_llm_api_pytorch.py::TestLlama3_1_8BInstruct::test_fp8_4gpus[tp2pp2-fp8kv=True-attn_backend=TRTLLM-torch_compile=True]
- accuracy/test_llm_api_pytorch.py::TestLlama3_1_8BInstruct::test_guided_decoding_4gpus[xgrammar]
- accuracy/test_llm_api_pytorch.py::TestQwen3NextThinking::test_auto_dtype[tp4ep4]
Copy link
Collaborator

Choose a reason for hiding this comment

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

I prefer to put this case under l0_dgx_b200.yml

@faradawn
Copy link
Contributor

faradawn commented Oct 12, 2025

I saw that the new cherry pick PR includes all the changes: #8288. Do we need to modify this PR?

@Funatiq Funatiq closed this Oct 13, 2025
@Funatiq Funatiq deleted the dev/qwen3-next-guide branch October 13, 2025 07:49
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.

6 participants