r/deeplearning • u/CraveCuffd • 1d ago
I trained a 124M vision transformer from scratch on ImageNet-100 using a single 3090 and logged every hyperparameter change
I wanted to see how far a plain ViT could go without any pretrained weights or fancy augmentations on a single consumer card. Used the 100-class subset to keep epochs reasonable (about 9 days total on 24 GB). Started with the standard recipe but quickly hit stability issues around 40 epochs, so I switched to a cosine schedule with 5% warmup and added gradient clipping at 1.0.
Biggest surprise was that removing the class token and using average pooling instead gave a consistent +1.8% top-1. Also tracked every config change in a simple JSON log so I could replay the exact run later. Final validation accuracy landed at 71.4% without test-time augmentation.
Everything is on GitHub (Apache 2.0) including the exact training script, the JSON run history, and the final weights under CC-BY-NC. Would be curious if anyone has tried similar small-scale ViT runs and what tricks moved the needle for them.
https://github.com/anon-vit100/vit-from-scratch https://huggingface.co/anon-vit100/vit-tiny-imagenet100
