- MantraMindAI
- Courses
- Generative AI & LLMs
- How Large Language Models Work
How Large Language Models Work
For developers and technical learners who use LLMs and want to know what happens inside them, from tokenisation and attention to training, sampling and alignment. You will be able to work the key numbers by hand, measure them in a real model, and use them to reason about cost, context, decoding settings and fine-tuning choices.
Course Content
Follow text through a model's input path and one transformer block — tokens, embeddings, positions, attention, normalisation and feed-forward layers — with the arithmetic worked by hand.
See what a model is trained to do and how it produces text — next-token loss, compute budgets, decoding and sampling, and the post-training stages (fine-tuning, preference optimisation and reasoning RL) that turn a text predictor into an assistant.
Open GPT-2 small and measure what the course described — tokenisation, surprisal and entropy, an induction head, decoding strategies and KV-cache memory — with code you run yourself.