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

Deprecate PPOTrainer #2016

Merged
merged 5 commits into from
Sep 10, 2024
Merged

Deprecate PPOTrainer #2016

merged 5 commits into from
Sep 10, 2024

Conversation

qgallouedec
Copy link
Member

@qgallouedec qgallouedec commented Sep 4, 2024

# v0.11 <- wer're here
from trl import PPOTrainer  # Old implementation, raise DeprecationWarning("PPOTrainer is deprecated and will be removed in a future release. Please use PPOv2Trainer instead.")
from trl import PPOv2Trainer # New implementation

# v0.12
from trl import PPOTrainer # New implementation
from trl import PPOv2Trainer # New implementation, raise DeprecationWarning("PPOv2Trainer is deprecated and has been renamed to PPOTrainer. Please use PPOTrainer instead.")

# v0.13
from trl import PPOTrainer # New implementation
from trl import PPOv2Trainer # ImportError("PPOv2Trainer has been renamed to PPOTrainer. Please use PPOTrainer instead.")
  • Deprecate PPOTrainer
  • Deprecate PPOConfig
  • Update the doc (replace all examples containing PPOTrainer) -> will do in another PR

@qgallouedec qgallouedec marked this pull request as draft September 4, 2024 19:40
@HuggingFaceDocBuilderDev

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 qgallouedec marked this pull request as ready for review September 10, 2024 14:14
@qgallouedec qgallouedec merged commit a20e822 into main Sep 10, 2024
10 checks passed
@qgallouedec qgallouedec deleted the deprecate-ppo branch September 10, 2024 17:04
@qgallouedec qgallouedec mentioned this pull request Oct 4, 2024
5 tasks
@Sino-Huang
Copy link

I would like to ask why original PPO script used AutoModelForCausalLMWithValueHead class to obtain policy model but now PPOv2 script uses AutoModelForCausalLM class. Are they interchangeable? I observed that if I continue using AutoModelForCausalLMWithValueHead class in PPOv2, I am able to have better training speed if I have LoRA config.

Also LoRA + PPOv2 example seems missing.

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.

4 participants