Skip to content

Adding sampling parameters for vllm generation #3210

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

shaipranesh2
Copy link

What does this PR do?

Fixes issue #3201 . Added support in GRPO config files to set additional parameters of vllm sampling.

@shaipranesh2
Copy link
Author

@qgallouedec This PR is ready for review :)

Copy link
Member

@qgallouedec qgallouedec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @shaipranesh2! I've added a few comments

Comment on lines +147 to +149
stop: list[str] = [],
stop_token_ids: list[int] = [],
bad_words: list[str] = [],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using mutable default arguments can lead to unexpected behavior because the same list is shared across all function calls.
Maybe replace it with None, and in the function:

stop = stop or []

Comment on lines +169 to +170
"help": "Minimum length of the prompt. If the prompt is shorter than this value, it will be truncated left."
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How truncation would solve it?

repetition_penalty: int = field(
default=1,
metadata={
"help": "List of text prompts for which the model will generate completions."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is a mismatch here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For parameters specific to vllm, I would name it with a vllm prefix. Ideally some are shared by transformers and vllm (like temperature), in such case, they don't need a prefix

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 this pull request may close these issues.

2 participants