Skip to content

[MoE] Skip the absorbed W2 forward replay under FullAC - #6430

Draft
Mystri wants to merge 2 commits into
pytorch:mainfrom
Mystri:codex/absorbed-w2-fullac
Draft

Mystri wants to merge 2 commits into
pytorch:mainfrom
Mystri:codex/absorbed-w2-fullac

Conversation

@Mystri

@Mystri Mystri commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Summary (human-written)

Why

With router scores absorbed before W2, the router gradient no longer needs W2's forward output. Default FullAC still replays the W2 forward GEMM. This is the replay change split out of #5976. DeepEP already uses absorption on main. HybridEP uses the same path once #5976 lands. Remat early-stop issue

What changes

Save absorbed native W2 together with its output cast. The scored input and BF16 weight copy can be rebuilt for backward. GPT-OSS saves the matching bias addition. Postprocessed experts, quantized projections, and LoRA keep the configured replay policy. Both gradient GEMMs still run.

Validation

In the earlier five-MoE-layer HybridEP comparison (56a213b vs 00a4eed54), grouped GEMMs fell from 40 to 35 per microbatch, with bitwise-identical loss and gradient norm over 12 FullAC updates. These are historical measurements. GPU replay counts, saved bytes, and peak memory still need validation on this draft.

@pytorch-bot

pytorch-bot Bot commented Nov 28, 2026

Copy link
Copy Markdown

The following ciflow label(s) have been added but CI has not been triggered yet because the workflows are awaiting approval:

  • ciflow/rl

Once a maintainer approves the workflows (scroll to the bottom of the PR page), the corresponding CI jobs will be triggered automatically. Please ping one of the reviewers if you do not have access to approve and run workflows.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 28, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/rl CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant