Skip to content

[PPO] fix corner cases with PPO batch size and forward_batch_size#563

Merged
younesbelkada merged 3 commits intomainfrom
fix-ppo-corner-cases
Jul 28, 2023
Merged

[PPO] fix corner cases with PPO batch size and forward_batch_size#563
younesbelkada merged 3 commits intomainfrom
fix-ppo-corner-cases

Conversation

@younesbelkada
Copy link
Copy Markdown
Contributor

Fixes: #553

When users uses different combinations of batch size and forward batch size it might lead to breaking behaviours as explained on the attached issue.

This PR fixes it by adding the suggestion proposed by one of the user which is perfectly backward compatible

cc @lvwerra

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

HuggingFaceDocBuilderDev commented Jul 24, 2023

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

Comment thread trl/trainer/ppo_trainer.py
@younesbelkada younesbelkada merged commit 1b46c61 into main Jul 28, 2023
@younesbelkada younesbelkada deleted the fix-ppo-corner-cases branch July 28, 2023 09:05
yxliu-TAMU pushed a commit to mincheolseong/ECEN743-GRPO-Project-Proposal that referenced this pull request Apr 20, 2025
…uggingface#563)

* fix corner cases PPO

* forward contrib credits from initial contribution

* forward contrib credits from initial discussions

---------

Co-authored-by: 1485840691-eng <1485840691-eng@users.noreply.github.com>
Co-authored-by: shubhlohiya <shubhlohiya@users.noreply.github.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.

Code breaks if forward_batch_size is not a factor of batch_size

5 participants