fix memory leak of PPO trainer

This commit is contained in:
hiyouga
2023-08-02 17:41:34 +08:00
parent c689857bbb
commit 286f7be346
2 changed files with 6 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
# Inspired by:
# https://github.com/lvwerra/trl/blob/main/examples/sentiment/scripts/gpt-neox-20b_peft/gpt-neo-20b_sentiment_peft.py
# https://github.com/lvwerra/trl/blob/main/examples/research_projects/stack_llama/scripts/rl_training.py
import math
from typing import TYPE_CHECKING