fix memory leak of PPO trainer

Former-commit-id: 38410894a5ebf0b043b55a6bd5cca3cd0a44b27d
This commit is contained in:
hiyouga
2023-08-02 17:41:34 +08:00
parent ba618947e7
commit 1dfb28b362
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