From blocks to results

Training running in epoch 2 of 2 on the CPU, with the loss chart drawing live: training loss went from 2.334 at step 1 to 0.0544 at step 1,876.Training running in epoch 2 of 2 on the CPU, with the loss chart drawing live: training loss went from 2.334 at step 1 to 0.0544 at step 1,876.Training running in epoch 2 of 2 on the CPU, with the loss chart drawing live: training loss went from 2.334 at step 1 to 0.0544 at step 1,876.

Build

Blocks on a canvas, their code beside them.

The model editor. An MNIST model built from Input, Conv2d, ReLU and MaxPool2d blocks, with the Conv2d block selected; below it, the model.py code panel highlights that block's line: self.conv2d_1 = nn.Conv2d(1, 16, kernel_size=3, padding=1).The model editor. An MNIST model built from Input, Conv2d, ReLU and MaxPool2d blocks, with the Conv2d block selected; below it, the model.py code panel highlights that block's line: self.conv2d_1 = nn.Conv2d(1, 16, kernel_size=3, padding=1).The model editor. An MNIST model built from Input, Conv2d, ReLU and MaxPool2d blocks, with the Conv2d block selected; below it, the model.py code panel highlights that block's line: self.conv2d_1 = nn.Conv2d(1, 16, kernel_size=3, padding=1).

Data

Built-in data, your own, or Hugging Face. See it before you train.

The Data page for MNIST handwritten digits: 70,000 samples of 28 × 28 pixels in 10 classes, the first 20 training images, a 60,000 / 10,000 training and test split, and the fields image and label wired to the model's Input and Target.The Data page for MNIST handwritten digits: 70,000 samples of 28 × 28 pixels in 10 classes, the first 20 training images, a 60,000 / 10,000 training and test split, and the fields image and label wired to the model's Input and Target.The Data page for MNIST handwritten digits: 70,000 samples of 28 × 28 pixels in 10 classes, the first 20 training images, a 60,000 / 10,000 training and test split, and the fields image and label wired to the model's Input and Target.

Train

A step at a time, an epoch, or all the way.

Training paused after epoch 1 of 2: train loss 0.259, test loss 0.058, accuracy 98.1%, with the training-loss chart falling from 2.334 at step 1, and buttons for Step, One epoch and Go on.Training paused after epoch 1 of 2: train loss 0.259, test loss 0.058, accuracy 98.1%, with the training-loss chart falling from 2.334 at step 1, and buttons for Step, One epoch and Go on.Training paused after epoch 1 of 2: train loss 0.259, test loss 0.058, accuracy 98.1%, with the training-loss chart falling from 2.334 at step 1, and buttons for Step, One epoch and Go on.

Results

What it got right, and what it got wrong.

The Results page: test accuracy 98.5%, 9,849 of 10,000 samples right, after 2 epochs on CPU. A confusion matrix of the ten digits with the right answers on the diagonal, the accuracy of each class, and the test predictions with the wrong ones first.The Results page: test accuracy 98.5%, 9,849 of 10,000 samples right, after 2 epochs on CPU. A confusion matrix of the ten digits with the right answers on the diagonal, the accuracy of each class, and the test predictions with the wrong ones first.The Results page: test accuracy 98.5%, 9,849 of 10,000 samples right, after 2 epochs on CPU. A confusion matrix of the ten digits with the right answers on the diagonal, the accuracy of each class, and the test predictions with the wrong ones first.

Language models

Teach a small model to write like Shakespeare.

Generate with the mini GPT trained on Tiny Shakespeare: the prompt ROMEO: and 200 characters the model wrote after it, in the shape of a play, with speakers such as FRIAR CUS and DUKE AS.Generate with the mini GPT trained on Tiny Shakespeare: the prompt ROMEO: and 200 characters the model wrote after it, in the shape of a play, with speakers such as FRIAR CUS and DUKE AS.Generate with the mini GPT trained on Tiny Shakespeare: the prompt ROMEO: and 200 characters the model wrote after it, in the shape of a play, with speakers such as FRIAR CUS and DUKE AS.

Ready-trained models

Start from GPT-2 small or ViT-Tiny, and train a small add-on (LoRA).

Starting from GPT-2 small: a card with its source, licence and size (124 million weights, 549.5 MB to download), the memory fine-tuning needs (about 3.8 GB), and a Download button. Nothing downloads until it is pressed.Starting from GPT-2 small: a card with its source, licence and size (124 million weights, 549.5 MB to download), the memory fine-tuning needs (about 3.8 GB), and a Download button. Nothing downloads until it is pressed.Starting from GPT-2 small: a card with its source, licence and size (124 million weights, 549.5 MB to download), the memory fine-tuning needs (about 3.8 GB), and a Download button. Nothing downloads until it is pressed.