[Others] Add Tests for GPU Model Runner and Logprobs Output (#4913)

This commit is contained in:
chen
2025-11-11 18:37:33 +08:00
committed by GitHub
parent a83250ae3f
commit 896ef565cc
3 changed files with 202 additions and 8 deletions

View File

@@ -44,14 +44,6 @@ class LogprobsLists(NamedTuple):
# [num_reqs]
sampled_token_ranks: list[int]
def slice(self, start: int, end: int):
"""slice"""
return LogprobsLists(
self.logprob_token_ids[start:end],
self.logprobs[start:end],
self.sampled_token_ranks[start:end],
)
def slice_columns(self, start: int, end: int):
"""
Slice columns (per-row top-k logprobs and token IDs).