Skip to content

Conversation

@ArthurBook
Copy link
Contributor

Why are these changes needed?

This solves the issue described in #52630
Some vllm sampling params such as stop_token_ids are lists and hence get converted to np.arrays when sent from one process to another in ray data. This causes a deserialization error in the vLLM engine since it expects a list, not a np.array.

Related issue number

Closes #52630

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 :(

Signed-off-by: Arthur <atte.book@gmail.com>
@ArthurBook ArthurBook requested a review from a team as a code owner April 26, 2025 18:55
@kouroshHakha kouroshHakha added the go add ONLY when ready to merge, run all tests label Apr 26, 2025
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. One comment while I triggered ci

@kouroshHakha kouroshHakha changed the title fix: deserialize arrays in vllm sampling_params [data.llm] Deserialize arrays for sampling_params Apr 26, 2025
@ArthurBook ArthurBook force-pushed the fix-llm-sampling-params-stop-token-ids branch 2 times, most recently from 2cd88cd to 00e493e Compare April 27, 2025 13:52
Signed-off-by: Arthur <atte.book@gmail.com>
@ArthurBook ArthurBook force-pushed the fix-llm-sampling-params-stop-token-ids branch from 00e493e to 74849c1 Compare April 27, 2025 14:06
@kouroshHakha kouroshHakha merged commit 68636ff into ray-project:master Apr 27, 2025
5 checks passed
@ArthurBook ArthurBook deleted the fix-llm-sampling-params-stop-token-ids branch April 27, 2025 17:54
@crypdick
Copy link
Contributor

Thanks @ArthurBook !

iamjustinhsu pushed a commit that referenced this pull request May 3, 2025
Signed-off-by: Arthur <atte.book@gmail.com>
Signed-off-by: jhsu <jhsu@anyscale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-backlog go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[build_llm_processor throws deserialization error for stop_token_ids: LLM>]

4 participants