Repository navigation
Handle checkpoint and text-only batches in MIMO encoder prefetch - #6039
Merged
yashaswikarnati merged 2 commits intoAug 6, 2026
Merged
yashaswikarnati merged 2 commits into
yashaswikarnati merged 2 commits into
Conversation
Signed-off-by: ykarnati <ykarnati@nvidia.com>
Signed-off-by: ykarnati <ykarnati@nvidia.com>
yashaswikarnati
marked this pull request as ready for review
July 31, 2026 16:39
Contributor
Author
|
/ok to test d16427a |
sancha
approved these changes
Aug 5, 2026
Contributor
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/31058063807 |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
EncoderPrefetchLoader.save_state() -> Noneso checkpointing can treat encoder lookahead as derived state while the canonical language-loader cursor remains authoritative.Why
Encoder prefetch from #5833 can wrap a checkpointable data iterator and can receive image-sparse batches from heterogeneous multimodal datasets. The outer wrapper must participate in the checkpoint interface without persisting its speculative queue, and batches without images must preserve schedule progress without manufacturing encoder work.
The model still validates missing inputs when matching modality tokens are present; this only permits genuinely text-only batches.
Validation
python3 -m py_compile examples/mimo/training/encoder_prefetch.py tests/unit_tests/models/mimo/test_mimo_encoder_prefetch.py5590459: 200 iterations completed with both patches in the staging branch.Local pytest was not rerun on the Codex host because that host does not provide
uvor Torch; CI should run the focused tests in the supported container.