// zero dependencies. just math.
Single-file, zero-dependency Python implementations of the algorithms that power modern AI.
Every script runs with python script.py — no frameworks, no abstractions.
Four progressive tiers. Pick the one matching what you want to learn next, or jump into the full catalog.
The architectures the rest is built on. Tokenization, embeddings, RNNs, attention, GPT, BERT, ResNet, diffusion, GANs.
Explore arrow_forwardSteering model behavior post-training. LoRA, QLoRA, DPO, PPO, GRPO, MoE, regularization.
Explore arrow_forwardMaking models fast and small. Flash Attention, KV-cache, quantization, RoPE, parallelism, SSMs.
Explore arrow_forwardSearch and reasoning for autonomous agents. MCTS, ReAct, bandits, minimax, memory networks.
Explore arrow_forwardStructured tracks through the collection. Pick one based on your interest or time budget.
No local imports, no utils.py, no companion files. Everything in one place.
Python standard library only. If it needs pip install, it doesn't belong here.
python script.py runs the full lifecycle. No setup, no config, no environment.
30-40% comment density. Math-to-code mappings. Why, not what. Read top-to-bottom like a tutorial.
random.seed(42) at the top of every script. Same input, same output, every time.
Every script completes on a laptop CPU. No GPU required. No cloud. No excuses.
48 single-file Python implementations of AI/ML algorithms. Zero dependencies, pure stdlib. The core collection.
Manim-powered algorithm visualizations. Animated explainers showing each algorithm's mechanics in motion.
This website. Algorithm catalog, learning paths, and live GitHub stats. Pure static HTML/CSS/JS.
Paper cards and lessons. Primary sources only. One markdown per paper, plus companion code walkthroughs.
Agent pipeline that drafts algorithm entries from papers for human review. Containment guardrails, design phase.