Large language model (LLM): Difference between revisions
Remove the blank line after the category links, which rendered an empty br paragraph at the top (via update-page on MediaWiki MCP Server) |
|||
| (9 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
[[Category:Large language | [[Category:Large language model]] | ||
[[Category:Natural language processing]] | [[Category:Natural language processing]] | ||
A '''large language model''' ('''LLM''') is | A '''large language model''' ('''LLM''') is an [[artificial neural network (ANN)]] with a very large parameter count, trained by [[machine learning]] on broad text corpora to model the distribution of token sequences, so that it can generate text in response to a prompt. | ||
== Architecture == | == Architecture == | ||
The dominant architecture at the time of writing (2026-11) is the [[autoregressive decoder-only Transformer]].<ref>{{#cite:Q3130}}</ref> | |||
== Scaling laws == | == Scaling laws == | ||
| Line 19: | Line 19: | ||
== Inference == | == Inference == | ||
With [[tokenisation (machine learning)#Definition|token vocabulary]] $\mathcal{V}$, given input $x$, '''inference''' produces output [[token (machine learning)|token]] sequence $y=(y_1,\cdots,y_T) \in \mathcal{V}^T$ chosen probabilistically: | |||
$$ | $$ | ||
| Line 25: | Line 25: | ||
$$ | $$ | ||
{{Hidden example}} | |||
With prompt $x=$ `"The capital of France is"`, 3 independent inferences with a typical, well-trained LLM may give: | |||
$$ | $$ | ||
y^ | y^{(1)}=\texttt{"Paris."},\qquad | ||
y^{(2)}=\texttt{"Paris, a city on the Seine."},\qquad | |||
y^{(3)}=\texttt{"Lyon, argued some."} | |||
$$ | $$ | ||
{{End hidden}} | |||
=== Computational limitation === | |||
The globally most probable output sequence | |||
$$ | $$ | ||
y^\star=\arg\max_{y\in\mathcal{V}^T}P_\theta(y\mid x) | |||
$$ | $$ | ||
which | is calculated by a maximiser [[function]] over a space of size $|\mathcal{V}|^T \to \infty$, which cannot be enumerated for long sequences (large $T$). The output sequence must be generated sequentially in smaller steps (e.g., 1 to a few tokens). | ||
=== Typical implementation: sequential next token prediction === | |||
[[File:Sequential next-token prediction.png|thumbnail|'''Sequential next token prediction''' starting with prompt <code>the</code> with ChatGPT3.]] | |||
$$ | $$ | ||
\ | \vec{z}_t=f_\theta\left(x,y_{1:t-1}\right)\in\mathbb{R}^{|\mathcal{V}|},\\ | ||
y_t\sim\operatorname{Categorical}\left(\mathrm{softmax}\left(\vec{z}_t\right)\right). | |||
$$ | $$ | ||
where $f_\theta$ is the model [[forward pass]] with [[model parameters]] $\theta$, and $\operatorname{Categorical(\cdot)}$ denotes the [[categorical distribution]] given probability vector $\cdot$. | |||
<blockquote> | |||
In '''sequential next token prediction''', the LLM first determines $y_1$ based on $x$, then determines $y_2$ based on $x,y_1$, $y_3$ based on $x,y_1,y_2$, so on so forth. | |||
</blockquote> | |||
== Application == | |||
=== Thinking partner === | |||
For example, [[Person:Yoochul Kim]] employed various LLMs as his thinking partner for his philosophical thought experiments [[OntoMotoOS]].<ref>{{#cite:Q3426}}</ref> | |||
Latest revision as of 14:38, 17 November 2026
A large language model (LLM) is an artificial neural network (ANN) with a very large parameter count, trained by machine learning on broad text corpora to model the distribution of token sequences, so that it can generate text in response to a prompt.
Architecture
The dominant architecture at the time of writing (2026-11) is the autoregressive decoder-only Transformer.[1]
Scaling laws
The performance of LLMs improves predictably with
- model size
- training-data volume
- computational budget
Language model loss and Chinchilla prescription describe the correlation.[2][3]
Inference
With token vocabulary $\mathcal{V}$, given input $x$, inference produces output token sequence $y=(y_1,\cdots,y_T) \in \mathcal{V}^T$ chosen probabilistically:
$$ y\sim P_\theta(\cdot\mid x). $$
Computational limitation
The globally most probable output sequence $$ y^\star=\arg\max_{y\in\mathcal{V}^T}P_\theta(y\mid x) $$
is calculated by a maximiser function over a space of size $|\mathcal{V}|^T \to \infty$, which cannot be enumerated for long sequences (large $T$). The output sequence must be generated sequentially in smaller steps (e.g., 1 to a few tokens).
Typical implementation: sequential next token prediction

the with ChatGPT3.$$\begin{gathered} \vec{z}_t=f_\theta\left(x,y_{1:t-1}\right)\in\mathbb{R}^{|\mathcal{V}|},\\ y_t\sim\operatorname{Categorical}\left(\mathrm{softmax}\left(\vec{z}_t\right)\right). \end{gathered}$$
where $f_\theta$ is the model forward pass with model parameters $\theta$, and $\operatorname{Categorical(\cdot)}$ denotes the categorical distribution given probability vector $\cdot$.
In sequential next token prediction, the LLM first determines $y_1$ based on $x$, then determines $y_2$ based on $x,y_1$, $y_3$ based on $x,y_1,y_2$, so on so forth.
Application
Thinking partner
For example, Yoochul Kim employed various LLMs as his thinking partner for his philosophical thought experiments OntoMotoOS.[4]
- ↑ 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
- ↑ Kim, Y. (2025). OntoMotoOS: A Six-Month Philosophical Odyssey and Its Recursive Closure.