Skip to content

Commit 22f4e22

Browse files
authored
fix bug on gspo (THUDM#695)
1 parent d9c1aac commit 22f4e22

File tree

1 file changed

+1
-0
lines changed
  • slime/backends/megatron_utils

1 file changed

+1
-0
lines changed

slime/backends/megatron_utils/loss.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,7 @@ def policy_loss_function(
410410
]
411411
ppo_kl = [kl.expand_as(log_prob) for kl, log_prob in zip(ppo_kl, log_probs)]
412412
ppo_kl = torch.cat(ppo_kl, dim=0)
413+
old_log_probs = torch.cat(old_log_probs, dim=0)
413414
log_probs = torch.cat(log_probs, dim=0)
414415
else:
415416
old_log_probs = torch.cat(old_log_probs, dim=0)

0 commit comments

Comments
 (0)