@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 21de6d4b02
Fork 0

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, 20:15 UTC

[CI][Bugfix] Fix token counting in chunked prefill streaming test (#31565)

Signed-off-by: Andreas Karatzas <akaratza@amd.com>

Andreas Karatzas committed Dec 31, 2025 at 17:05 UTC 21de6d4b02edb393adea68833ef5822125a9203d
1 file changed +4 -1
tests/entrypoints/openai/test_chunked_prompt.py
+4 -1
@@ -116,7 +116,10 @@ async def test_chat_completion_stream_options_and_logprobs_with_long_prompts(
116 assert chunk.choices[0].logprobs is None
117 empty_chunks_received += 1
118 else:
119 - tokens_received += 1
119 + # Count actual tokens from logprobs since multiple tokens
120 + # can be batched into a single chunk
121 + assert chunk.choices[0].logprobs and chunk.choices[0].logprobs.content
122 + tokens_received += len(chunk.choices[0].logprobs.content)
123
124 if chunk.choices[0].finish_reason is not None:
125 finished = True