From 2eaad82a916954a77e31621e80e9450b2b79e68d Mon Sep 17 00:00:00 2001 From: Danny Liu Date: Sun, 18 Feb 2024 10:10:57 -0800 Subject: [PATCH 1/2] =?UTF-8?q?show=20prompt/s=20in=20perf=20info=20?= =?UTF-8?q?=E2=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/components/chat/Messages/ResponseMessage.svelte | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/components/chat/Messages/ResponseMessage.svelte b/src/lib/components/chat/Messages/ResponseMessage.svelte index cc42d0b94..bd08aaec4 100644 --- a/src/lib/components/chat/Messages/ResponseMessage.svelte +++ b/src/lib/components/chat/Messages/ResponseMessage.svelte @@ -79,6 +79,11 @@ ) / 100 } tokens` ?? 'N/A' }
+ prompt/s: ${ + Math.round( + ((message.info.prompt_eval_count ?? 0) / (message.info.prompt_eval_duration / 1000000000)) * 100 + ) / 100 ?? 'N/A' + } prompts
total_duration: ${ Math.round(((message.info.total_duration ?? 0) / 1000000) * 100) / 100 ?? 'N/A' From ab57cdd6656710bef96a5679d7dea1aa71871010 Mon Sep 17 00:00:00 2001 From: Danny Liu Date: Sun, 18 Feb 2024 10:16:41 -0800 Subject: [PATCH 2/2] update response message tooltip naming --- src/lib/components/chat/Messages/ResponseMessage.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/components/chat/Messages/ResponseMessage.svelte b/src/lib/components/chat/Messages/ResponseMessage.svelte index bd08aaec4..1360a5c93 100644 --- a/src/lib/components/chat/Messages/ResponseMessage.svelte +++ b/src/lib/components/chat/Messages/ResponseMessage.svelte @@ -72,18 +72,18 @@ if (message.info) { tooltipInstance = tippy(`#info-${message.id}`, { - content: `token/s: ${ + content: `response_token/s: ${ `${ Math.round( ((message.info.eval_count ?? 0) / (message.info.eval_duration / 1000000000)) * 100 ) / 100 } tokens` ?? 'N/A' }
- prompt/s: ${ + prompt_token/s: ${ Math.round( ((message.info.prompt_eval_count ?? 0) / (message.info.prompt_eval_duration / 1000000000)) * 100 ) / 100 ?? 'N/A' - } prompts
+ } tokens
total_duration: ${ Math.round(((message.info.total_duration ?? 0) / 1000000) * 100) / 100 ?? 'N/A'