8000 fix: load HF model only on rank 0 by parthchadha · Pull Request #544 · NVIDIA-NeMo/RL · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: load HF model only on rank 0 #544

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

Open
wants to merge 9 commits into from

Conversation

parthchadha
Copy link
Contributor

What does this PR do ?

Loads model only on rank 0 and then uses fsdp2 set_model_state_dict API to load the weights on other ranks (after the model has been parallelized).
Note that the current PR still leads to GPU OOM for 70B model on 1 node with dtensor, will fix in a separate PR.

Issues

List issues that this PR closes (syntax):

Usage

  • You can potentially add a usage example below
# Add a code snippet demonstrating how to use this 

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 run the unit tests and functional tests locally? Visit our Testing Guide for how to run tests
  • Did you add or update any necessary documentation? Visit our Document Development Guide for how to write, build and test the docs.

Additional Information

  • ...

@parthchadha parthchadha marked this pull request as ready for review June 24, 2025 17:26
@parthchadha parthchadha added the CI:L0 Run doctests and unit tests label Jun 24, 2025
@parthchadha parthchadha force-pushed the pchadha/large-model-state-dict-load branch from aae142f to ebaeb99 Compare June 24, 2025 17:42
@parthchadha parthchadha added CI:L0 Run doctests and unit tests and removed CI:L0 Run doctests and unit tests labels Jun 24, 2025
Signed-off-by: Parth Chadha <pchadha@nvidia.com>
@parthchadha parthchadha force-pushed the pchadha/large-model-state-dict-load branch from ebaeb99 to fcec2db Compare June 24, 2025 18:11
@parthchadha parthchadha added CI:L0 Run doctests and unit tests and removed CI:L0 Run doctests and unit tests labels Jun 24, 2025
terrykong
terrykong previously approved these changes Jun 24, 2025
@parthchadha parthchadha enabled auto-merge June 24, 2025 18:42
@parthchadha parthchadha added this pull request to the merge queue Jun 24, 2025
Any commits made after this event will not be merged.
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 24, 2025
@parthchadha parthchadha added this pull request to the merge queue Jun 25, 2025
Any commits made after this event will not be merged.
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 25, 2025
Signed-off-by: Parth Chadha <pchadha@nvidia.com>
@parthchadha parthchadha added CI:L0 Run doctests and unit tests and removed CI:L0 Run doctests and unit tests labels Jun 26, 2025
@terrykong terrykong enabled auto-merge June 27, 2025 22:47
@terrykong terrykong added this pull request to the merge queue Jun 27, 2025
Any commits made after this event will not be merged.
auto-merge was automatically disabled June 28, 2025 02:16

Pull Request is not mergeable

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 28, 2025
@chtruong814 chtruong814 added this pull request to the merge queue Jun 28, 2025
Any commits made after this event will not be merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI:L0 Run doctests and unit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0