"docs/contributing/README.md" did not exist on "847f883232cedef583775d6f4e13baa2446ba1c7"
Unverified Commit a2986b3e authored by kourosh hakhamaneshi's avatar kourosh hakhamaneshi Committed by GitHub
Browse files

[Bugfix] Fixes prefix-repetition benchmark script (#26828)


Signed-off-by: default avatarKourosh Hakhamaneshi <Kourosh@anyscale.com>
parent 96b9aa5a
......@@ -2979,13 +2979,14 @@ class PrefixRepetitionRandomDataset(BenchmarkDataset):
requests = []
token_mismatch_total = 0
for _ in range(num_prefixes):
prefix_tokens = _generate_exact_length_tokens(prefix_len)
prefix_tokens, prefix_mismatch = _generate_exact_length_tokens(prefix_len)
token_mismatch_total += prefix_mismatch
for _ in range(prompts_per_prefix):
suffix_tokens, token_mistmatch = _generate_exact_length_tokens(
suffix_tokens, suffix_mismatch = _generate_exact_length_tokens(
suffix_len
)
token_mismatch_total += token_mistmatch
token_mismatch_total += suffix_mismatch
combined_tokens = prefix_tokens + suffix_tokens
prompt = tokenizer.decode(combined_tokens)
prompt_len = len(combined_tokens)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment