Skip to content

fix: Propagate torch_dtype to sub-configs correctly#2027

Merged
athitten merged 1 commit into
mainfrom
athitten/gemma4_dtype_fix
Apr 23, 2026
Merged

fix: Propagate torch_dtype to sub-configs correctly#2027
athitten merged 1 commit into
mainfrom
athitten/gemma4_dtype_fix

Conversation

@athitten

@athitten athitten commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

What does this PR do ?

Fixes #2017.
Verified by running examples/vlm_finetune/gemma4/gemma4_4b_mock.yaml with torch_dtype: torch.float32 and dont see the error mentioned in the issue anymore.

Changelog

  • Add specific line by line info of high level changes in this PR.

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?

If you haven't finished some of the above items you can still open "Draft" PR.

Additional Information

  • Related to # (issue)

Signed-off-by: Abhishree Thittenamane <athittenaman@cw-dfw-cs-001-login-02.cm.cluster>
@copy-pr-bot

copy-pr-bot Bot commented Apr 23, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@athitten athitten changed the title Propagate torch_dtype to sub-configs correctly Fix: Propagate torch_dtype to sub-configs correctly Apr 23, 2026
@athitten athitten changed the title Fix: Propagate torch_dtype to sub-configs correctly fix: Propagate torch_dtype to sub-configs correctly Apr 23, 2026
@athitten

Copy link
Copy Markdown
Contributor Author

/claude review

@athitten

Copy link
Copy Markdown
Contributor Author

/ok to test 6de0c36

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@athitten athitten merged commit 5dcc9ab into main Apr 23, 2026
61 of 65 checks passed
@athitten athitten deleted the athitten/gemma4_dtype_fix branch April 23, 2026 22:54
kashif pushed a commit to kashif/Automodel that referenced this pull request May 25, 2026
Propagate torch_dtype to sub-configs correctly

Signed-off-by: Abhishree Thittenamane <athittenaman@cw-dfw-cs-001-login-02.cm.cluster>
Co-authored-by: Abhishree Thittenamane <athittenaman@cw-dfw-cs-001-login-02.cm.cluster>
yuekaizhang added a commit to yuekaizhang/RL that referenced this pull request Jun 2, 2026
…o#2027)

Repin the Automodel submodule from 26108096 to 6eb5e862 ("fix: Propagate
torch_dtype to sub-configs correctly", from NVIDIA-NeMo/Automodel#2027)
as a temporary pin.

Note: 6eb5e862 is an unmerged PR commit (an older force-pushed revision
of NVIDIA-NeMo#2027, not its current head and not on main) and predates the
Nemotron-Omni RADIO post-load patches in 26108096. It still pins
transformers==5.5.0 in its own metadata, so the transformers override
stays consistent. The refreshed uv.lock reflects the reverse-delta
(drops the later s3 / msc extras and the wandb>=0.26.1 pin).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: root <zhangyuekai@foxmail.com>
yuekaizhang added a commit to yuekaizhang/RL that referenced this pull request Jun 2, 2026
Bump the Automodel submodule to 5dcc9abe9 ("fix: Propagate torch_dtype to
sub-configs correctly", NVIDIA-NeMo/Automodel#2027). This is the oldest
commit on Automodel main that carries the NVIDIA-NeMo#2027 torch_dtype-propagation
fix, so it is reachable by a plain `git submodule update` (unlike the
orphaned, force-pushed PR-head revision of the same change, which lives in
Automodel's pre-rewrite history and is on no upstream branch).

It pins transformers==5.5.0 in its own metadata, keeping the transformers
override consistent. uv.lock refreshed accordingly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: root <zhangyuekai@foxmail.com>
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.

[Bug] Gemma4 VLM from_pretrained(torch_dtype=float32) leaves nested submodules in bf16 and breaks FSDP2

2 participants