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

issue of format reward #15

Closed
hqhQAQ opened this issue Feb 10, 2025 · 1 comment
Closed

issue of format reward #15

hqhQAQ opened this issue Feb 10, 2025 · 1 comment

Comments

@hqhQAQ
Copy link

hqhQAQ commented Feb 10, 2025

I find that the format_reward function in grpo.py fails for me.

For example, when the content is "<think>Thinking process\n</think>\n\n<answer>\nFinal answer.\n</answer>", the current format_reward function determines it as unmatched. However, it should be in the format actually. As a result, my format_reward for all samples are almost all 0 along model training.

I solve this problem by modifying matches = [re.match(pattern, content) for content in completion_contents] to matches = [re.match(pattern, content, re.DOTALL) for content in completion_contents].

My re package version is 2.2.1, is this my fault?

@hqhQAQ
Copy link
Author

hqhQAQ commented Feb 10, 2025

I find that this issue has been solved in R1-V.

@hqhQAQ hqhQAQ closed this as completed Feb 10, 2025
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

No branches or pull requests

1 participant