advanced practice · coding problem

Overfit a single batch sanity check

Training loss stuck high on 1 batch of 8 examples. Name two data bugs to check before changing the architecture.

The mechanism

A training loop is forward pass → loss → backward pass → optimizer step, repeated over batches of data. When training looks broken, the data is the usual culprit (leaked, mislabeled, wrong shape) — check it before blaming the model.

Study Training & Debugging

Expected evidence

Wrong labels/shapes, train-eval leakage, broken tokenizer, masked tokens all padding, etc.

Try this drill in the practice workspace →

Hints when you need them
  • Karpathy recipe: overfit one batch first.
  • If you cannot overfit one batch, data or loss is wrong.

Check the sources

Browse all practice briefs