Skip to content

[trainer memory] Split Nemotron-3.5-Lightning 64K experts across both GPUs again - #331

Closed
Micah Yong (micahtyong) wants to merge 1 commit into
mainfrom
micah/nemotron-perf/revert-expert-parallel-1
Closed

Micah Yong (micahtyong) wants to merge 1 commit into
mainfrom
micah/nemotron-perf/revert-expert-parallel-1

Conversation

@micahtyong

@micahtyong Micah Yong (micahtyong) commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

#246 put all 128 experts of nemotron35-lightning-30b-a3b-lora-64k on both GPUs (expert_model_parallel_size 1). Since #257, that layout has to set aside a copy of the adapter gradients during every training call, because the gradient reduce on this layout would otherwise rescale gradients kept from earlier calls. On this recipe the copy is 12.85 GB per GPU. Measured before #257, four clients each training a 64K-token row already peaked at 130 GB of a 140 GB H200, and 16K-token rows at 65,536 tokens per micro-batch reserved 132 GB, so with the copy those cases are expected to run out of memory. A run on main to confirm is in progress.

This PR splits the experts across the two GPUs again (expert_model_parallel_size 2), the layout the recipe used before #246. On that layout the reduce leaves kept gradients unchanged, so #257 skips the copy. Training is slower on short-row batches (about 12.2 s instead of about 9.1 s of forward_backward for 128 rows of 1,600 tokens on 2x H200), until a layout that keeps the speed without the copy is measured.

E2E results

Setup: 2x H200, one client, stock Tinker SDK, LoRA rank 32. Numbers are from earlier runs of these two layouts; this branch is a one-line revert.

Layout Gradient copy with #257 Four clients x one 64K-token row
Experts on both GPUs (#246) 12.85 GB per GPU every call 130 GB of 140 before the copy
Experts split (this PR) none not measured; one 64K-token row peaks at 78.6 GB

Reverts #246 until a layout that avoids the per-call gradient copy is measured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@micahtyong

Copy link
Copy Markdown
Collaborator Author

Superseded by #332, which folds the B300 layout into nemotron35-lightning-30b-a3b-lora-64k and moves the H200 layout to nemotron35-lightning-30b-a3b-lora-64k-h200.

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.

1 participant