Large language model (LLM): Difference between revisions
No edit summary |
Dedup: power law and data-constrained model now live on language model loss and Chinchilla prescription; drop the 2 duplicated sections, keep scaling summaries as links — AI-assisted (RonzzWikiCowriter) (via update-page on MediaWiki MCP Server) |
||
| Line 2: | Line 2: | ||
[[Category:Natural language processing]] | [[Category:Natural language processing]] | ||
A '''large language model''' ('''LLM''') is an [[artificial intelligence]] system built as a [[neural network]] with a very large parameter count, typically based on the [[Transformer]] architecture, trained by [[machine learning]] on broad text corpora to generate text in response to prompts.<ref>{{#cite:Q3130}}</ref> | A '''large language model''' ('''LLM''') is an [[artificial intelligence]] system built as a [[neural network]] with a very large parameter count, typically based on the [[Transformer]] architecture, trained by [[machine learning]] on broad text corpora to generate text in response to prompts.<ref>{{#cite:Q3130}}</ref> | ||
== Architecture == | == Architecture == | ||
At the time of writing (2026-08), the most widely adopted LLMs are [[Transformer]] models, specifically [[autoregressive decoder-only Transformer]]s.<ref>{{#cite:Q3130}}</ref> | At the time of writing (2026-08), the most widely adopted LLMs are [[Transformer]] models, specifically [[autoregressive decoder-only Transformer]]s.<ref>{{#cite:Q3130}}</ref> | ||
== Scaling laws == | == Scaling laws == | ||
| Line 15: | Line 15: | ||
* training-data volume | * training-data volume | ||
* computational budget | * computational budget | ||
These regularities are the '''scaling laws'''.<ref>{{#cite:Q3141}}</ref> The [[language model loss]] falls as a power law in compute $C$ with an exponent near $0.05$, so diminishing returns are intrinsic. The [[Chinchilla prescription]] sets the compute-optimal balance between parameters and data at roughly 20 tokens per parameter,<ref>{{#cite:Q3164}}</ref> and the finite supply of high-quality public text places a practical ceiling on data scaling, with estimates suggesting a “data wall” may arrive by the late 2020s.<ref>{{#cite:Q3181}}</ref> | |||
$ | |||
so diminishing returns are intrinsic | |||
== Inference == | == Inference == | ||
Revision as of 13:32, 11 November 2026
A large language model (LLM) is an artificial intelligence system built as a neural network with a very large parameter count, typically based on the Transformer architecture, trained by machine learning on broad text corpora to generate text in response to prompts.[1]
Architecture
At the time of writing (2026-08), the most widely adopted LLMs are Transformer models, specifically autoregressive decoder-only Transformers.[1]
Scaling laws
The performance of LLMs improves predictably with
- model size
- training-data volume
- computational budget
These regularities are the scaling laws.[2] The language model loss falls as a power law in compute $C$ with an exponent near $0.05$, so diminishing returns are intrinsic. The Chinchilla prescription sets the compute-optimal balance between parameters and data at roughly 20 tokens per parameter,[3] and the finite supply of high-quality public text places a practical ceiling on data scaling, with estimates suggesting a “data wall” may arrive by the late 2020s.[4]
Inference
At inference time, an LLM generates text by repeatedly sampling or selecting a token according to the conditional distribution $P(x_t \mid x_{1:t-1}; \theta)$ and appending it to the context. Decoding strategies such as greedy search, beam search, temperature sampling, and top-$p$ (nucleus) sampling trade off diversity against coherence.[5] The computational cost of self-attention grows quadratically with context length, motivating techniques such as KV caching and efficient attention variants.[1]
For a context of length $T$, causal self-attention computes a $T\times T$ score matrix, so its time and memory costs scale as
$$ \mathcal{O}(T^2d) \quad\text{and}\quad \mathcal{O}(T^2), $$
respectively, where $d$ is the hidden dimension. KV caching removes redundant recomputation of past keys and values during autoregressive decoding, reducing the per-token attention cost from $\mathcal{O}(T^2d)$ to $\mathcal{O}(Td)$, at the expense of storing $2Td$ cached scalars per layer.[6]
At each decoding step, a token is sampled from
$$ x_t \sim P(x_t\mid x_{1:t-1}; \theta). $$
Temperature sampling replaces $P$ by
$$ P_\tau(x_t\mid x_{1:t-1}) = \frac{\exp(z_{x_t}/\tau)} {\sum_{v\in\mathcal{V}}\exp(z_v/\tau)}, $$
where $z_v$ is the logit assigned to vocabulary entry $v\in\mathcal{V}$, and $\tau>0$ is the temperature. Top-$p$ (nucleus) sampling restricts the support to the smallest set $\mathcal{S}_p$ such that
$$ \sum_{x\in\mathcal{S}_p} P(x\mid x_{1:t-1}) \ge p. $$
- ↑ ↑ ↑ Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., & Polosukhin, I. (2017). Attention Is All You Need. 5998–6008. https://doi.org/10.48550/arXiv.1706.03762
- ↑ Kaplan, J., McCandlish, S., Henighan, T., Brown, T. B., Chess, B., Child, R., Gray, S., Radford, A., Wu, J., & Amodei, D. (2020). Scaling Laws for Neural Language Models. https://arxiv.org/abs/2001.08361
- ↑ Hoffmann, J., Borgeaud, S., Mensch, A., Buchatskaya, E., Cai, T., Rutherford, E., de Las Casas, D., Hendricks, L. A., Welbl, J., Clark, A., Hennigan, T., Noland, E., Millican, K., van den Driessche, G., Damoc, B., Guy, A., Osindero, S., Simonyan, K., Elsen, E., … Sifre, L. (2022). Training Compute-Optimal Large Language Models. https://doi.org/10.48550/arXiv.2203.15556
- ↑ Villalobos, P., Ho, A., Sevilla, J., Besiroglu, T., Heim, L., & Hobbhahn, M. (2024). Will we run out of data? Limits of LLM scaling based on human-generated data. https://doi.org/10.48550/arXiv.2211.04325
- ↑ Holtzman, A., Buys, J., Du, L., Forbes, M., & Choi, Y. (2020). The Curious Case of Neural Text Degeneration. https://doi.org/10.48550/arXiv.1904.09751
- ↑ Pope, R., Douglas, S., Chowdhery, A., Devlin, J., Bradbury, J., Levskaya, A., Heek, J., Xiao, K., Agrawal, S., & Dean, J. (2023). Efficiently Scaling Transformer Inference. https://doi.org/10.48550/arXiv.2211.05102