Python
Learn how programs work, then use functions, files, NumPy arrays, plots, debugging, and repeatable numerical experiments.
No previous programming experience is required.
This page shows how the subjects fit together. The six-subject core path is meant to be followed in order. Optional foundations and later topics branch from it, with each prerequisite shown where it matters.
Open subjects are ready to study. In review subjects are available only to approved readers. Planned subjects show where a path is heading without promising a release date.
New to LLM Primer? The Start page explains who the Foundation Path is for and how to study it.
These six subjects form one cumulative route. Completing it should leave you able to explain the main computations inside a language model and develop a small language model from data to deployment.
Learn how programs work, then use functions, files, NumPy arrays, plots, debugging, and repeatable numerical experiments.
No previous programming experience is required.
Develop the algebra, vectors, matrices, probability, calculus, optimization, and information theory used in machine learning.
Basic Python helps with the computational examples.
Build neural networks from tensors, layers, activations, losses, backpropagation, optimization, and learned representations.
Builds on Python and Mathematics.
Represent text with tokens and embeddings, assign probabilities to sequences, and build neural next-token predictors.
Builds on probability and Deep Learning.
Build self-attention, multi-head attention, positional methods, transformer blocks, architecture families, training, generation, caching, and controlled interpretation.
Builds on Deep Learning and Language Modeling.
Develop one language model from corpus and tokenizer decisions through pretraining, evaluation, packaging, inference, serving, context, observation, and rollback.
Builds on Transformers and Language Modeling.
These established subjects are foundations for later specialties, but they are not required before Transformers or Large Language Models. Choose one when it supports the direction you want to study next.
Regression, classification, trees, clustering, generalization, evaluation, and useful non-neural baselines.
Builds on Python and Mathematics.
Latent-variable models, autoencoders, VAEs, GANs, diffusion, flow matching, and learned data distributions.
Builds on probability, optimization, and Deep Learning.
States, actions, rewards, policies, value functions, Bellman equations, Q-learning, and policy gradients.
Builds on probability and optimization; later work uses Deep Learning.
Frontier material builds on the stable subjects above. It is less linear and changes more often, so lessons will separate established mechanisms from current results and open questions.
Supervised adaptation, preference data, reward models, direct preference optimization, and reinforcement-learning methods for language models.
Builds on: Large Language Models and RL Foundations
Inference-time computation, tool use, planning, memory, feedback loops, and evaluation of agent behavior.
Builds on: Large Language Models and LLM Post-training
Learned environment dynamics, prediction, simulation, planning, and their connections to agents and multimodal models.
Builds on: Generative Modeling and RL Foundations
A separate engineering path will connect programming and algorithms to computer architecture, operating systems, parallel computing, GPUs, model inference, and distributed training. It is not a prerequisite for beginning the core LLM path and will be introduced later.
Programming and algorithms → Computer systems → Parallel and GPU computing → Inference and training systems