How LLMs Work
Tokens, next-token prediction, training, the context window and temperature.
5 notes · 25 min total
- 1TokensWhat tokens are, why models count everything in them, and why that explains quirks like miscounting letters in a word.5 min
- 2Next-Token PredictionHow an LLM writes text one token at a time, why that makes it fluent but sometimes wrong, and how engineers work around it.4 min
- 3TrainingHow a model goes from raw text predictor to helpful assistant in three stages, and why its weights are then frozen at a cutoff.7 min
- 4Context WindowHow much a model can read in one request, what happens when a chat outgrows it, and why a bigger window is not always better.5 min
- 5TemperatureHow the temperature setting reshapes next-token probabilities, when to go low or high, and why it does not fix hallucinations.4 min