Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions vllm/benchmarks/datasets/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class SampleRequest:
Represents a single inference request for benchmarking.
"""

prompt: str | list[str] | list[dict]
prompt: str | list[str] | list[int] | list[dict]
prompt_len: int
expected_output_len: int = 0
multi_modal_data: MultiModalDataDict | dict | list[dict] | None = None
Expand Down Expand Up @@ -1572,7 +1572,6 @@ def sample(
prompt_ids = self._expand_prompt(
entry.get(self.label_hash_ids, []), input_length, tokenizer
)
prompt = tokenizer.decode(prompt_ids)

# Get timestamp with proper error handling
ts_value = entry.get(self.label_ts)
Expand All @@ -1588,7 +1587,7 @@ def sample(

samples.append(
SampleRequest(
prompt=prompt,
prompt=prompt_ids,
Comment thread
tdoublep marked this conversation as resolved.
prompt_len=prompt_len,
expected_output_len=new_output_len,
lora_request=None,
Expand Down
2 changes: 1 addition & 1 deletion vllm/benchmarks/lib/endpoint_request_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def add_chunk(self, chunk_bytes: bytes) -> list[str]:
class RequestFuncInput:
"""The input for the request function."""

prompt: str | list[str] | list[dict[str, Any]]
prompt: str | list[str] | list[int] | list[dict[str, Any]]
api_url: str
prompt_len: int
output_len: int
Expand Down
5 changes: 5 additions & 0 deletions vllm/benchmarks/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -2097,6 +2097,11 @@ async def main_async(args: argparse.Namespace) -> dict[str, Any]:
args.ignore_eos = True

if args.dataset_name == "timed_trace":
if args.backend not in ("vllm", "openai"):
raise ValueError(
"timed_trace dataset passes pre-tokenized prompts (list[int])"
" and requires a completions backend ('vllm' or 'openai')."
)
# timed_trace carries per-request timestamps;
# ignore EOS so generation runs to the trace's specified output length,
# and default to using those timestamps for scheduling unless the user
Expand Down
Loading