mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 17:14:36 +00:00
Augmented benchmark stats (#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>
This commit is contained in:
parent
a0ecd0d8e6
commit
153527745b
1 changed files with 7 additions and 5 deletions
12
koboldcpp.py
12
koboldcpp.py
|
@ -3577,26 +3577,28 @@ def main(launch_args,start_server=True):
|
|||
s_pp = float(benchmaxctx-benchlen)/t_pp
|
||||
s_gen = float(benchlen)/t_gen
|
||||
datetimestamp = datetime.now(timezone.utc)
|
||||
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}"
|
||||
print(f"\nBenchmark Completed - v{KcppVersion} Results:\n======")
|
||||
print(f"Flags: {benchflagstr}")
|
||||
print(f"Timestamp: {datetimestamp}")
|
||||
print(f"Backend: {libname}")
|
||||
print(f"Layers: {args.gpulayers}")
|
||||
print(f"Model: {benchmodel}")
|
||||
print(f"MaxCtx: {benchmaxctx}")
|
||||
print(f"GenAmount: {benchlen}\n-----")
|
||||
print(f"ProcessingTime: {t_pp:.2f}s")
|
||||
print(f"ProcessingTime: {t_pp:.3f}s")
|
||||
print(f"ProcessingSpeed: {s_pp:.2f}T/s")
|
||||
print(f"GenerationTime: {t_gen:.2f}s")
|
||||
print(f"GenerationTime: {t_gen:.3f}s")
|
||||
print(f"GenerationSpeed: {s_gen:.2f}T/s")
|
||||
print(f"TotalTime: {(t_pp+t_gen):.2f}s")
|
||||
print(f"TotalTime: {(t_pp+t_gen):.3f}s")
|
||||
print(f"Output: {result}\n-----")
|
||||
if save_to_file:
|
||||
try:
|
||||
with open(args.benchmark, "a") as file:
|
||||
file.seek(0, 2)
|
||||
if file.tell() == 0: #empty file
|
||||
file.write(f"Timestamp,Backend,Layers,Model,MaxCtx,GenAmount,ProcessingTime,ProcessingSpeed,GenerationTime,GenerationSpeed,TotalTime,Output")
|
||||
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}")
|
||||
file.write(f"Timestamp,Backend,Layers,Model,MaxCtx,GenAmount,ProcessingTime,ProcessingSpeed,GenerationTime,GenerationSpeed,TotalTime,Output,Flags")
|
||||
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}")
|
||||
except Exception as e:
|
||||
print(f"Error writing benchmark to file: {e}")
|
||||
global using_gui_launcher
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue