Repository navigation
feat(multimodal): AUT-2316 reapply vision token utilities - #7329
Merged
ko3n1g merged 2 commits intoSep 16, 2026
Merged
Conversation
Reapply "Add multimodal vision token utilities (NVIDIA#7249)". This reverts the revert commit d0f6ed6 ("Revert 'Add multimodal vision token utilities (NVIDIA#7249)'") from PR NVIDIA#7326, restoring the original change. Signed-off-by: svcnemo-autobot <svcnemo-autobot@nvidia.com>
svcnvidia-nemo-ci
marked this pull request as draft
September 15, 2026 00:20
Contributor
|
This PR has been automatically converted to draft because all PRs must start as drafts. When you are ready for review, click Ready for Review to begin the review process. This will:
See the contribution guide for more details. |
Contributor
|
/ok to test 458485d |
The re-applied multimodal vision token utilities (NVIDIA#7249) import einops at module scope. einops is an optional dependency that is absent from the minimal environment used by the 'Pip - NGC PyTorch' import check, so importing megatron.core.models.multimodal.utils raised ModuleNotFoundError. Guard the import the same way the rest of megatron/core does (e.g. transformer/attention.py): fall back to rearrange = None so the module imports cleanly; the symbol is only exercised when the patchify helpers actually run, where einops is installed. Signed-off-by: svcnemo-autobot <svcnemo-autobot@nvidia.com>
Contributor
|
/ok to test f5024ef |
tylerpoon
approved these changes
Sep 15, 2026
tylerpoon
marked this pull request as ready for review
September 15, 2026 14:09
Phlip79
approved these changes
Sep 15, 2026
tylerpoon
enabled auto-merge
September 15, 2026 16:57
balasaajay
approved these changes
Sep 15, 2026
balasaajay
disabled auto-merge
September 15, 2026 19:33
balasaajay
enabled auto-merge
September 15, 2026 19:34
jaredcasper
approved these changes
Sep 15, 2026
auto-merge was automatically disabled
September 16, 2026 17:40
Pull request was closed
ko3n1g
enabled auto-merge
September 16, 2026 18:05
ko3n1g
disabled auto-merge
September 16, 2026 18:09
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/35138258066 |
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.
Background
PR #7326 ("ci: Revert recently merged changes as they cause CI unit test failures") reverted three recently-merged changes. This PR re-applies one of them: "Add multimodal vision token utilities (#7249)", which was reverted by commit
d0f6ed6.What changed
This reverts the revert commit
d0f6ed6b596748ea5c339bc888b256f16c58db99, restoring the multimodal vision token utilities inmegatron/core/models/multimodal/utils.pyand the corresponding CLIP ViT model support and unit tests (3 files, ~364 insertions).Details
The change is the exact inverse of the #7326 revert commit, applied on top of current
main. No new code is introduced beyond what was originally merged in #7249.Tested
Re-applied cleanly (no conflicts) on
main@78d917e6b. Tree diff verified to be the exact inverse of the revert commit. Local lint/test toolchain could not be provisioned in the rootless authoring workstation (no Python / no package install); GitHub CI is the authoritative gate.