Skip to content

fix(mtp): enable activation checkpointing for repeated dense MTP blocks - #3660

Open
pzelasko wants to merge 2 commits into
mainfrom
codex/mtp-attention-ac
Open

fix(mtp): enable activation checkpointing for repeated dense MTP blocks#3660
pzelasko wants to merge 2 commits into
mainfrom
codex/mtp-attention-ac

Conversation

@pzelasko

Copy link
Copy Markdown
Contributor

Summary

  • Restrict the repeated-MTP activation-checkpointing safety exclusion to physical MTP blocks that actually contain MoE layers with shared EP-sharded experts.
  • Allow repeated attention, dense MLP, and Mamba MTP blocks to use full or selective activation checkpointing.
  • Add coverage for both full and selective policies, verifying that a repeated attention block is wrapped while a repeated MoE block remains excluded.

This enables activation checkpointing for attention-only repeated MTP configurations used by SpeechLM while preserving the existing safety workaround for shared expert parameters.

Tests

  • pytest -q tests/unit_tests/moe/test_parallelizer.py — 87 passed
  • python -m ruff check nemo_automodel/components/moe/parallelizer.py tests/unit_tests/moe/test_parallelizer.py — passed

@pzelasko
pzelasko requested a review from a team as a code owner August 25, 2026 16:33
@copy-pr-bot

copy-pr-bot Bot commented Aug 25, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@akoumpa

akoumpa commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

/ok to test 0a84773

Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>
@pzelasko
pzelasko force-pushed the codex/mtp-attention-ac branch from 0a84773 to 7e822a3 Compare August 26, 2026 17:41
@pzelasko pzelasko changed the title Enable activation checkpointing for repeated dense MTP blocks fix(mtp): enable activation checkpointing for repeated dense MTP blocks Aug 26, 2026
@pzelasko

Copy link
Copy Markdown
Contributor Author

/ok to test 7e822a3

Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>
@pzelasko

Copy link
Copy Markdown
Contributor Author

/ok to test dfbfbfa

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