Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LLaMA end-to-end benchmarking #19985

Merged
merged 18 commits into from
Mar 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix comment formatting
  • Loading branch information
kunal-vaishnavi committed Mar 20, 2024
commit 5ff17cfe97226e031ba37a72ea2a193ca12cefb1
Original file line number Diff line number Diff line change
Expand Up @@ -471,9 +471,9 @@
logger.info(f"Average Latency of First {halfway} Tokens Generated: {halfway_token_latency_ms} ms")
logger.info(f"Average Throughput of First {halfway} Tokens Generated: {halfway_token_thrpt} tps")

####################################################
#########################################
# Calculate all tokens generated metrics
####################################################
#########################################

all_token_latency_s = sum(accelerator_times) / len(accelerator_times)
all_token_latency_ms = all_token_latency_s * 1000
Expand All @@ -483,9 +483,9 @@
)
logger.info(f"Average Throughput of First {args.generation_length} Tokens Generated: {all_token_thrpt} tps")

####################################################
###############################
# Calculate wall clock metrics
####################################################
###############################

wall_clock_latency_s = wall_clock_end_time - wall_clock_start_time
wall_clock_thrpt = batch_size * ((prompt_length + args.generation_length) / wall_clock_latency_s)
Expand All @@ -512,7 +512,7 @@
)
all_csv_metrics.append(csv_metrics)

except: # noqa: E722
Dismissed Show dismissed Hide dismissed
logger.info(f"Could not benchmark at batch size = {batch_size}, prompt length = {prompt_length}")

filename = f"benchmark_{args.engine}_e2e_{datetime.datetime.now():%Y-%m-%d_%H:%M:%S}.csv"
Expand Down
Loading