LLM Labs
Build language models from scratch in Python, from tokenization to training and inference.
12 tracks
Foundations
ML math and core functions
Start with stable probabilities, losses, matrix operations and supervised learning.
Tokenization and model inputs
Turn text into token IDs, vectors and training batches with explicit boundaries.
Attention and decoder components
Build attention, position encoding, normalization and transformer feed-forward layers.
Model building and training
Transformer architecture builds
Assemble dense, encoder–decoder, sparse and recurrent architectures from small, testable components.
Looped transformers
Explore shared depth, adaptive computation and evaluation of recurrent-depth models.
Backpropagation and optimization
Check gradients and update weights, then train a tiny next-token model.
Advanced training implementations
Backpropagate attention, implement Muon and loss scaling, then train an attention model.
Post-training and evaluation
Build response-only objectives, preference losses, reinforcement learning and trustworthy metrics.
Inference and frontier techniques
Decoding and inference
Grow a cache, choose tokens and schedule an autoregressive workload.
Performance and distributed training
Practice streaming reductions, quantization and the bookkeeping behind parallel training.
Frontier architecture variants
Build sparse indexes, compressed context, latent experts, residual routing and recurrent state.
Frontier mechanisms
Free labs on latent attention, gated delta recurrence, expert routing, attention sinks, and a simplified Muon update.