Skip to content

[ExecuTorch][llm] Add MoE source transformation with INT4 quantized packing - #21121

Open
digantdesai wants to merge 4 commits into
gh/digantdesai/71/basefrom
gh/digantdesai/71/head
Open

[ExecuTorch][llm] Add MoE source transformation with INT4 quantized packing#21121
digantdesai wants to merge 4 commits into
gh/digantdesai/71/basefrom
gh/digantdesai/71/head

Conversation

@digantdesai

@digantdesai digantdesai commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

Add moe.py with a QuantizedMoEFFN module wrapping llama::quantized_moe_ffn, INT4 symmetric group quantization, torchao packing, and recursive module replacement. Preserve fp32 buffers and output dtype across model casts.

Dequantize a torchao-quantized gate into the custom op fp32 buffer so QAT models can be captured by torch.export without tensor-subclass dispatch failures.

Differential Revision: D102381994

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21121

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit d08e6cd with merge base 16b780b (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@github-actions

Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant