Skip to content

fix(npu): support W4A8 expert weights in CAM MLP - #342

Merged
jiangkuaixue123 merged 2 commits into
vllm-project:mainfrom
bjf-frz:codex
Sep 14, 2026
Merged

jiangkuaixue123 merged 2 commits into
vllm-project:mainfrom
bjf-frz:codex

Conversation

@bjf-frz

@bjf-frz bjf-frz commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

CAM MLP needs the packed W4A8 weights, scales, and optional scale biases owned by the routed experts. Handle both static weights and dynamic EPLB weight lists, pass the per-channel quantization flag, and obtain the SwiGLU limit from the MLP wrapper.

Add 16 CPU contract tests covering dynamic EPLB, per-channel quantization, optional biases, and empty token batches. Update the existing quantization test mock for W4A8.

Validation:

  • 16 CPU contract tests passed.
  • Full configured pre-commit check passed in Linux CI, including Ruff and mypy.
  • DCO passed with author and committer bjf-frz frz123db@gmail.com.

The extracted change has not been deployed against the current upstream revision.

Signed-off-by: bjf-frz <frz123db@gmail.com>
],
w2_scale=[experts.get_eplb_parameter("w2_weight_scale")],
)
# ### PATCH START: W4A8 CAM expert weights

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. This is AFD-owned code, so there is no need for the PATCH START/END markers here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

LGTM. This is AFD-owned code, so there is no need for the PATCH START/END markers here.

Done, patch markers has been removed.

Signed-off-by: bjf-frz <frz123db@gmail.com>
@jiangkuaixue123
jiangkuaixue123 merged commit d5f5232 into vllm-project:main Sep 14, 2026
2 checks passed
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