fix(router): Obey max batch size (#23)

This commit is contained in:
Nick Hill 2023-01-17 00:11:21 -08:00 committed by GitHub
parent e6d3eb5d5d
commit f7ac394935
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -127,7 +127,7 @@ async fn batching_task(
// Try to get a new batch // Try to get a new batch
if let Some((new_request_ids, new_batch)) = if let Some((new_request_ids, new_batch)) =
db.next_batch(min_size, max_batch_size) db.next_batch(min_size, max_batch_size - batch_size as usize)
{ {
// Generate one token for this new batch to have the attention past in cache // Generate one token for this new batch to have the attention past in cache
let new_cached_batch = let new_cached_batch =