Update rl_replacements.py
This commit is contained in:
parent
86512dd59f
commit
fe483b6210
1 changed files with 1 additions and 1 deletions
|
|
@ -233,7 +233,7 @@ def grpo_trainer_compute_loss(function_name, function):
|
|||
# loss = ((per_token_loss * completion_mask).sum(dim=1) / completion_mask.sum(dim=1)).mean()
|
||||
input_ids = input_ids[:, -logits_to_keep:]
|
||||
loss, completion_length, mean_kl = grpo_compute_loss(
|
||||
ref_per_token_logps, per_token_logps, input_ids, completion_mask, self.beta, advantages,
|
||||
ref_per_token_logps, per_token_logps, input_ids, completion_mask, self.beta, advantages, bsz,
|
||||
)
|
||||
accumulated_loss, accumulated_completion_length, accumulated_mean_kl = grpo_accumulated_loss(
|
||||
self, input_ids, logits_to_keep, completion_mask, advantages, n_chunks = 1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue