-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[BugFix] Set default random seed to 0 for V1 #17929
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
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add 🚀 |
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
LGTM now |
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu> Signed-off-by: Yuqi Zhang <yuqizhang@google.com>
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu> Signed-off-by: minpeter <kali2005611@gmail.com>
Currently, the random seed is unset (
seed=None
) by default. This behavior was originally intended for vLLM V0, where the driver (rank-0) worker shared the same process as the user, causing any fixed seed to affect the user process.In vLLM V1, however, each worker typically runs in its own process different from the user process (except for TP=1 and
VLLM_ENABLE_V1_MULTIPROCESSING=0
). When the seed is unset in V1, tensor parallel workers independently sample different tokens, which previously didn't matter since we only used output from the rank-0 worker and discarded others. However, this randomness causes problems for advanced features like spec decoding, where consistent token generation across TP workers is required.This PR resolves the issue by setting the default random seed to
0
in vLLM V1.Note: This change affects the user experience. Previously, users saw entirely different outputs for each run due to the unset seed. After this PR, first few outputs can be consistent across runs by default (while the full consistency/reproducibility requires
VLLM_ENABLE_V1_MULTIPROCESSING=0
).