Intermediate · 1 day
How Large Language Models Work
A one-day explanation of LLM internals for developers, architects and technically curious professionals. Enough mechanism to improve engineering decisions, without a research-paper prerequisite.
1 day · Intermediate · Foundations · Developers, architects and technical professionals
Overview
Many teams are building on large language models without a usable picture of the mechanism. That leads to poor assumptions about memory, truth, context, fine-tuning and cost. This course explains how current models actually work, at a depth that changes how you design systems.
The day covers tokenisation, embeddings, attention, the transformer stack, training, inference and sampling. Pretraining, instruction tuning, alignment and fine-tuning are separated carefully, because they answer different problems. Quantisation, model size and scaling are discussed as engineering constraints rather than as a race.
The explanations are visual and concrete. Small demonstrations show what tokens look like, how sampling changes output, and why a longer context is not the same thing as understanding. Mathematics is used where it clarifies; it is not the point of the course.
You leave able to reason about context windows, latency, model choice and the limits of prompting, retrieval and fine-tuning with more than folklore.
Audience
Developers, architects, technical product leaders and technically curious professionals who will make or influence engineering decisions about LLMs.
Prerequisites
Comfort with software concepts is expected. No specialist mathematics is required. Programming is helpful for the demonstrations but not mandatory.
Duration
1 day
Can be expanded with additional implementation labs, or compressed into a technical briefing for architecture teams.
Learning outcomes
- 01
Explain tokenisation, embeddings and next-token prediction in enough detail to reason about prompts and context.
- 02
Describe attention and the transformer block as an engineering architecture, not as a metaphor.
- 03
Compare pretraining, instruction tuning, alignment and fine-tuning, and say which problem each addresses.
- 04
Predict how temperature, sampling, context length and model size affect output, cost and latency.
- 05
Diagnose common misconceptions about memory, truth, citations and “the model knows X”.
- 06
Use a clearer model of inference, quantisation and scaling when choosing between hosted and local models.
- 07
Connect internals to practical choices: prompting, RAG, fine-tuning and evaluation.
Outline
- 01
Tokens, embeddings and prediction
- Text as tokens: why models do not see words, and why tokenisation affects cost and behaviour.
- Embeddings as geometry: similarity, clustering and the limits of “meaning”.
- Next-token prediction as the core objective, and what that implies for truth.
- Demonstration: inspect tokens, counts and a next-token distribution.
- 02
Attention and the transformer
- Queries, keys and values as a routing mechanism over context.
- Self-attention, layers, feed-forward networks and residual structure.
- Positional information and why order is not free.
- Context windows: what is in scope, what is lost, and why “the whole document” is often a hope.
- Visual walkthrough of a forward pass on a short sequence.
- 03
Training, alignment and adaptation
- Pretraining on large corpora: what is learned, and what is not.
- Instruction tuning and alignment: why chat models behave differently from base models.
- Fine-tuning and when it is the wrong lever compared with retrieval or better data at inference.
- Demonstration: compare a base completion with an instruction-tuned response on the same prompt.
- 04
Inference, sampling and practical limits
- Inference as a loop: cache, latency, batching and why long outputs cost more than long prompts in different ways.
- Temperature, top-k, top-p and the difference between diversity and reliability.
- Model size, quantisation and the engineering trade-off between quality, VRAM and throughput.
- Strengths and limits that follow from the architecture, not from the product sheet.
- Discussion: which production problems are model problems, and which are system problems.
Practical work
The course uses visual explanations and small demonstrations rather than a full implementation lab. You inspect tokenisation, sampling behaviour, context effects and the difference between base and instruction-tuned models, then apply that picture to design questions from your own systems.
Takeaways
- A working mental model of tokens, attention, training and inference
- A vocabulary that holds up in architecture discussions
- A short decision map connecting internals to prompting, RAG, fine-tuning and model choice
- Reference notes and diagrams from the day
Delivery
Cognitecta delivers private corporate training, on-site or as remote live training. Courses can be run as published, or adapted to your organisation’s stack, domain and experience level.
Instructor
Nicholas Johnson, AI architect and software engineer. He has a degree in Artificial Intelligence and around twenty years of professional technology training, including hundreds of courses for engineering teams and large organisations. About.
Related courses
1 day · Foundation
Generative AI Fundamentals
A technically accurate, practical introduction to modern generative AI for mixed technical and non-technical audiences. Enough depth to make sound decisions, with no requirement to write code.
1 day · Foundation
Practical Generative AI at Work
A working day for knowledge workers and business teams: using generative AI for research, writing, analysis and document work, with enough discipline to trust the output.