-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Conversation
And make batch generators sparse Signed-off-by: Nick Hill <[email protected]>
@@ -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, | |||
) |
There was a problem hiding this comment.
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 ...
There was a problem hiding this comment.
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.
There was a problem hiding this 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!
Signed-off-by: Nick Hill <[email protected]>
Signed-off-by: Nick Hill <[email protected]> Signed-off-by: Linkun Chen <[email protected]>
Signed-off-by: Nick Hill <[email protected]> Signed-off-by: Richard Liu <[email protected]>
Signed-off-by: Nick Hill <[email protected]>
Signed-off-by: Nick Hill <[email protected]>
Signed-off-by: Nick Hill <[email protected]>
Signed-off-by: Nick Hill <[email protected]> Signed-off-by: Loc Huynh <[email protected]>
Signed-off-by: Nick Hill <[email protected]> Signed-off-by: Sumit Dubey <[email protected]>
Signed-off-by: Nick Hill <[email protected]>
Signed-off-by: Nick Hill <[email protected]> Signed-off-by: Maxime Fournioux <[email protected]>
And make batch generators sparse