-
Notifications
You must be signed in to change notification settings - Fork 246
refactor(models): single tie_word_embeddings guard via TieSupport #2998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
chtruong814
merged 17 commits into
NVIDIA-NeMo:main
from
Achyuthan-S:Achyuthan-S/refactor/tie-word-embeddings-support
Jul 16, 2026
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
9b99000
refactor(models): add TieSupport enum and single tie_word_embeddings …
Achyuthan-S 3881132
fix(models): mistral3_vlm serves tied+untied checkpoints (TieSupport.…
Achyuthan-S 4de4ef5
fix(models): tie_word_embeddings BOTH contract for llama/qwen2/qwen3_5
Achyuthan-S eb4f978
fix(models): demote baichuan and mistral3-dense to TieSupport.UNTIED_…
Achyuthan-S ce6056e
fix(models): apply remaining TieSupport verdicts (ernie4_5/diffusion_…
Achyuthan-S b8ef179
test(models): require every registered lm_head class to declare TieSu…
Achyuthan-S 4c64bd2
feat(transformers): reject tie_word_embeddings flip in from_pretraine…
Achyuthan-S 2b46497
docs(onboarding): require TieSupport declaration and from_pretrained …
Achyuthan-S 5cf6f91
test(models): add mistral3_vlm from_pretrained tie-flip guard test
Achyuthan-S 3d295e8
fix(transformers): run tie-flip guard for os.PathLike checkpoints too
Achyuthan-S f639792
docs(onboarding): simplify tie support contract
yuhezhang-ai 643525f
fix(models): make tied-weight hooks explicit
yuhezhang-ai 09cee09
Merge origin/main into yuhez/fix/tie-support-contract
yuhezhang-ai 484420c
fix(models): keep tie policy within model package
yuhezhang-ai 4b0683d
test(pipelining): update tied embedding error expectation
yuhezhang-ai 79c941c
fix(models): honor declared tie support at runtime
yuhezhang-ai b965726
Merge remote-tracking branch 'origin/main' into yuhez/fix/tie-support…
yuhezhang-ai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This skips the new flip guard for local checkpoints passed as
pathlib.Path, even thoughfrom_pretrainedacceptsstr | os.PathLike. In that case a user can still fliptie_word_embeddingssilently. Can we normalize path-like inputs withos.fspath()and run the same raw-config check for bothstrandos.PathLikesources?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes you are right , good catch , thank you — fixed . Normalized path-like sources with os.fspath() so the raw-config flip check runs for both str and os.PathLike, and added pathlib.Path coverage (rejected flip, matching value, and an assertion that the Path is normalized to str before the raw read).