Notes

LLM

A large language model does one thing: given a stretch of text, it predicts what comes next. Everything else — answering a question, translating a menu, writing code, summarising a contract — falls out of doing that one thing extremely well, at a scale that changes its character.

What the "large" is doing

The recipe is a decoder-only transformer with billions of parameters, trained by next-token prediction over trillions of tokens of web text, books and code. Nothing in that objective asks for translation or arithmetic; those appear because predicting text well requires modelling what the text is about. Past a certain scale the model also begins following instructions given in the prompt alone — in-context learning — which is what lets one frozen set of weights serve thousands of unrelated tasks.

How one becomes usable

Pretraining produces a text continuer, not an assistant. A second stage — instruction tuning on demonstrations, then preference optimisation — teaches it to answer rather than continue, to refuse, and to hold a format. The model you talk to is the product of both stages.

What scale costs

Training one is a capital project measured in thousands of accelerators and months of time; serving it is a per-token bill paid mostly in memory bandwidth. The objective also explains the characteristic failure: a plausible continuation is not a true one, so a model states a wrong fact as fluently as a right one. Most of this field — quantization, caching, RAG, evaluation — exists to manage one of those two costs, the money or the truth.

An LLM is a transformer trained by next-token prediction on a web-scale text corpus, with parameter and data counts large enough that general capabilities — following instructions, translating, writing code — emerge from that single objective rather than being trained in separately. One frozen set of weights serves many tasks through the prompt, which is what separates it from a task-specific language model. Its costs are training compute, serving bandwidth, and fluent-but-wrong output.

Think of someone who has read an enormous amount — books, manuals, arguments online — and whose one skill is guessing the next few words of any sentence you start. Do that well enough and you can answer questions, explain ideas, write a letter or translate a menu, because all of those are just text that follows other text. A large language model is that guesser, built from a vast amount of reading. It is why a single program can help with homework, code and recipes alike. It is also why it can be confidently wrong: a sentence that sounds right is not always true.