units (+2 squashed commit)

Squashed commit:

[166979d9] units coversion

[038dd5d4] get rid of all warnings (+1 squashed commits)

Squashed commits:

[6efd1e1b] get rid of all warnings
This commit is contained in:
Concedo 2024-01-20 23:43:01 +08:00
parent 71e9a64171
commit 5639c1a520
5 changed files with 6 additions and 12 deletions

View file

@ -2073,7 +2073,7 @@ generation_outputs gpttype_generate(const generation_inputs inputs, generation_o
int realnpredict = kcpp_params->n_predict-stopper_unused_tokens;
float pt2 = (time2*1000.0/(realnpredict==0?1:realnpredict));
float tokens_per_second = (realnpredict == 0 ? 0 : realnpredict / (time1 + time2));
printf("\nContextLimit: %d/%d, Processing:%.2fs (%.1fms/T), Generation:%.2fs (%.1fms/T), Total:%.2fs (%.2fT/s)",current_context_tokens.size(),nctx, time1, pt1, time2, pt2, (time1 + time2), tokens_per_second);
printf("\nContextLimit: %d/%d, Processing:%.2fs (%.1fms/T), Generation:%.2fs (%.1fms/T), Total:%.2fs (%.1fms/T = %.2fT/s)",current_context_tokens.size(),nctx, time1, pt1, time2, pt2, (time1 + time2), (1000.0f/tokens_per_second) , tokens_per_second);
fflush(stdout);
output.status = 1;
generation_finished = true;