-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
✨ Add vLLM guided decoding support to GRPO Trainer #2811
Conversation
Thanks for contributing @kldzj! For the record, can you explain briefly what is the motivation behind using GuidedDecodingParams? |
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
@qgallouedec When using the GRPO trainer, we likely want the model to respond in a specific format, in the example above we enforce the Let me know if there's any problem or flaw in my logic with this. |
It's very interesting @dataclass
class GRPOConfig(TrainingArguments):
...
vllm_guided_decoding_regex: Optional[str] = None and if args.vllm_guided_decoding_regex is not None:
guided_decoding = GuidedDecodingParams(backend="outlines", regex= args.vllm_guided_decoding_regex) it's less flexible but explicitly exposes the regex and probably easier for the user. |
@qgallouedec Made the suggested change. :) |
What does this PR do?
Adds the ability to pass vLLM's
GuidedDecodingParams
through to thellm.generate
call.Example:
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.