A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 10, 19:00 UTC
[CI][Bugfix] Fix token counting in chunked prefill compl test (#31630)
Signed-off-by: Andreas Karatzas <akaratza@amd.com>
Andreas Karatzas committed
Jan 3, 2026 at 00:28 UTC
4f9ce35afe45a3222cbcb80dad39c6d9c3a61c6d
1 file changed
+4
-1
tests/entrypoints/openai/test_chunked_prompt.py
+4
-1
@@ -66,8 +66,11 @@ async def test_completion_stream_options_and_logprobs_with_long_prompts(
66
chunk.usage.prompt_tokens + chunk.usage.completion_tokens
67
)
68
if not finished:
69
- tokens_received += 1
69
assert chunk.choices[0].text
70
+ # Count actual tokens from logprobs since multiple tokens
71
+ # can be batched into a single chunk
72
+ assert chunk.choices[0].logprobs and chunk.choices[0].logprobs.tokens
73
+ tokens_received += len(chunk.choices[0].logprobs.tokens)
74
75
if chunk.choices[0].finish_reason is not None:
76
finished = True