minimal reproduction of token superposition training#5645
Conversation
Token superposition patch notesThis prototype adds one parameter-free training mode to
Stage 1 exampleFor baseline processed length 4096 and bag size 6: --train-iters 100000 \
--exit-interval 5000 \
--save /checkpoints/my_run \
--token-superposition-size 6 \
--seq-length 24576 \
--max-position-embeddings 24576 \
--no-create-attention-mask-in-dataloaderThe decoder receives 4096 latent positions. Stop and save at the desired phase boundary using Megatron's normal checkpoint options. Stage 2 exampleResume the same checkpoint with: --train-iters 100000 \
--load /checkpoints/my_run \
--save /checkpoints/my_run \
--token-superposition-size 1 \
--seq-length 4096 \
--max-position-embeddings 24576Keep Deliberate first-pass restrictionsThe implementation raises an error for pipeline parallelism, context parallelism, packed/SFT sequences, explicit attention masks, padding masks, learned absolute position embeddings, and Megatron MTP. Tensor, data, expert, and sequence parallel paths are left intact. The implementation has been syntax-checked and its loss indexing was numerically checked against the paper's padded-reference formulation, but it has not been executed as a full distributed Megatron training job in this environment. |
What does this PR do?
Issue tracking
For PRs from open-source community contributors:
Linked issue:
Contribution process
Pre-checks
Code review
Feel free to message or comment @NVIDIA/mcore-oncall to help accelerate your merge into main. The less complex your PR is, the faster it will be approved and merged!
All PRs start as draft. If you open a non-draft PR, it will be automatically converted to draft.
Step 1: Mark PR as "Ready for Review"
.github/CODEOWNERS.Final Review might get declined if these requirements are not fulfilled.
Step 2: Final Review
For PRs that change
megatron/core, once all expert reviewers have approved, theFinal Reviewlabel is applied automatically and final reviewers are assigned.For PRs outside
megatron/core, this step is skipped.Step 3: Approved
Once all required reviewers have approved, the
Approvedlabel is applied automatically.Merge
Any member of mcore-engineers will be able to merge your PR.