Skip to content

refine qwen3_vl_moe experts forward#1413

Merged
WeiweiZhang1 merged 3 commits intomainfrom
refine_qwen3_vl_moe_experts_forward
Feb 6, 2026
Merged

refine qwen3_vl_moe experts forward#1413
WeiweiZhang1 merged 3 commits intomainfrom
refine_qwen3_vl_moe_experts_forward

Conversation

@WeiweiZhang1
Copy link
Contributor

@WeiweiZhang1 WeiweiZhang1 commented Feb 5, 2026

Description

Please briefly describe your main changes, the motivation.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Performance improvement
  • Code refactoring
  • Other (please specify):

Related Issues

Fixes or relates to #

Checklist Before Submitting

  • My code has been tested locally.
  • Documentation has been updated as needed.
  • New or updated tests are included where applicable.

The measured accuracy of the quantized model are the same as before.

Copilot AI review requested due to automatic review settings February 5, 2026 14:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refines the expert forward pass logic in the Qwen3 VL MoE (Mixture of Experts) implementation, optimizing how experts are selected and invoked during inference.

Changes:

  • Wrapped expert mask computation in torch.no_grad() to prevent gradient tracking for this operation
  • Restructured the expert iteration logic to skip unused experts when calibrate_all_experts is False
  • Simplified tensor indexing by removing unnecessary .squeeze(0) operation

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

@yiliu30 yiliu30 left a comment

Choose a reason for hiding this comment

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

LGTM

@WeiweiZhang1 WeiweiZhang1 merged commit 2824c37 into main Feb 6, 2026
29 checks passed
@WeiweiZhang1 WeiweiZhang1 deleted the refine_qwen3_vl_moe_experts_forward branch February 6, 2026 05:40
@WeiweiZhang1 WeiweiZhang1 added this to the 0.10.0 milestone Feb 6, 2026
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.

3 participants