mirror of
https://github.com/karpathy/llm.c.git
synced 2026-07-28 20:35:09 -04:00
print loss on only one
This commit is contained in:
parent
711082a746
commit
2f261ad4d7
1 changed files with 2 additions and 0 deletions
|
|
@ -2271,9 +2271,11 @@ int main(int argc, char *argv[]) {
|
|||
(end.tv_sec - start.tv_sec) + (end.tv_nsec - start.tv_nsec) / 1e9;
|
||||
total_sum_iteration_time_s += time_elapsed_s;
|
||||
int tokens_per_second = (B * T) / time_elapsed_s;
|
||||
if (my_pe == 1) {
|
||||
printf("step %4d/%d: train loss %f (%f ms, %d tok/s)\n", step + 1,
|
||||
train_num_batches, model.mean_loss, time_elapsed_s * 1000,
|
||||
tokens_per_second);
|
||||
}
|
||||
logger_log_train(&logger, step, model.mean_loss);
|
||||
}
|
||||
// add a total average, for optimizations that are only mild improvements
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue