Paper · 2024-02-09 · cs.CL, cs.AI
Large Language Models: A Survey
Survey of large language models: the GPT, LLaMA and PaLM families, how LLMs are built (data cleaning, tokenisation, positional encodings, pre-training, alignment, decoding), how they are used and augmented (prompting, retrieval, tools, agents), datasets, metrics, and benchmark tables compiled from reported third-party numbers. Proposes no new method; no training runs of its own.
Language model pretrainingDecoding strategiesRetrieval-augmented generationLLM agentsurveylarge-language-modelspretrainingdecodingbenchmarks
AI-compiled by claude-haiku-5-5 on 2026-10-19, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.
In plain words
Large language models are text generators trained on huge amounts of text. They got good at following instructions, answering questions and writing code, and this survey is a map of that field as it stood when it was written. It explains where the main model families came from, the building blocks behind them, and how people use them in practice, for example by writing better prompts, looking up documents first, or letting the model call tools.
The survey also collects test datasets, the scores people use to judge a model, and tables that compare popular models on common benchmarks. It proposes no new method. Its tables are gathered from other people's reported results, so they are a starting point for comparison rather than a verified ranking.
TL;DR
A broad, dated survey of LLMs covering model families, how they are built and augmented, datasets, metrics and compiled benchmark tables. It contains no new method and no experiments of its own. Use it for orientation and vocabulary, and go to the primary papers before implementing anything. Its benchmark numbers are third-party reported and cannot be compared across rows.
Problem
The survey addresses a field that moves quickly, where practitioners struggle to pick the right recipe for an LLM-based system §1. It gives a timely overview of recent advances for students, researchers and developers §1. It does not state a single technical failure mode that it fixes.
Method
The paper is a survey, so its "method" is its scope and organisation. It has no algorithm of its own and no training or evaluation run of its own.
- Scope. The survey treats LLMs as transformer-based neural language models with tens to hundreds of billions of parameters, pre-trained on massive text data, which show emergent abilities such as in-context learning, instruction following and multi-step reasoning §1. Smaller models appear in its size categories tab. 3 and in its outlook §7.
- Model families. It places early pre-trained models (for example BERT) in §2.1 and then reviews the GPT, LLaMA and PaLM families in §2.2. Other representative models are in §2.3. tab. 1 lists architecture, release year, base model, openness, token count and training data for each model.
- How LLMs are built. It covers the dominant architectures (encoder-only, decoder-only, encoder-decoder, all built on the Transformer) §3.1, data filtering and deduplication §3.2, subword tokenisers (byte-pair encoding, WordPiece, SentencePiece) §3.3, positional encodings (absolute, rotary, relative bias) §3.4, attention variants §3.5, pre-training objectives §3.6 eq. 1 eq. 2, fine-tuning and instruction tuning §3.7, alignment §3.8, decoding strategies §3.9 eq. 3, and cost-effective training, inference, adaptation and compression §3.10.
- How LLMs are used and augmented. It covers limitations §4.1, prompt design §4.2, retrieval-augmented generation §4.3, external tools §4.4 and LLM agents §4.5.
- Datasets and metrics. It groups datasets into basic tasks, emergent abilities and augmented settings §5.1–§5.3. It defines pass@k eq. 4 and exact match eq. 5 and discusses human-equivalence scores and generative evaluation §6.1.
- Compiled results. It compares models on commonsense, symbolic, world knowledge, coding, arithmetic and hallucination benchmarks §6.2 tab. 5–tab. 10. The Results section below gives the headline entries.
- Outlook. It lists smaller models, post-attention architectures (state space models), multi-modal models, augmentation and agents, and security and responsible AI as open directions §7. The conclusion summarises the survey §8.
Key equations, as written in the survey (next-token objectives, the temperature softmax, and the two metrics):
\mathcal{L}_{ALM}(x) = \sum_{i=1}^{N} p(x_{i+n} \mid x_i, \dots, x_{i+n-1}) eq. 1
\mathcal{L}_{MLM}(x) = \sum_{i=1}^{N} p(\tilde{x} \mid x \setminus \tilde{x}) eq. 2
\mathrm{softmax}(x_i) = \frac{e^{x_i/T}}{\sum_j e^{x_j/T}} eq. 3
\text{pass@}k = \mathbb{E}_{\text{Problems}}\left[1 - \frac{\binom{n-c}{k}}{\binom{n}{k}}\right] eq. 4
\mathrm{EM} = \frac{M}{N} eq. 5
Sampling-based decoding as the survey describes it §3.9 eq. 3. The paper gives no algorithm box, so this is a paraphrase of its prose. The nucleus step and the renormalisation are the usual implementation, not text the paper states.
# Temperature-scaled top-p (nucleus) sampling [§3.9] [eq. 3]
# Input: logits (V,) over the vocabulary; T in (0, 1]; p in (0, 1]
# Output: one token id
def sample_next_token(logits, T, p):
# Divide logits by the temperature, then apply softmax [eq. 3]
probs = softmax(logits / T) # (V,)
# Sort tokens by probability, most likely first [§3.9]
order = argsort(probs, descending=True)
# Keep the smallest prefix whose mass reaches p [§3.9]
cumulative = cumsum(probs[order])
cutoff = first_index(cumulative >= p)
nucleus = order[: cutoff + 1]
# Renormalise over the nucleus (implementation choice, not stated)
nucleus_probs = probs[nucleus] / sum(probs[nucleus])
# Draw one token from the nucleus [§3.9]
return sample(nucleus, nucleus_probs)Hyperparameters
The survey trains nothing, so there are no training hyperparameters. The values below are the ones the text states or uses in its worked examples.
| Name | Value | Where | Notes |
|---|---|---|---|
| temperature T | range 0 to 1 stated | §3.9 eq. 3 | Logits are divided by T before softmax. No default given. |
| top-k example | k = 2 | §3.9 | Worked example only: six tokens with probabilities 30%, 20% and four at 12.5%. |
| top-p cutoff p | not stated | §3.9 | No value given. |
| beam search example | N = 2 beams, max length 5 | §3.9 | Worked example only. See Pitfalls. |
| autoregressive context length n | not stated | §3.6 eq. 1 | Appears in eq. 1 with no value. |
| pass@k | n samples, c correct, k | eq. 4 | Definition only, no values. |
| pre-training, fine-tuning, alignment settings | not stated | §3.6–§3.8 | The survey reports none of its own. |
Results
Not author-reported: the survey compiles these numbers from other papers and leaderboards and runs no experiments of its own. The TeX comments label the tables as "From papers with code" or "From bigbench" tab. 5 tab. 7. Setups (prompting, shots, decoding, hardware) are mostly not stated, and the metric behind each column is not named in the tables.
Highest and runner-up entries per benchmark, as listed in the survey:
| Setting | Score | Highest listed | Runner-up listed | Source |
|---|---|---|---|---|
| HellaSwag | as listed | GPT-4 95.3 | Falcon 180B 88.86 | tab. 5 |
| OpenBookQA (OBQA) | as listed | Davinci-003 51 | Falcon 7B 44.4 | tab. 5 |
| ARC (under world knowledge) | as listed | GPT-4 96.4 | PaLM 2-L 95.1 | tab. 7 |
| HumanEval | as listed | Gemini Ultra 74.4 | Gemini Pro 67.7 | tab. 8 |
| GSM8K | as listed | Gemini Ultra 94.4 | GPT-4 87.1 | tab. 9 |
| MATH | as listed | Gemini Ultra 53.2 | GPT-4 42.5 | tab. 9 |
| HHEM (hallucination) | as listed | GPT-4 97 | GPT 4 Turbo 97 | tab. 10 |
| HaluEval QA | as listed | Claude 2 69.78 | GPT 3.5 Turbo 62.59 | tab. 10 |
The survey's text says GPT-4 is best on HellaSwag and that Davinci-003 is best on OBQA, but adds that OBQA results are not reported for every model, so Davinci-003 may not be the true best §6.2 tab. 5.
Paper vs code
No official code. The paper has no code release of its own. The links in its source point to datasets, benchmark pages and leaderboards, not to an implementation of this survey. I did not run a GitHub search, because a survey has no method to reproduce.
The paper's own text and tables disagree in places. See Pitfalls.
Pitfalls
- Benchmark tables are not a ranking. Rows come from different papers with different prompts, shot counts and decoding settings. Compare numbers only within one row, and check the source paper before using any value.
- Duplicate and conflicting rows. tab. 5 lists Pythia 12B twice with different scores (43.2 and 38 on OBQA). tab. 7 lists OPT-175B twice with different ARC scores (43.94 and 25.6), and SparseGPT three times with no variant named. tab. 5 lists LLaMA 7B and LLama 7B, and Alpaca and Alpaca 7B, with identical values.
- Table numbers. The text refers to the model overview as "Table III", but in the TeX source it is the first table in the body, so it would print as Table I. The numbers used on this card are counted from the TeX order and should be checked against the compiled PDF.
- Parameter counts without a source. tab. 4 gives sizes for GPT-3.5 Turbo (20B), Claude (93B) and Claude 2 (137B) with no citation. Those values are not verified here and drive the size classes. Treat them as the survey's estimates, not as published figures.
- Openness categories disagree. The text calls models without public weights "Private", while tab. 3 calls them "Publicly unavailable". The availability row of tab. 3 reads "available due to request to without request", which is garbled. The text also says "Public" covers weights available on request, which the table does not make clear.
- Autoregressive loss. eq. 1 is named a log-likelihood, but the formula is a sum of probabilities, not log-probabilities. The context length n is a free symbol with no stated value.
- Duplicate equation label. Both eq. 1 and eq. 2 use the label
eq:lmin the source. This only matters if you cross-reference them by label. - Temperature range. The text says T lies between 0 and 1, but the formula works for any T above 0, and T equal to 0 is undefined. The text gives no default T.
- Beam search cost. The text says a beam of size 2 over length 5 "needs to keep track of 2^5 = 32 possible sequences". That counts every binary sequence, not what beam search keeps. Beam search keeps N partial sequences per step, so the example describes exhaustive search and overstates beam search's cost.
- Top-p boundary. The text says the nucleus is the tokens needed for the sum to "exceed" p. Implementations differ on whether equality is included (the pseudocode above uses reaching p). Check the library you use.
- Hallucination scores. tab. 10 mixes HHEM scores with HaluEval accuracy, and several cells are blank. The text notes that measuring hallucination is hard and that LLM-as-judge scoring is error-prone §6.2.
- Category labels. ARC sits under world knowledge in tab. 7, while HellaSwag sits under commonsense in tab. 5. Categories follow the table caption, not a fixed definition.
- Claims without data. Some claims in §7 rest on rumour, for example that GPT-4 is based on a mixture-of-experts architecture. Do not build on them.
Lineage
- Builds on: the scaling-law papers cited in the abstract, and earlier surveys cited in the introduction §1. The paper does not name specific arXiv ids in its text.
- Compared against: the benchmark tables in §6 compare the models named in the Results table above, not a method from another paper.
- Superseded by: not known from content already in this wiki.
Source and license
Adapted from “Large Language Models: A Survey” by Shervin Minaee, Tomas Mikolov, Narjes Nikzad, Meysam Chenaghlu, Richard Socher, Xavier Amatriain, Jianfeng Gao (arXiv:2402.06196), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors.