NanoChat Training Log Fields | Generated by AI

Home 2026.07

Question: What do the fields in this nanochat training log line mean — h: 1 pq: 0 rg: 278 | total time: 25.36m | eta: 1951.3m step 00383/29000 (1.32%) | loss: 3.369286 | lrm: 1.00 | dt: 4052.93ms | tok/sec: 129,360 | bf16_mfu: 62.46 | epoch: 1 pq: 0 rg: 279 | total time: 25.43m | eta: 1951.2m?

Answer:

That’s two consecutive print0 lines from base_train.py glued together in your terminal — the leading h: 1 is just the tail-end of epoch: 1 from the previous line, truncated by terminal wrap. The actual format string, straight from scripts/base_train.py:

epoch = f"{dataloader_state_dict['epoch']} pq: {dataloader_state_dict['pq_idx']} rg: {dataloader_state_dict['rg_idx']}"
print0(f"step {step:05d}/{num_iterations:05d} ({pct_done:.2f}%) "
       f"| loss: {debiased_smooth_loss:.6f} | lrm: {lrm:.2f} "
       f"| dt: {dt*1000:.2f}ms | tok/sec: {tok_per_sec:,} "
       f"| bf16_mfu: {mfu:.2f} | epoch: {epoch} "
       f"| total time: {total_training_time/60:.2f}m{eta_str}")

Field by field, using your line:

One data-pipeline signal worth noting: rg_idx went 278 → 279 for one step — i.e. you’re burning almost exactly one row group (1024 packed docs) per optimizer step at your current batch size. At eta: 1951.2m (~32.5 hours) for the full 29,000-step run, you’ll cycle through a lot of row groups — worth confirming your local shard cache (~/.cache/nanochat) has enough shards downloaded that you’re not going to stall on network I/O for parquet fetches mid-run on the AMD Dev Cloud box.

References:


Back Donate