Parse current llama timing output in ubatch bench
This commit is contained in:
1 parent
835996a67b
commit
a8e0b88d99
1 file changed
+6
-4
@@ -192,10 +192,12 @@ def grab(arr):
|
|||||||
|
|
||||||
g_tps = ""
|
g_tps = ""
|
||||||
if evals and ct:
|
if evals and ct:
|
||||||
# eval time line: "eval time = .. ms for N tokens"
|
# eval timing line: "eval time = .. ms / N tokens (... tokens per second)"
|
||||||
ev = evals[-1].split("= ")[-1]
|
import re
|
||||||
ms = float(ev.split(" for")[0].strip())
|
match = re.search(r"eval time =\\s*([0-9.]+) ms", evals[-1])
|
||||||
g_tps = f"{ct / (ms / 1000):.2f}"
|
if match:
|
||||||
|
ms = float(match.group(1))
|
||||||
|
g_tps = f"{ct / (ms / 1000):.2f}"
|
||||||
print(f"== RESULT ubatch={ubatch} run={r} "
|
print(f"== RESULT ubatch={ubatch} run={r} "
|
||||||
f"PREFILL={grab(prefill)} GEN_TPS={g_tps} "
|
f"PREFILL={grab(prefill)} GEN_TPS={g_tps} "
|
||||||
f"pt={pt} ct={ct} wall={dt:.1f}s")
|
f"pt={pt} ct={ct} wall={dt:.1f}s")
|
||||||
|
|||||||
Reference in new issue
Block a user