Skip to content
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

[core] fix saving multi-gpu #157

Merged
merged 2 commits into from
Feb 16, 2023
Merged

[core] fix saving multi-gpu #157

merged 2 commits into from
Feb 16, 2023

Conversation

younesbelkada
Copy link
Contributor

Currently on the main branch of trl saving a PPOTrainer in a multi-GPU setting is broken. The fix is to first call self.accelerator.unwrap_model(self.model) before calling save_pretrained

cc @lvwerra

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Feb 16, 2023

The documentation is not available anymore as the PR was closed or merged.

trl/trainer/ppo_trainer.py Outdated Show resolved Hide resolved
Co-authored-by: Leandro von Werra <lvwerra@users.noreply.github.com>
@younesbelkada younesbelkada merged commit 2e667be into main Feb 16, 2023
@younesbelkada younesbelkada deleted the fix-save-dp branch February 16, 2023 15:44
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.

3 participants