← Learning Portal

LLM From Scratch

A complete technical textbook covering everything from mathematical foundations to frontier model architectures, reinforcement learning, and beyond.

30
Chapters
1.8 MB
Content
~2000
Pages

Part I: Foundations

Mathematical prerequisites, neural network fundamentals, and the path to Transformers

Part II: Language Model Training

From raw text to pretrained language models

Part III: Reinforcement Learning & Alignment

From RL fundamentals to RLHF, DPO, and modern alignment techniques

Part IV: Model Families

The evolution of frontier LLMs from GPT to DeepSeek

Part V: Efficiency & Optimization

Making large models practical: attention, quantization, sparsity, and adaptation

Part VI: Advanced Capabilities

Multimodal understanding, reasoning, agents, and tool use

Part VII: Safety, Interpretability & the Future

Understanding, aligning, and evolving language models

Part VIII: Practice & Production

Data pipelines, inference systems, evaluation, prompt engineering, and synthetic data