Skip to main content

Large Language Model (LLM) Fundamentals in Python

Start here. Learn how a large language model works one concept at a time, each with its own small example in Python: what an LLM is, a language model made by counting, tokens and byte pair encoding, how a model learns by gradient descent and backpropagation, PyTorch, embeddings, attention, the transformer block and the GPT model, training, sampling, pretrained weights, fine-tuning, the parts of newer models and chat. Each tutorial builds only on the ones before it, so you can start knowing nothing and finish ready to build the products below.