[Minor] Various small code cleanups/simplifications (#31508)

Signed-off-by: njhill <nickhill123@gmail.com>
This commit is contained in:
Nick Hill
2025-12-29 22:42:06 -08:00
committed by GitHub
parent f84bf7d79b
commit 3b312fb792
14 changed files with 29 additions and 55 deletions
+2 -7
View File
@@ -339,10 +339,7 @@ class RequestState:
stop_reason=stop_reason if finished else None,
)
def _new_pooling_output(
self,
pooling_output: torch.Tensor,
) -> PoolingOutput:
def _new_pooling_output(self, pooling_output: torch.Tensor) -> PoolingOutput:
return PoolingOutput(data=pooling_output)
@@ -695,9 +692,7 @@ class OutputProcessor:
assert req_state.stats is not None
iteration_stats.update_from_finished_request(
finish_reason=finish_reason,
num_prompt_tokens=length_from_prompt_token_ids_or_embeds(
req_state.prompt_token_ids, req_state.prompt_embeds
),
num_prompt_tokens=req_state.prompt_len,
max_tokens_param=req_state.max_tokens_param,
req_stats=req_state.stats,
num_cached_tokens=req_state.num_cached_tokens,