Skip to content

How to save a trained model with ppo_trainer?  #1

Description

@lucascassiano

Hi,
Great repository, very minimal and clean indeed. I'm sure many other students will learn immensely from here.

I'm currently running the gpt2 as the active model, with bhadresh-savani/distilbert-base-uncased-emotion as reward model.

How I can save the final trained model to a local directory?
Could it be done similarly to transformers Trainer:

# Huggingface transformers trainer:
from transformers import Trainer
# ...
trainer.train()
trainer.save_model("my-model")

# minRLFH trainer
ppo_trainer.train()
ppo_trainer.save_model("my-model") ## <-- possible? 🤔

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions