# Large Language Models: A Survey

Large language model work is surveyed across families, methods, datasets and metrics

Shervin Minaee, Tomas Mikolov, Narjes Nikzad, Meysam Chenaghlu, Richard Socher, Xavier Amatriain and 1 more · arXiv · 2024-2-9

- **Problem** Findings arrive within weeks, so teams struggle to pick a build recipe for their own tasks.
- **Method** The authors trace LLMs through four waves, from n-gram models to Transformers, then sort techniques by where they apply.
- **Results** On MATH, Galactica scored 20.4%, compared to 8.8% for PaLM 540B.

## Why choosing an LLM recipe is hard

LLMs are the latest step in a long chain of language-modeling changes. The chain begins with n-gram models, which estimate a word's probability from the words just before it and need smoothing for unseen sequences. Neural language models later mapped words to embedding vectors, so that semantic similarity became a distance between vectors.

The authors group these changes into four waves, each with its own starting point and pace.

The difficulty is speed: findings and model releases arrive within weeks or months. Teams building LLM-powered systems therefore struggle to find the right recipe for their own tasks. The authors aim the survey at students, researchers and developers, and it covers architectures, training steps, augmentation and evaluation.

## How Transformer LLMs gain general ability

The key change is self-attention, which lets every word weigh how much it influences each other word, all in parallel. Recurrent networks can't spread their computation across a sequence as widely, so Transformers train far more in parallel. That parallelism made very large pre-training runs on large text collections practical on GPUs.

Pre-training runs on unlabeled Web-scale text with a general objective such as word prediction. Fine-tuning then adapts the pre-trained model to one task using a small labeled set. LLMs push this recipe to tens to hundreds of billions of parameters, as in PaLM, LLaMA and GPT-4. Beyond size, the authors point to emergent abilities such as in-context learning, instruction following and multi-step reasoning, which smaller models lack.

Early Transformer models split into encoder-only, decoder-only and encoder-decoder families. BERT, an encoder-only model, pairs an embedding module with a stack of Transformer encoders and a fully connected output layer. It is pre-trained with masked language modeling and next sentence prediction, and then fine-tuned with a classifier layer.

RoBERTa keeps this family but changes training choices, such as dropping the next-sentence objective and using larger batches and learning rates.

## Adapting models cheaply with LoRA

The key idea of LoRA is to freeze the pre-trained weight matrix and learn a low-rank update beside it. The method rests on an observation from prior work: the gap between fine-tuned and pre-trained weights often has low intrinsic rank, so a low-rank matrix can approximate it well. Because only the small update is trained, the technique is much faster and more memory-efficient, and the resulting weights come out at a few hundred MBs.

The rank \\(r\\) is much smaller than \\(\\min(d, k)\\), so \\(B\\) and \\(A\\) hold far fewer parameters than the full matrix.

\\(A\\) starts from random Gaussian values and \\(B\\) starts from zero, so \\(\\Delta W = BA\\) is zero when training begins. The update is then scaled by a factor built from a constant \\(\\alpha\\) and the rank \\(r\\), as the paper writes it. In a Transformer, LoRA usually targets the attention matrices \\(W\_q\\), \\(W\_k\\), \\(W\_v\\) and \\(W\_o\\) and leaves the MLP modules frozen.

Cost can also be cut by shrinking the model, and knowledge distillation does this by training a smaller student from a larger model. The authors list response, feature and API distillation as three ways to transfer that knowledge. API distillation raises concerns because the teacher is often not openly available and its paid API limits how predictions may be used.

Quantization lowers weight precision to shrink a model and speed it up, and dynamic post-training quantization is slower than static because it computes its range at runtime.

## Prompting for step-by-step reasoning

The main idea of Chain of Thought prompting is to make reasoning steps explicit rather than leaving them implicit. LLMs are strong at predicting tokens but aren't built for explicit reasoning, so the prompt guides them through the steps. The technique was introduced by Google researchers.

Zero-shot CoT asks the model to think step by step, with no worked examples. Manual CoT supplies hand-written step-by-step examples as templates, and the authors report it to be more effective than zero-shot CoT. Its drawback is that results depend on choosing diverse examples, and writing them by hand is error prone and hard to scale. That drawback is the motivation the survey gives for automatic CoT.

Tree of Thought branches into several thought trees, each one a different line of reasoning. Each branch is then assessed for validity and relevance, and the most coherent outcome is selected. The authors note this helps where a single line of reasoning may not suffice. The survey gives no dataset or score for the zero-shot versus manual comparison, so its support is a qualitative description.

## What the reported numbers show

Galactica, trained on a large scientific corpus, scored 41.3% on mathematical MMLU, compared to 35.7% for Chinchilla. On MATH it scored 20.4%, compared to 8.8% for PaLM 540B. The two comparisons use different baselines, so each one checks Galactica against a different reference model. Read together, they show a gain on math tasks against those two baselines, not a general reasoning gain.

Their finding is that, for compute-optimal training, model size and training tokens should grow in equal proportion. They tested this with Chinchilla, a 70B model that uses the same compute as Gopher but is trained on 4% more data. The 4% is extra data relative to the Gopher setup, not a change in model size.

The largest GLaM has 1.2 trillion parameters, about 7x GPT-3, and used 1/3 of the energy needed to train GPT-3. The authors also report that it needs half the inference computation and performs better across 29 NLP tasks in zero, one and few-shot settings. RETRO conditions on retrieved chunks from a 2-trillion-token database and reaches performance comparable to GPT-3 and Jurassic-1 on the Pile with 25% fewer parameters.

Each of these efficiency numbers is attributed to the work that reports it, and the survey gives no shared protocol across them.

## Where LLMs still fail

On their own, LLMs keep no memory, so they can't recall what was sent in an earlier prompt. They are stochastic, so the same prompt can produce different responses, although temperature can narrow the variation. They also hold stale information and can't reach external data, and their size means costly GPU machines and sometimes poor latency.

They split it into intrinsic hallucinations, which contradict the source material, and extrinsic ones, which can't be verified against it. What counts as the reference depends on the task, since dialogue uses world knowledge and summarization uses the input text. Instruct tuning and RLHF push outputs toward facts, but the probabilistic nature of LLMs remains.

This discussion gives no measured failure rates, only the authors' definitions and descriptions. Metric choice matters too: ROUGE and BLEU mainly capture intrinsic cases, while FactScore sums the accuracy of atomic facts with equal weight.

## Paper info

- **Authors**: Shervin Minaee, Tomas Mikolov, Narjes Nikzad, Meysam Chenaghlu, Richard Socher, Xavier Amatriain, Jianfeng Gao
- **Venue**: arXiv · Preprint
- **First published**: 2024-2-9
- **Added**: 2026-11-12
- **Updated**: 2025-3-23
- **Version**: v3
- **arXiv**: 2402.06196
- **Category**: cs.CL · cs.AI
- **Original paper terms**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/2402.06196v3) · [PDF ↗](https://arxiv.org/pdf/2402.06196v3)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Shervin Minaee, Tomas Mikolov, Narjes Nikzad, Meysam Chenaghlu, Richard Socher, Xavier Amatriain, Jianfeng Gao (2024). Large Language Models: A Survey. arXiv:2402.06196v3. https://arxiv.org/abs/2402.06196v3

**BibTeX**

```
@misc{minaee2024large,
  title = {{Large Language Models: A Survey}},
  author = {Shervin Minaee and Tomas Mikolov and Narjes Nikzad and Meysam Chenaghlu and Richard Socher and Xavier Amatriain and Jianfeng Gao},
  year = {2024},
  eprint = {2402.06196},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.06196v3}
}
```

## Other paper commentary

- [What Does BERT Look At? An Analysis of BERT's Attention](https://refivu.com/en/papers/8f682775-2bc4-4c36-a7e8-6afc56d2aeae-what-does-bert-look-at-an-analysis-of.md)
- [AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts](https://refivu.com/en/papers/e3fa3b73-5b1d-4ff0-8f81-98fad2340fa5-autoprompt-eliciting-knowledge-from-language-models-with.md)
- [DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligence](https://refivu.com/en/papers/a9b5666a-9125-4553-968a-b6f76e0d19db-deepseek-coder-when-the-large-language-model-meets.md)
- [OpenAI GPT-5 System Card](https://refivu.com/en/papers/678bc558-0d7f-4ee8-9fa0-55c5eb2daf22-openai-gpt-5-system-card.md)
- [Siren's Song in the AI Ocean: A Survey on Hallucination in Large Language Models](https://refivu.com/en/papers/b7a8b2ba-0d8c-47b1-8619-757da5d13fc9-siren-s-song-in-the-ai-ocean-a.md)
- [Conditional Prompt Learning for Vision-Language Models](https://refivu.com/en/papers/aafdc9ad-313a-44a6-bed9-42556a8097ea-conditional-prompt-learning-for-vision-language-models.md)
- [Mastering Diverse Domains through World Models](https://refivu.com/en/papers/97c93a7e-84fd-435c-8ada-e4d14f8b7ef3-mastering-diverse-domains-through-world-models.md)
- [FAST-LIO2: Fast Direct LiDAR-inertial Odometry](https://refivu.com/en/papers/401ff61a-2475-494b-b01d-b01a805546db-fast-lio2-fast-direct-lidar-inertial-odometry.md)
- [Learning both Weights and Connections for Efficient Neural Networks](https://refivu.com/en/papers/f86825de-2cbc-432f-bed0-b6b664200688-learning-both-weights-and-connections-for-efficient-neural.md)
- [Deep Learning Face Representation by Joint Identification-Verification](https://refivu.com/en/papers/1824448e-2edd-4d03-a6b5-1fbd92b71da3-deep-learning-face-representation-by-joint-identification.md)
- [Google's Multilingual Neural Machine Translation System: Enabling Zero-Shot Translation](https://refivu.com/en/papers/0924ecf7-d413-4972-9e1d-36ae4961169c-google-s-multilingual-neural-machine-translation-system.md)
- [Understanding Neural Networks Through Deep Visualization](https://refivu.com/en/papers/a476f0b3-a482-45fe-9135-826b92cf7a73-understanding-neural-networks-through-deep-visualization.md)

## Terms in this paper

- [Transformer](https://refivu.com/en/terms/48e8be2570bc-transformer)
- [self-attention](https://refivu.com/en/terms/426589b81077-self-attention)
- [BLEU](https://refivu.com/en/terms/42cd9b97719e-bleu)
- [BERT](https://refivu.com/en/terms/45b639a1d317-bert)
- [GSM8K](https://refivu.com/en/terms/e48f0e01064d-gsm8k)
- [MMLU](https://refivu.com/en/terms/3036c0ba5adb-mmlu)
- [GPT-4](https://refivu.com/en/terms/1e2d0d2cdc44-gpt-4)
- [knowledge distillation](https://refivu.com/en/terms/b8544f4ba83e-knowledge-distillation)
- [Large Language Models](https://refivu.com/en/terms/f2404476b183-large-language-models)
- [HumanEval](https://refivu.com/en/terms/3c3dbcadfdda-humaneval)
- [ROBERTA](https://refivu.com/en/terms/f42b278690e5-roberta)
- [masked language modeling](https://refivu.com/en/terms/5df1a60d4f18-masked-language-modeling)
- [pass@k](https://refivu.com/en/terms/c162514bd507-pass-k)
- [MBPP](https://refivu.com/en/terms/717e657dd0b2-mbpp)
- [Nucleus Sampling](https://refivu.com/en/terms/60caf2ab5e48-nucleus-sampling)
- [ROUGE](https://refivu.com/en/terms/b50ceb784ddd-rouge)
- [Code generation](https://refivu.com/en/terms/8b457c4f8807-code-generation)
- [hallucination](https://refivu.com/en/terms/8cd41568c9a2-hallucination)
- [MATH](https://refivu.com/en/terms/42d0fca44930-math)
- [LLaMA](https://refivu.com/en/terms/1a23d312f4db-llama)
- [transformer architecture](https://refivu.com/en/terms/30726b29c2c5-transformer-architecture)
- [OPT](https://refivu.com/en/terms/a143812dd93a-opt)
- [PaLM](https://refivu.com/en/terms/366d69ef11ed-palm)
- [ALBERT](https://refivu.com/en/terms/9dc5220f7985-albert)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/d8a3f692-1bfe-4a26-b530-c20397434b3c-large-language-models-a-survey)
