Skip to content

Conversation

@2ez4bz
Copy link
Collaborator

@2ez4bz 2ez4bz commented Jan 23, 2026

Summary by CodeRabbit

  • New Features

    • Added multimodal disaggregation support for Qwen3 VL MoE models.
  • Refactor

    • Optimized key-value head configuration handling in model weight mapping for Qwen3 variants.
    • Enhanced test infrastructure with CI-friendly model simulation support.

✏️ Tip: You can customize this high-level summary in your review settings.

Description

  • Why?

Trying to instantiate a MultimodalEncoder for a Qwen3 VL MoE model would fail during weight loading.

  • What?

This commit fixes the bug, alongside:

  • explicit, intentional support for EPD for Qwen3 VL MoE.
  • extends EPD unit tests for Qwen3 VL MoE, albeit with dummy weights.
  • unit tests for the weight mapper fixes.

Test Coverage

  • extends EPD unit tests for Qwen3 VL MoE, albeit with dummy weights.
  • unit tests for the weight mapper fixes.

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

  • Update tava architecture diagram if there is a significant design change in PR.

  • 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.

Details

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.

@2ez4bz 2ez4bz requested a review from a team as a code owner January 23, 2026 22:14
* Why?

Trying to instantiate a `MultimodalEncoder` for a Qwen3 VL MoE model
would fail during weight loading.

* What?

This commit fixes the bug, alongside:
- explicit, intentional support for EPD for Qwen3 VL MoE.
- extends EPD unit tests for Qwen3 VL MoE, albeit with dummy weights.
- unit tests for the weight mapper fixes.

Signed-off-by: William Zhang <133824995+2ez4bz@users.noreply.github.com>
@2ez4bz 2ez4bz force-pushed the dev-qwen3-vl-moe-epd branch from 43e9004 to fb276fb Compare January 23, 2026 22:15
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 23, 2026

📝 Walkthrough

Walkthrough

The pull request refactors weight mapper property initialization to computed properties, applies multimodal disaggregation decorator support to Qwen3-VL MoE models, and extends test infrastructure to support fake Qwen3-VL models for CI-friendly testing scenarios.

Changes

Cohort / File(s) Summary
Weight mapper property refactoring
tensorrt_llm/_torch/models/checkpoints/hf/qwen3_moe_weight_mapper.py, tensorrt_llm/_torch/models/checkpoints/hf/qwen3vl_moe_weight_mapper.py
Converted _num_kv_heads from initialization-time field to computed properties. Qwen3MoeHfWeightMapper uses fallback logic (num_key_value_heads or num_attention_heads). Qwen3VLMoeHfWeightMapper distinguishes between TextConfig and VisionConfig, raising TypeError for unexpected types. Added imports for config types from transformers.
Multimodal decorator support
tensorrt_llm/_torch/models/modeling_qwen3vl_moe.py
Applied @support_multimodal_disaggregated decorator to Qwen3MoeVLModel class. Added import of decorator from tensorrt_llm._torch.models.inputs. Added explanatory comment on decorator rationale.
Test infrastructure for fake models
tests/unittest/_torch/multimodal/test_mm_encoder_standalone.py
Extended test fixtures and helpers to support lightweight fake Qwen3-VL-30B-A3B-FP8 model for CI environments. Added path constants, config modification helper, fake directory creation via symlinking, and checkpoint detection. Modified model_dir fixture signature to accept tmp_path_factory. Introduced helpers: _get_fake_qwen3_vl_30b_a3b_config(), _create_fake_qwen3_vl_30b_a3b_fp8_dir(), _get_fake_checkpoint_kwargs(), _is_fake_checkpoint(). Updated test fixtures and test methods to propagate fake checkpoint kwargs through encoder and LLM initialization paths. Added import for copy module.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 26.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding EPD (Early Parameter Disaggregation) support for Qwen3 VL MoE model, which directly aligns with the changeset.
Description check ✅ Passed The description includes both required sections (Description with Why/What context and Test Coverage details) and follows the template structure with clear explanations of the bug fix and supporting changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

@2ez4bz
Copy link
Collaborator Author

2ez4bz commented Jan 23, 2026

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #33411 [ run ] triggered by Bot. Commit: fb276fb

@tensorrt-cicd
Copy link
Collaborator

PR_Github #33411 [ run ] completed with state SUCCESS. Commit: fb276fb
/LLM/release-1.2/L0_MergeRequest_PR pipeline #213 completed with status: 'FAILURE'

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

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