Set KV cache false when gradient checkpointing is enabled#1984
Merged
qgallouedec merged 3 commits intoonline-dpo-llmjudgefrom Aug 27, 2024
Merged
Set KV cache false when gradient checkpointing is enabled#1984qgallouedec merged 3 commits intoonline-dpo-llmjudgefrom
qgallouedec merged 3 commits intoonline-dpo-llmjudgefrom
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
qgallouedec
approved these changes
Aug 27, 2024
lewtun
added a commit
that referenced
this pull request
Aug 28, 2024
* online dpo trainer based on rloo trainer * push changes * refactor * use `batch_generation` method * precommit * remove breakpoint() * quick refactor * push the current changes * quick change * refactor * use the config name as the experiment name * fix logging * update online DPO docs * use llm as a judge * quick change * quick fix * cache changes * new semantics * style and arg order change * rm duplicated num_epochs * rm plot script * num_epoch * revert some changes * revert changes * revert whitespace * rm whitespace * revert change * policy->model * optional judge and reward model * cleaning online dpo script * warning when both reward mdoel and judge provided * return -1 when the judge fails * dataset num proc * add judges in online dpo; fix collate and process within the trainer * lr_scheduler.step() after optimizer step * update odpo test * reduce nestiness * allow pickle * generation config typing * online dpo llm judge * fix data collator pad token * add space * fix pref score * -1 for judges * self.model_wrapped = self.model * onlinedpo inherits from training arguments * num_epoch -> num_steps_in_epochs * update -> epoch * epoch -> step; step_in_epoch -> ppo_epoch; rm run_name * num_steps_in_epoch -> num_ppo_epochs * epoch_idx -> ppo_epoch_idx * make init consistent with dpo * try another option * progress... * odpo * current progress * log and other changes * rename for legacy * rename for legacy * rename and move truncate * rename * new config * LogCompletionsCallback * style * rename trainer * truncate right in utils * update example * reward model path * properly log * fix example * add generation prompt and log special tokens * true penalty * defaults from the paper * Remove MPS (#1983) * Set KV cache false when gradient checkpointing is enabled (#1984) * Remove MPS * Fix * Various tweask * Remove padding from table * Clean up * Fix test * Revert log freq * Fix docs * Fix tests aain! * Fix typo * Revert * Fix regression * Apply suggestions from code review Co-authored-by: Quentin Gallouédec <45557362+qgallouedec@users.noreply.github.com> * Fix DPO config test * Fix doc tree * Clean docs moar * Add docstring * raise NotImplemented error for judge * Refactor cache clearning --------- Co-authored-by: Michael Noukhovitch <mnoukhov@gmail.com> Co-authored-by: Quentin Gallouédec <45557362+qgallouedec@users.noreply.github.com> Co-authored-by: Quentin Gallouédec <quentin.gallouedec@huggingface.co> Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>
yxliu-TAMU
pushed a commit
to mincheolseong/ECEN743-GRPO-Project-Proposal
that referenced
this pull request
Apr 20, 2025
* online dpo trainer based on rloo trainer * push changes * refactor * use `batch_generation` method * precommit * remove breakpoint() * quick refactor * push the current changes * quick change * refactor * use the config name as the experiment name * fix logging * update online DPO docs * use llm as a judge * quick change * quick fix * cache changes * new semantics * style and arg order change * rm duplicated num_epochs * rm plot script * num_epoch * revert some changes * revert changes * revert whitespace * rm whitespace * revert change * policy->model * optional judge and reward model * cleaning online dpo script * warning when both reward mdoel and judge provided * return -1 when the judge fails * dataset num proc * add judges in online dpo; fix collate and process within the trainer * lr_scheduler.step() after optimizer step * update odpo test * reduce nestiness * allow pickle * generation config typing * online dpo llm judge * fix data collator pad token * add space * fix pref score * -1 for judges * self.model_wrapped = self.model * onlinedpo inherits from training arguments * num_epoch -> num_steps_in_epochs * update -> epoch * epoch -> step; step_in_epoch -> ppo_epoch; rm run_name * num_steps_in_epoch -> num_ppo_epochs * epoch_idx -> ppo_epoch_idx * make init consistent with dpo * try another option * progress... * odpo * current progress * log and other changes * rename for legacy * rename for legacy * rename and move truncate * rename * new config * LogCompletionsCallback * style * rename trainer * truncate right in utils * update example * reward model path * properly log * fix example * add generation prompt and log special tokens * true penalty * defaults from the paper * Remove MPS (huggingface#1983) * Set KV cache false when gradient checkpointing is enabled (huggingface#1984) * Remove MPS * Fix * Various tweask * Remove padding from table * Clean up * Fix test * Revert log freq * Fix docs * Fix tests aain! * Fix typo * Revert * Fix regression * Apply suggestions from code review Co-authored-by: Quentin Gallouédec <45557362+qgallouedec@users.noreply.github.com> * Fix DPO config test * Fix doc tree * Clean docs moar * Add docstring * raise NotImplemented error for judge * Refactor cache clearning --------- Co-authored-by: Michael Noukhovitch <mnoukhov@gmail.com> Co-authored-by: Quentin Gallouédec <45557362+qgallouedec@users.noreply.github.com> Co-authored-by: Quentin Gallouédec <quentin.gallouedec@huggingface.co> Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do?
Needed to avoid a huge number of warnings in the logs
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.