From 8442f1ac850d642e0fc5c128f50aafd00b93ed80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Fri, 15 Nov 2024 13:14:55 +0100 Subject: [PATCH] benchmark: fix prefill throughput (#2741) --- benchmark/src/generation.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/src/generation.rs b/benchmark/src/generation.rs index 63fc7808..60d96f70 100644 --- a/benchmark/src/generation.rs +++ b/benchmark/src/generation.rs @@ -180,7 +180,7 @@ async fn prefill( let latency = start_time.elapsed(); // 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 let decode_batch = decode_batch.expect("decode_batch is None. This is a bug.");