From fff1d4f86f78b974c3f74aae680e819a20f1c080 Mon Sep 17 00:00:00 2001 From: Sun Choi Date: Fri, 5 Jul 2024 01:30:26 -0700 Subject: [PATCH] Add bucket for input seq len exactly same as --max-input-length (#178) --- router/client/src/client.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/router/client/src/client.rs b/router/client/src/client.rs index fc49e2a8..3cda2f4b 100644 --- a/router/client/src/client.rs +++ b/router/client/src/client.rs @@ -137,8 +137,8 @@ impl Client { let seq_bucket_size: u32 = read_env_var("PAD_SEQUENCE_TO_MULTIPLE_OF", 128); let mut seq_lengths: Vec = (seq_bucket_size..max_input_length+1).step_by(seq_bucket_size as usize).collect(); if let Some(&last) = seq_lengths.last() { - if last < max_input_length { - seq_lengths.push(max_input_length); + if last < (max_input_length + 1) { + seq_lengths.push(max_input_length + 1); } }