Skip to content

[Serve.llm] feat: add missing repetition_penalty vLLM sampling param #53222

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

Conversation

ArthurBook
Copy link
Contributor

@kouroshHakha

Why are these changes needed?

repetition_penality is a valid vLLM SamplingParam but is missing from the ray.serve counterpart. This causes it to be ignored when passed!

Related issue number

Closes #53221

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@ArthurBook ArthurBook requested a review from a team as a code owner May 21, 2025 23:33
@lk-chen
Copy link
Contributor

lk-chen commented May 21, 2025

Thanks @ArthurBook for the contribution. I think you need to update some tests e.g.

"response_format": None,
"top_k": None,
"seed": None,

Signed-off-by: Arthur <atte.book@gmail.com>
@ArthurBook
Copy link
Contributor Author

ArthurBook commented May 21, 2025

Thanks! Pushed. This made me realize that the same thing may be happening to other params listed under extra SamplingParams? I don't see e.g. use_beam_search being passed to vLLM anywhere? LMK and I'll add those too. EDIT: Looks like use_beam_search has been dropped all together from SamplingParams.

Copy link
Contributor

@kouroshHakha kouroshHakha left a comment

Choose a reason for hiding this comment

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

Thanks a ton @ArthurBook . LGTM

@kouroshHakha kouroshHakha changed the title [Serve, LLM] feat: add missing repetition_penalty vLLM sampling param [Serve.llm] feat: add missing repetition_penalty vLLM sampling param May 23, 2025
@kouroshHakha kouroshHakha added the go add ONLY when ready to merge, run all tests label May 23, 2025
@kouroshHakha kouroshHakha enabled auto-merge (squash) May 23, 2025 05:05
@kouroshHakha kouroshHakha merged commit 9a81218 into ray-project:master May 23, 2025
7 checks passed
@ArthurBook ArthurBook deleted the arthurbook/add-repetition-penalty-param branch May 23, 2025 06:09
lk-chen pushed a commit to lk-chen/ray that referenced this pull request May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Serve LLM] repetition_penality missing from SamplingParams
4 participants