[Bugfix] Fix vLLM UsageInfo and logprobs None AssertionError with empty token_ids (#9034)
Co-authored-by: Nick Hill <nickhill@us.ibm.com>
This commit is contained in:
@@ -532,6 +532,9 @@ class Sequence:
|
||||
# (which is what we have most of the time)
|
||||
return self.data._cached_all_token_ids[-1]
|
||||
|
||||
if num_new_tokens == 0:
|
||||
return []
|
||||
|
||||
return self.data._cached_all_token_ids[-num_new_tokens:]
|
||||
|
||||
def hash_of_block(self, logical_idx: int) -> int:
|
||||
|
||||
Reference in New Issue
Block a user