Skip to content
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

[V1] Support per-request seed #9945

Merged
merged 1 commit into from
Nov 3, 2024
Merged

Conversation

njhill
Copy link
Member

@njhill njhill commented Nov 2, 2024

And make batch generators sparse

And make batch generators sparse

Signed-off-by: Nick Hill <[email protected]>
vllm/v1/worker/gpu_model_runner.py Show resolved Hide resolved
vllm/v1/worker/gpu_model_runner.py Show resolved Hide resolved
vllm/v1/worker/gpu_model_runner.py Show resolved Hide resolved
@@ -645,8 +650,7 @@ def make_sampling_metadata(
top_k=self.top_k[:self.num_reqs],
no_top_p=self.no_top_p,
no_top_k=self.no_top_k,
generators=self.generators[:self.num_reqs],
no_generator=self.no_generator,
generators=self.generators,
max_num_logprobs=self.max_num_logprobs,
)
Copy link
Member Author

Choose a reason for hiding this comment

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

@WoosukKwon can we avoid re-creating the SamplingMetadata object here in the case skip_copy is True? Just keep it as a field in the batch ...

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah that could be a great idea, though I think the current code doesn't hurt performance since only one sampling metadata is created for the entire batch.

@vllm-project vllm-project deleted a comment from github-actions bot Nov 2, 2024
Copy link
Collaborator

@WoosukKwon WoosukKwon left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the PR!

@WoosukKwon WoosukKwon merged commit 1f1b6d6 into vllm-project:main Nov 3, 2024
32 checks passed
@njhill njhill deleted the v1-seed branch November 4, 2024 17:54
lk-chen pushed a commit to lk-chen/vllm that referenced this pull request Nov 4, 2024
lk-chen pushed a commit to lk-chen/vllm that referenced this pull request Nov 4, 2024
Signed-off-by: Nick Hill <[email protected]>
Signed-off-by: Linkun Chen <[email protected]>
richardsliu pushed a commit to richardsliu/vllm that referenced this pull request Nov 4, 2024
Signed-off-by: Nick Hill <[email protected]>
Signed-off-by: Richard Liu <[email protected]>
bigPYJ1151 pushed a commit to bigPYJ1151/vllm that referenced this pull request Nov 5, 2024
DarkLight1337 pushed a commit that referenced this pull request Nov 5, 2024
hissu-hyvarinen pushed a commit to ROCm/vllm that referenced this pull request Nov 6, 2024
JC1DA pushed a commit to JC1DA/vllm that referenced this pull request Nov 11, 2024
sumitd2 pushed a commit to sumitd2/vllm that referenced this pull request Nov 14, 2024
Signed-off-by: Nick Hill <[email protected]>
Signed-off-by: Sumit Dubey <[email protected]>
KuntaiDu pushed a commit to KuntaiDu/vllm that referenced this pull request Nov 20, 2024
mfournioux pushed a commit to mfournioux/vllm that referenced this pull request Nov 20, 2024
Signed-off-by: Nick Hill <[email protected]>
Signed-off-by: Maxime Fournioux <[email protected]>
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