Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion trl/trainer/grpo_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ def _get_per_token_logps_and_entropies(
mm_token_type_ids=None,
pixel_position_ids=None,
image_position_ids=None,
) -> dict[str, torch.Tensor | None]:
) -> tuple[torch.Tensor, torch.Tensor | None]:
"""Compute log-probs and (optionally) entropies for each token."""
batch_size = batch_size or input_ids.size(0) # Chunk inputs into smaller batches to reduce memory peak
all_logps = []
Expand Down
Loading