benchmark: fix prefill throughput (#2741)

This commit is contained in:
Daniël de Kok 2024-11-15 13:14:55 +01:00 committed by GitHub
parent ca4f46ddfc
commit 8442f1ac85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -180,7 +180,7 @@ async fn prefill(
let latency = start_time.elapsed(); let latency = start_time.elapsed();
// Compute throughput from latency and batch size // Compute throughput from latency and batch size
let throughput = batch_size as f64 / latency.as_secs_f64(); let throughput = (batch_size * sequence_length) as f64 / latency.as_secs_f64();
// Decode batch cannot be empty // Decode batch cannot be empty
let decode_batch = decode_batch.expect("decode_batch is None. This is a bug."); let decode_batch = decode_batch.expect("decode_batch is None. This is a bug.");