abidlabs / mnist-from-scratch-1min

huggingface.co
Total runs: 0
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: September 25 2026
image-classification

Introduction of mnist-from-scratch-1min

Model Details of mnist-from-scratch-1min

MNIST from scratch — 1-minute training run

A small CNN trained from random initialization (no pretrained weights) on ylecun/mnist for ~1 minute of GPU time .

Results
Test accuracy 0.9919 (9,919 / 10,000)
Training steps 22,814 (≈24 passes over the 60k train set)
Training time 56.1 s
Throughput ~414 steps/s
Hardware 1× Nvidia T4 (small), $0.40/hr
Final train loss ~0.0002 (converged)
Training recipe
Setting Value
Dataset ylecun/mnist , train split (60,000) → test split (10,000)
Model 2 conv layers (16, 32 channels) + FC(1568→128→10) = 206,922 params
Optimizer Adam, lr 1e-3
Loss Cross-entropy
Batch size 64
Seed 0
Pixels float32, scaled to [0, 1]

The training loop was wall-clock bounded ( TRAIN_SECONDS=55 ) with the shuffled DataLoader cycled, so the run ends on the clock rather than after a fixed number of epochs. An earlier version of the script stopped after one epoch (938 steps, 10.7 s, 0.9801 test accuracy); the weights here are from the full-55-second run.

Usage
import torch
import torch.nn as nn
from huggingface_hub import hf_hub_download
import numpy as np

class Net(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv = nn.Sequential(
            nn.Conv2d(1, 16, 3, padding=1), nn.ReLU(), nn.MaxPool2d(2),
            nn.Conv2d(16, 32, 3, padding=1), nn.ReLU(), nn.MaxPool2d(2),
        )
        self.head = nn.Sequential(
            nn.Flatten(), nn.Linear(32 * 7 * 7, 128), nn.ReLU(), nn.Linear(128, 10),
        )

    def forward(self, x):
        return self.head(self.conv(x))

model = Net()
path = hf_hub_download("abidlabs/mnist-from-scratch-1min", "pytorch_model.bin")
model.load_state_dict(torch.load(path, map_location="cpu"))
model.eval()

# x: float32 tensor of shape (N, 1, 28, 28), pixel values in [0, 1]
# logits = model(x)

Run metadata (steps, timing, accuracy, seed) is in training_meta.json .

Links

Runs of abidlabs mnist-from-scratch-1min on huggingface.co

0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About mnist-from-scratch-1min huggingface.co Model

mnist-from-scratch-1min huggingface.co

mnist-from-scratch-1min huggingface.co is an AI model on huggingface.co that provides mnist-from-scratch-1min's model effect (), which can be used instantly with this abidlabs mnist-from-scratch-1min model. huggingface.co supports a free trial of the mnist-from-scratch-1min model, and also provides paid use of the mnist-from-scratch-1min. Support call mnist-from-scratch-1min model through api, including Node.js, Python, http.

mnist-from-scratch-1min huggingface.co Url

https://huggingface.co/abidlabs/mnist-from-scratch-1min

abidlabs mnist-from-scratch-1min online free

mnist-from-scratch-1min huggingface.co is an online trial and call api platform, which integrates mnist-from-scratch-1min's modeling effects, including api services, and provides a free online trial of mnist-from-scratch-1min, you can try mnist-from-scratch-1min online for free by clicking the link below.

abidlabs mnist-from-scratch-1min online free url in huggingface.co:

https://huggingface.co/abidlabs/mnist-from-scratch-1min

mnist-from-scratch-1min install

mnist-from-scratch-1min is an open source model from GitHub that offers a free installation service, and any user can find mnist-from-scratch-1min on GitHub to install. At the same time, huggingface.co provides the effect of mnist-from-scratch-1min install, users can directly use mnist-from-scratch-1min installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

mnist-from-scratch-1min install url in huggingface.co:

https://huggingface.co/abidlabs/mnist-from-scratch-1min

Url of mnist-from-scratch-1min

mnist-from-scratch-1min huggingface.co Url

Provider of mnist-from-scratch-1min huggingface.co

abidlabs
ORGANIZATIONS

Other API from abidlabs

huggingface.co

Total runs: 21
Run Growth: -48
Growth Rate: -228.57%
Updated:March 24 2022
huggingface.co

Total runs: 19
Run Growth: 13
Growth Rate: 68.42%
Updated:September 25 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:August 18 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:September 25 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 07 2026