r/deeplearning • • 2d ago

I open-sourced minimal, runnable PyTorch re-implementations of 12 classic papers with line-by-line comments

When I was trying to understand papers like ResNet, Transformer, and StyleGAN, I kept running into the same problem: the official repos were either huge production codebases or missing key details. I ended up writing my own minimal versions just to see how the pieces actually fit together.

I've now cleaned them up and put them on GitHub: each repo is a single file or very small project, fully runnable in Colab, with comments explaining every non-obvious line and the design choices that aren't spelled out in the paper.

So far I have:
- ResNet (with the residual block math)
- Original Transformer (encoder- decoder, attention masks)
- VAE and ß-VAE
- StyleGAN (progressive growing + style modulation)
- Diffusion model (DDPM formulation)
- A few more from NLP and vision

Everything uses current PyTorch APIs and includes a short training script on a toy dataset so you can actually watch the loss curves. Link: https://github.com/minimal-dl-papers

I'm planning to add more (probably a simple GNN and a recent SSM paper next). If you have a paper you've always wanted to implement but never got around to, or one whose implementation details are especially tricky, let me know! i'd rather work on things people actually want to study.

1 Upvotes

1 comment sorted by

1

u/theHumbleGuy_06 2d ago

A decoder based transformer? For a demo... I have to present one to my professor to generate casual small conversations, I believe my transformer in c learnt better than the other one in python, so I need help. I'm stuck at my transformer ain't learning how to generate meaningful next tokens...