From 89d8279a252186034c675612a7acdc691511f93f Mon Sep 17 00:00:00 2001 From: Ji-Ung Lee Date: Fri, 16 Aug 2024 16:56:56 +0200 Subject: [PATCH] Add time per token to results file --- code/evaluate_llama2.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/evaluate_llama2.py b/code/evaluate_llama2.py index b39c452..3eaf935 100644 --- a/code/evaluate_llama2.py +++ b/code/evaluate_llama2.py @@ -106,7 +106,9 @@ def hook_fn(layer, input, output): # Compute scores rouge = evaluate.load('rouge') results_generated = rouge.compute(predictions=predictions_generated, references=references) - results_generated["time"] = e2e_inference_time + results_generated["time-total"] = e2e_inference_time + results_generated["time-per-token"] = e2e_inference_time_norm + print("Results: ",results_generated)