Skip to content

Skip fused_moe replacement when llm-compressor oneshot already linearizes experts#1966

Merged
changwangss merged 2 commits into
mainfrom
wangchang/skip_linarize_moe
Jul 1, 2026
Merged

Skip fused_moe replacement when llm-compressor oneshot already linearizes experts#1966
changwangss merged 2 commits into
mainfrom
wangchang/skip_linarize_moe

Conversation

@changwangss

@changwangss changwangss commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Description

llm-compressor added linearize_moe in oneshot for Transformers v5.x. After this step, MoE experts are already linearized, so AutoRound fused_moe replacement is redundant. This PR adds a skip path for already-linearized experts, keeps fused-only replacement handlers, clarifies logs as "after replacement/skip", and adds UT coverage for linearized detection, expert counting with mixed modules (e.g. act_fn), and skip behavior.

Type of Change

Bug fix

Related Issues

Fixes or relates to vllm-project/llm-compressor#2647
#1962

Checklist Before Submitting

  • My code has been tested locally.
  • Documentation has been updated as needed.
  • New or updated tests are included where applicable.
  • The CUDA CI has passed. You can trigger it by commenting /azp run Unit-Test-CUDA-AutoRound.

…5 flow

Signed-off-by: changwangss <chang1.wang@intel.com>
Signed-off-by: changwangss <chang1.wang@intel.com>
@chensuyue

Copy link
Copy Markdown
Contributor

/azp run Unit-Test-CUDA-AutoRound

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@yiliu30 yiliu30 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@changwangss changwangss merged commit 09d3dec into main Jul 1, 2026
47 checks passed
@changwangss changwangss deleted the wangchang/skip_linarize_moe branch July 1, 2026 02:13
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.

4 participants