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

[Bug]: online-rl sampling is different from offline-sampling #14341

Open
1 task done
yyht opened this issue Mar 6, 2025 · 0 comments
Open
1 task done

[Bug]: online-rl sampling is different from offline-sampling #14341

yyht opened this issue Mar 6, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@yyht
Copy link

yyht commented Mar 6, 2025

Your current environment

``` ENV: openrlhf-latest version vllm==0.7.2 ```

🐛 Describe the bug

I tried to run ppo/reinforce++ using openrlhf.
The dataset and reward-func is same to https://github.com/Open-Reasoner-Zero/Open-Reasoner-Zero/

However, when i tried to filter data before training, I use the exact the same ENV and sampling-params, the accuracy and format-accuracy is different from the first step of online-sampling.

Since the first step of online-sampling should be identical to offline-sampling, the format-accuracy should be similar. However, there exists a huge gap.
The sampling-params:

sampling_params = SamplingParams(temperature=1.0, 
                                 top_p=1.0,
                                 top_k=-1,
                                 max_tokens=16000+4096,
                                 min_tokens=1,
                                 stop=[tokenizer.eos_token, "User:", "Human:", "Assistant:", "</answer>"],
                                 skip_special_tokens=False,
                                 include_stop_str_in_output=True,
                                 n=1)

online-sampling while offline-sampling, the format-rewards is nearly 15%, while online-sampling is 57%.

Image
When I remove </answer> from the stop-token, online-sampling of the first step is similar to offline-sampling.
It's so odd.
Image

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.
@yyht yyht added the bug Something isn't working label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant