Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong repetition penalty imported #276

Open
casper-hansen opened this issue Feb 10, 2025 · 1 comment · May be fixed by #296
Open

Wrong repetition penalty imported #276

casper-hansen opened this issue Feb 10, 2025 · 1 comment · May be fixed by #296

Comments

@casper-hansen
Copy link

Hi maintainers of open-r1. I just wanted to make a comment on the latest repetition penalty after talking with one of the authors of the Demystifying long CoT paper.

I just noticed that you imported the wrong repetition penalty from the Demystifying Long CoT code. The repetition penalty that was actually used in the paper was the class RepetitionDensePenalty.

This may be a problem because the difference in implementation is global vs token-level penalty.

I had an LLM generate a feature difference:

Feature RepetitionDensePenalty get_repetition_penalty
Granularity Token-level penalties Global sequence penalty
Penalty Type Fixed value per token Scaled based on repetition
Implementation Modifies token rewards directly Computes a single penalty score
Use Case Reinforcement learning (RL) reward models Global repetition control in scoring
Effect on Rewards Directly affects token-level reward tensor Adjusts overall sequence score
@edbeeching
Copy link
Collaborator

Thanks, I will look into this tomorrow.

@kashif kashif linked a pull request Feb 12, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants