Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
vwxyzjn committed Jan 3, 2024
1 parent e8105dd commit 3f6d045
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 26 deletions.
15 changes: 2 additions & 13 deletions lm_human_preference_details/summarize/ppo.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,19 +678,8 @@ def repeat_generator():
values = torch.cat(values, 0)
sequence_lengths = torch.cat(sequence_lengths, 0)
scores = torch.cat(scores, 0)
del (
output,
logits,
all_logprob,
logprob,
ref_output,
ref_logits,
ref_all_logprob,
ref_logprob,
full_value,
value,
score,
)
del (output, logits, all_logprob, logprob, ref_output)
del (ref_logits, ref_all_logprob, ref_logprob, full_value, value, score)
torch.cuda.empty_cache()

# Response Processing 3. filter response. Ensure that the sample contains truncate_token_id
Expand Down
15 changes: 2 additions & 13 deletions lm_human_preference_details/summarize/ppo_left_padding.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,19 +684,8 @@ def repeat_generator():
values = torch.cat(values, 0)
sequence_lengths = torch.cat(sequence_lengths, 0)
scores = torch.cat(scores, 0)
del (
output,
logits,
all_logprob,
logprob,
ref_output,
ref_logits,
ref_all_logprob,
ref_logprob,
full_value,
value,
score,
)
del (output, logits, all_logprob, logprob, ref_output)
del (ref_logits, ref_all_logprob, ref_logprob, full_value, value, score)
torch.cuda.empty_cache()

# Response Processing 3. filter response. Ensure that the sample contains truncate_token_id
Expand Down

0 comments on commit 3f6d045

Please sign in to comment.