Skip to content

Commit

Permalink
fix typo/lint
Browse files Browse the repository at this point in the history
Signed-off-by: Linkun Chen <[email protected]>
  • Loading branch information
Linkun Chen committed Nov 4, 2024
1 parent 4701791 commit 8372102
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions benchmarks/benchmark_throughput.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ def _get_prompt_for_image_model(question: str, *, model: str) -> str:
Args:
question: The input question text to wrap with special tokens
model: The name of the model being used, to determine which special tokens to add
model: The name of the model being used, to determine which special
tokens to add
Returns:
The formatted prompt string with appropriate special tokens for the model
The formatted prompt string with appropriate special tokens for the
model
Raises:
ValueError: If an unsupported model name is provided
Expand Down Expand Up @@ -105,7 +107,7 @@ def sample_requests(tokenizer: PreTrainedTokenizerBase,
completion_token_ids = tokenizer(completion).input_ids
prompt_len = len(prompt_token_ids)
output_len = len(completion_token_ids
) if fixed_output_len is None else fixed_output_len
) if fixed_output_len is None else fixed_output_len
if prompt_len < 4 or output_len < 4:
# Prune too short sequences.
continue
Expand Down

0 comments on commit 8372102

Please sign in to comment.