@@ -60,6 +60,7 @@ def main(args_in: list[str] | None = None) -> None:
60
60
try :
61
61
start_benchmark (args )
62
62
63
+ iterations = 0
63
64
with open ("results.github.env" , 'w' ) as github_env :
64
65
# parse output
65
66
with open ('k6-results.json' , 'r' ) as bench_results :
@@ -74,6 +75,7 @@ def main(args_in: list[str] | None = None) -> None:
74
75
github_env .write (
75
76
f"{ escape_metric_name (metric_name )} _{ escape_metric_name (metric_metric )} ={ value } \n " )
76
77
token_seconds = data ['metrics' ]['llamacpp_tokens_second' ]['avg' ]
78
+ iterations = data ['root_group' ]['checks' ]['success completion' ]['passes' ]
77
79
78
80
except Exception :
79
81
print ("bench: error :" )
@@ -120,13 +122,14 @@ def main(args_in: list[str] | None = None) -> None:
120
122
plt .xticks (rotation = 0 , fontsize = 14 , horizontalalignment = 'center' , alpha = .7 )
121
123
plt .yticks (fontsize = 12 , alpha = .7 )
122
124
123
- plt .title (f"llama.cpp { args .name } on { args .runner_label } { round ( token_seconds , 2 ) } tk/s \n "
125
+ plt .title (f"llama.cpp { args .name } on { args .runner_label } { iterations } iterations \n "
124
126
f"duration={ args .duration } " ,
125
127
fontsize = 14 , wrap = True )
126
128
plt .grid (axis = 'both' , alpha = .3 )
127
129
plt .ylabel (f"llamacpp:{ metric } " , fontsize = 22 )
128
- plt .xlabel (f"hf-repo={ args .hf_repo } hf-file={ args .hf_file } parallel={ args .parallel } ctx-size={ args .ctx_size } ngl={ args .n_gpu_layers } batch-size={ args .batch_size } ubatch-size={ args .ubatch_size } \n "
129
- f" pp={ args .max_prompt_tokens } pp+tg={ args .max_tokens } \n "
130
+ plt .xlabel (f"{ args .hf_repo } /{ args .hf_file } \n "
131
+ f"parallel={ args .parallel } ctx-size={ args .ctx_size } ngl={ args .n_gpu_layers } batch-size={ args .batch_size } ubatch-size={ args .ubatch_size } \n "
132
+ f"pp={ args .max_prompt_tokens } pp+tg={ args .max_tokens } \n "
130
133
f"branch={ args .branch } commit={ args .commit } " , fontsize = 14 , wrap = True )
131
134
plt .gcf ().autofmt_xdate ()
132
135
@@ -157,7 +160,7 @@ def main(args_in: list[str] | None = None) -> None:
157
160
}
158
161
with open ("results.github.env" , 'a' ) as github_env :
159
162
github_env .write (f"BENCH_RESULTS={ json .dumps (bench_results , indent = None , separators = (',' , ':' ) )} " )
160
- github_env .write (f"BENCH_ITERATIONS={ data [ 'root_group' ][ 'checks' ][ 'success completion' ][ 'passes' ] } " )
163
+ github_env .write (f"BENCH_ITERATIONS={ iterations } " )
161
164
162
165
163
166
def start_benchmark (args ):
0 commit comments