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