This section is at https://rollingedition.com/language-models-from-the-ground-up/training-a-small-model#turn-products-into-batches.