make radix cache deterministic (#10721)
Signed-off-by: Alex Chi Z <iskyzh@gmail.com>
This commit is contained in:
@@ -277,9 +277,10 @@ def test_deterministic(args):
|
||||
|
||||
elif args.test_mode == "prefix":
|
||||
# In prefix mode, we create prompts from the same long prompt, with different lengths of common prefix.
|
||||
len_prefix = [1, 511, 2048, 4097]
|
||||
len_prefix = [1, 8000, 10000, 12500]
|
||||
num_prompts = len(len_prefix)
|
||||
outputs = {i: [] for i in range(4)}
|
||||
assert all(i <= len(LONG_PROMPT) for i in len_prefix)
|
||||
prompts = [LONG_PROMPT[: len_prefix[i]] for i in range(4)]
|
||||
for i in range(args.n_start, args.n_start + args.n_trials):
|
||||
batch_size = i
|
||||
|
||||
Reference in New Issue
Block a user