Fuse top_k and top_k in the sampler (#1457)

This commit is contained in:
Lianmin Zheng
2024-09-18 04:35:35 -07:00
committed by GitHub
parent 1acccb364a
commit 7f24ea95c3
3 changed files with 12 additions and 4 deletions

View File

@@ -23,6 +23,7 @@ class GenerateReqInput:
# Whether to return logprobs.
return_logprob: Optional[Union[List[bool], bool]] = None
# The start location of the prompt for return_logprob.
# By default, this value is "-1", which means it will only return logprobs for output tokens.
logprob_start_len: Optional[Union[List[int], int]] = None
# The number of top logprobs to return.
top_logprobs_num: Optional[Union[List[int], int]] = None