CourseLarge Language Models: The Complete Course · Module 3: Inference and Decoding · part 23 of 103
Part 23 · Module 3: Inference and Decoding

Lesson 2: How the model picks each word, and the dials

19 min read·13 Oct 2026
Module 3 · Lesson 2 · About 50 minutes · Needs: Module 1, Lesson 1 (next-token prediction and greedy decoding)

The situation

It is week 3 at Quillpath. Lena presses "draft again" on T-1001, Ana Duarte's duplicate charge, and the reply opens differently each time. Maya asks two questions. Can the triage label also change between runs, even at temperature 0? And which settings should each task use? To answer, you will watch a small local model, SmolLM2-135M-Instruct, choose each word with every number visible, then carry that to the hosted models.

SAME TICKET, THREE RUNS T-1001 charged twice SmolLM2 samples a reply "Dear ..." "Hi, ..." "To ..."
Blue is your system and amber the model. The same ticket gives three different openings, because each word of a reply is drawn from probabilities, not looked up.

The rest of this course is yours to keep

This course is bought on its own, once, and stays readable afterwards, including the parts added to it later.