Skip to content

Commit 1535277

Browse files
NexesenexLostRuins
andauthored
Augmented benchmark stats (ggml-org#929)
* Augmented benchmark stats v1 * output instead of coherence * populate bench flags as a flags field instead of multiple lines --------- Co-authored-by: Concedo <39025047+LostRuins@users.noreply.github.com>
1 parent a0ecd0d commit 1535277

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

koboldcpp.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3577,26 +3577,28 @@ def onready_subprocess():
35773577
s_pp = float(benchmaxctx-benchlen)/t_pp
35783578
s_gen = float(benchlen)/t_gen
35793579
datetimestamp = datetime.now(timezone.utc)
3580+
benchflagstr = f"NoAVX2={args.noavx2} Threads={args.threads} HighPriority={args.highpriority} NoBlas={args.noblas} Cublas_Args={args.usecublas} Tensor_Split={args.tensor_split} BlasThreads={args.blasthreads} BlasBatchSize={args.blasbatchsize} FlashAttention={args.flashattention} KvCache={args.quantkv}"
35803581
print(f"\nBenchmark Completed - v{KcppVersion} Results:\n======")
3582+
print(f"Flags: {benchflagstr}")
35813583
print(f"Timestamp: {datetimestamp}")
35823584
print(f"Backend: {libname}")
35833585
print(f"Layers: {args.gpulayers}")
35843586
print(f"Model: {benchmodel}")
35853587
print(f"MaxCtx: {benchmaxctx}")
35863588
print(f"GenAmount: {benchlen}\n-----")
3587-
print(f"ProcessingTime: {t_pp:.2f}s")
3589+
print(f"ProcessingTime: {t_pp:.3f}s")
35883590
print(f"ProcessingSpeed: {s_pp:.2f}T/s")
3589-
print(f"GenerationTime: {t_gen:.2f}s")
3591+
print(f"GenerationTime: {t_gen:.3f}s")
35903592
print(f"GenerationSpeed: {s_gen:.2f}T/s")
3591-
print(f"TotalTime: {(t_pp+t_gen):.2f}s")
3593+
print(f"TotalTime: {(t_pp+t_gen):.3f}s")
35923594
print(f"Output: {result}\n-----")
35933595
if save_to_file:
35943596
try:
35953597
with open(args.benchmark, "a") as file:
35963598
file.seek(0, 2)
35973599
if file.tell() == 0: #empty file
3598-
file.write(f"Timestamp,Backend,Layers,Model,MaxCtx,GenAmount,ProcessingTime,ProcessingSpeed,GenerationTime,GenerationSpeed,TotalTime,Output")
3599-
file.write(f"\n{datetimestamp},{libname},{args.gpulayers},{benchmodel},{benchmaxctx},{benchlen},{t_pp:.2f},{s_pp:.2f},{t_gen:.2f},{s_gen:.2f},{(t_pp+t_gen):.2f},{result}")
3600+
file.write(f"Timestamp,Backend,Layers,Model,MaxCtx,GenAmount,ProcessingTime,ProcessingSpeed,GenerationTime,GenerationSpeed,TotalTime,Output,Flags")
3601+
file.write(f"\n{datetimestamp},{libname},{args.gpulayers},{benchmodel},{benchmaxctx},{benchlen},{t_pp:.2f},{s_pp:.2f},{t_gen:.2f},{s_gen:.2f},{(t_pp+t_gen):.2f},{result},{benchflagstr}")
36003602
except Exception as e:
36013603
print(f"Error writing benchmark to file: {e}")
36023604
global using_gui_launcher

0 commit comments

Comments
 (0)