Skip to content
Merged
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
2 changes: 1 addition & 1 deletion benchmarks/benchmark_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def sample(
: input_lens[i]
]
prompt = tokenizer.decode(re_encoded_sequence)
total_input_len = prefix_len + int(input_lens[i])
total_input_len = len(re_encoded_sequence)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The total_input_len is now correctly calculated as the length of re_encoded_sequence. This ensures that the prompt_len in SampleRequest accurately reflects the token length of the generated prompt after re-encoding and truncation.

requests.append(
SampleRequest(
prompt=prompt,
Expand Down