AI curriculum

Course outline for How Large Language Models Work

Follow a short text request through tokenization, learned representations, attention, and next-token generation. See how a decoder-style transformer uses context and why sampling changes its output. Connect these mechanisms to context limits, inference memory, reasoning-style models, and multimodal inputs through worked examples and controlled experiments rather than usage-accounting exercises.

How Large Language Models Work Course Objectives

  • Trace text through tokens, embeddings, attention, and a transformer block.
  • Explain next-token training, inference, and the role of supplied context.
  • Compare repeated generations under controlled sampling settings.
  • Explain KV caching and the limits of context, reasoning, and multimodal inputs.

Pre-requisites

  • Artificial Intelligence Foundations or equivalent understanding of learning, generation, training, and inference.
  • Comfort with simple arithmetic, tables, and weighted averages.
  • Programming and specialized hardware are not required.

Before this course

Complete the required courses or bring equivalent experience. Recommended courses add useful depth; they are not enrolment gates.

Required preparation

Readiness checks

  • Artificial Intelligence Foundations or equivalent understanding of learning, generation, training, and inference.
  • Comfort with simple arithmetic, tables, and weighted averages.
  • Programming and specialized hardware are not required.

Understands learning, generation, training, and inference and is comfortable with simple arithmetic, tables, and weighted averages; programming and specialized hardware are not required.

Find your place in the learning map

Lab Setup

Delivery requirements: the following environment, materials, access, and exercise timing must be prepared and verified before delivery. This outline does not certify that a lab package is ready.

A browser-based teaching interface or prepared notebook with a tokenizer, attention example, and a controlled generation runner. The selected runner must expose the controls used in the exercise. Delivery needs a tested shared or local execution route that does not require learner-owned paid accounts or GPUs. Recorded outputs can support comparison but do not count as conducting the experiment.

Detailed Course Outline

Module 1: From text to contextual representations (2 hours)

  • Tokens and boundaries: Inspect tokens, token identifiers, and changed text boundaries using actual tokenizer results.
  • Embeddings and positions: Explain learned embeddings and positional information in a simplified representation trace.
  • Queries, keys, and values: Queries, keys, values, and a weighted attention example.
  • Causal attention: Trace causal attention in a decoder-style model as it uses earlier context.
  • Transformer blocks: Residual connections, feed-forward transformations, and stacked transformer blocks.

Practical outcome: Trace a simplified block and predict how an input change affects attention.

Module 2: From a trained model to generated text (2 hours)

  • Training and instruction adaptation: Next-token training, learned weights, and later instruction adaptation.
  • Next-token selection: Vocabulary scores, probabilities, and selecting a next token.
  • Incremental generation: Trace processing of input context and incremental generation of output tokens.
  • Context and application memory: Context limits and the distinction from persistent application memory.
  • KV caching: KV caching, memory growth, and provider prompt-caching differences.

Practical outcome: Explain a generation trace and distinguish weights, context, and cached computation.

Module 3: Experiments and model capabilities (2 hours)

  • Sampling controls: Temperature and top-p where the selected environment supports them.
  • Controlled comparisons: Compare repeated generations and changed inputs while recording the experimental settings.
  • Context changes: Compare context inclusion and truncation with observed changes in generated answers.
  • Reasoning-style models: Explain reasoning-style models and the role of additional inference-time computation.
  • Multimodal evidence limits: Explain multimodal input representations and perception limits using the available evidence.

Practical outcome: Conduct a controlled sampling comparison and explain the limits of its results.

Practical exercise

  • Inspect actual tokenizer results, complete a small numerical attention example, and annotate the path from input text to the next-token distribution. Run repeated generations while changing one supported sampling control. Change the supplied context and compare results. Explain the observations and distinguish KV caching from persistent memory and provider billing categories.

What you will produce

Trace a decoder-style language model from tokens to generation and conduct a controlled sampling and context comparison.

How the work is checked

  • The mechanism trace connects the model stages, not only their names.
  • The attention calculation produces the expected weighted combination.
  • Sampling comparisons record actual settings and observed outputs.
  • Context changes are not described as weight updates or guaranteed recall.
  • Reasoning-style output is not treated as proof or access to hidden reasoning.
  • Multimodal explanations distinguish a teaching illustration from a verified architecture claim.

Six guided hours include demonstrations, practice, feedback, and questions. Breaks and pre-course setup are outside the total. This is a mechanism-focused introduction, not transformer implementation, model training, or serving-capacity engineering. Examples use a decoder-style model and mark architecture differences explicitly. The numerical attention example is small. Reasoning and multimodal extensions are explanatory, not separate engineering labs. A tested generation environment with the selected controls and verified pacing is required before delivery; recorded outputs do not replace conducting the experiment.

When another approach is better

  • Use an applied interaction course when the goal is prompt and task practice rather than model mechanisms.
  • Use implementation or infrastructure training for transformer development or production serving.

How we train

Contact us for full course details, including duration, delivery options and lab requirements.

Ask about exercises, instructor feedback and the prior knowledge you need. Tool-specific courses marked provisional may become modules in a broader course.

Discuss your learning goals