Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
edbeeching committed Feb 10, 2025
1 parent e8e0d34 commit 45a99e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/open_r1/rewards.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ def cosine_scaled_reward(completions, solution, **kwargs):

def get_repetition_penalty_reward(ngram_size: int, max_penalty: float):
"""
Computes N-gram repetition penalty as described in Appendix C.2 of https://arxiv.org/abs/2502.03373.
Computes N-gram repetition penalty as described in Appendix C.2 of https://arxiv.org/abs/2502.03373.
Reference implementation from: https://github.com/eddycmu/demystify-long-cot/blob/release/openrlhf/openrlhf/reward/repetition.py
Args:
ngram_size: size of the n-grams
max_penalty: Maximum (negative) penalty for wrong answers
Expand Down

0 comments on commit 45a99e7

Please sign in to comment.