Asked about Where capability comes from

How does a language model learn?

An answer that works

By predicting the next token across an enormous corpus. General capability is a side effect: predicting well requires modelling whatever produced the text, so reasoning, world knowledge and style all emerge from that one objective.

Reading an answer is not being able to give one. The section that teaches this is Where capability comes from, 5 hours of Pretraining.

Learn this properly