Skip to content

Commit

Permalink
correct throughput equation
Browse files Browse the repository at this point in the history
  • Loading branch information
lvhan028 committed Jul 21, 2023
1 parent 6bad259 commit bb9991d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion benchmark/profile_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ def main(model_path: str,
token_latency_min = np.min(stats[:, 2], axis=0)
token_latency_max = np.max(stats[:, 2], axis=0)
token_latency_ave = np.mean(stats[:, 2], axis=0)
throughput = np.sum(stats[:, 1], axis=0) / np.sum(stats[:, 2], axis=0)
throughput = np.sum(stats[:, 1], axis=0) / np.sum(stats[:, 2],
axis=0) * concurrency
print(f'\n{"-" * 50}\nconcurrency: {concurrency}, input_tokens: '
f'{input_seqlen}, output_tokens: {output_seqlen}\n'
f'elapsed_time: {elapsed_time:.2f}s\n'
Expand Down

0 comments on commit bb9991d

Please sign in to comment.