Skip to content

Commit

Permalink
Update text_generation.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-esir authored Dec 20, 2024
1 parent 98fa527 commit 568c853
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/llm_bench/task/text_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def token_printer():
- np.array(perf_metrics.raw_metrics.m_new_token_times[:-1])
).tolist()

tm_list = np.array([first_token_time] + second_tokens_durations) / 1000
tm_list = (np.array([first_token_time] + second_tokens_durations) / 1000).tolist()
inference_durations = (np.array(perf_metrics.raw_metrics.token_infer_durations) / 1000 / 1000).tolist()
log.debug('latency of all tokens:')
[log.debug('[{}]{:.4f}'.format(idx, tm)) for idx, tm in enumerate(tm_list)]
Expand All @@ -323,7 +323,7 @@ def token_printer():
metrics_print.print_metrics(
num,
iter_data,
tm_list.tolist(),
tm_list,
inference_durations,
warm_up=(num == 0),
max_rss_mem=max_rss_mem_consumption,
Expand Down

0 comments on commit 568c853

Please sign in to comment.