Source-linked AI summary

A Survey of Large Language Models

Wayne Xin Zhao, Kun Zhou, Junyi Li, Tianyi Tang, Xiaolei Wang, Yupeng Hou, Yingqian Min, Beichen Zhang, Junjie Zhang, Zican Dong, Yifan Du, Chen Yang, Yushuo Chen, Zhipeng Chen, Jinhao Jiang, Ruiyang Ren, Yifan Li, Xinyu Tang, Zikang Liu, Peiyu Liu, Jian-Yun Nie, Ji-Rong Wen

arXiv:2303.18223v19cs.CLcs.AI

TL;DR

Machines still struggle to understand and communicate in human language. This survey synthesizes LLM advances across pre-training, adaptation, utilization, and evaluation, providing a reference for researchers and engineers.

  • Problem

    Enabling machines to understand and communicate in human language remains a longstanding research challenge.

  • Method

    The survey synthesizes LLM techniques and findings across pre-training, adaptation, utilization, and evaluation, while summarizing development resources.

  • Results

    The survey identifies key techniques and findings across four LLM aspects and provides implementation guidance and resources for reproduction.

  • Takeaways & Limitations

    The survey serves as a reference resource on recent LLM literature for researchers and engineers.

  • Takeaways & Limitations

    LLMs may struggle with specialized generation because acquiring domain knowledge can impair performance in other areas.

Abstract

from arXiv · show

Language is essentially a complex, intricate system of human expressions governed by grammatical rules. It poses a significant challenge to develop capable AI algorithms for comprehending and grasping a language. As a major approach, language modeling has been widely studied for language understanding and generation in the past two decades, evolving from statistical language models to neural language models. Recently, pre-trained language models (PLMs) have been proposed by pre-training Transformer models over large-scale corpora, showing strong capabilities in solving various NLP tasks. Since researchers have found that model scaling can lead to performance improvement, they further study the scaling effect by increasing the model size to an even larger size. Interestingly, when the parameter scale exceeds a certain level, these enlarged language models not only achieve a significant performance improvement but also show some special abilities that are not present in small-scale language models. To discriminate the difference in parameter scale, the research community has coined the term large language models (LLM) for the PLMs of significant size. Recently, the research on LLMs has been largely advanced by both academia and industry, and a remarkable progress is the launch of ChatGPT, which has attracted widespread attention from society. The technical evolution of LLMs has been making an important impact on the entire AI community, which would revolutionize the way how we develop and use AI algorithms. In this survey, we review the recent advances of LLMs by introducing the background, key findings, and mainstream techniques. In particular, we focus on four major aspects of LLMs, namely pre-training, adaptation tuning, utilization, and capacity evaluation. Besides, we also summarize the available resources for developing LLMs and discuss the remaining issues for future directions.

1 INTRODUCTION

Language models evolved from statistical and neural approaches to pre-trained and large language models, whose scaling can produce emergent abilities and enable complex task solving. This survey reviews LLMs through pre-training, adaptation, utilization, and capability evaluation while identifying open questions about their underlying principles.

  • Language model evolution: Language modeling advanced from statistical models with fixed n-token contexts to neural models that learned distributed representations for language tasks.Statistical language models used Markov assumptions, while neural language models characterized word-sequence probabilities with neural networks.
  • Language model evolution: Pre-trained language models established a “pre-training and fine-tuning” paradigm using Transformer-based self-attention and large-scale unlabeled corpora.BERT’s context-aware representations substantially raised the performance bar on NLP tasks and inspired extensive follow-up work.
  • Large language models: Scaling PLMs in model or data size improves downstream capacity, while sufficiently large models such as 175B-parameter GPT-3 and 540B-parameter PaLM exhibit emergent abilities.These behaviors differ from those of smaller PLMs such as 330M-parameter BERT and 1.5B-parameter GPT-2.
  • Large language models: LLMs extend language modeling toward complex task solving, with ChatGPT demonstrating strong human dialogue ability and accelerating research attention.The introduction of ChatGPT was followed by a sharp increase in LLM-related arXiv papers.
  • Open issues: Despite their impact, the causes, timing, and mechanisms of LLM emergent abilities and superior capabilities remain insufficiently understood.The survey emphasizes the need for deeper, more principled investigation of the factors behind these abilities.
  • Survey scope: The survey organizes recent LLM advances into pre-training, adaptation, utilization, and capability evaluation, summarizing their findings, techniques, methods, resources, and future issues.These aspects address building capable LLMs, adapting them, applying them to downstream tasks, and evaluating their abilities.

2 OVERVIEW

This section defines LLMs as very large Transformer language models trained on massive text data, then explains scaling laws and traces GPT’s evolution toward ChatGPT, GPT-4, and multimodal systems. It emphasizes that increasing scale and targeted training can substantially expand model capacity and task performance.

  • LLM Background: LLMs are typically Transformer language models with hundreds of billions or more parameters, trained on massive text data and capable of understanding language and solving complex tasks.This survey uses a loose definition focused mainly on models larger than 10B parameters because no formal minimum scale exists.
  • Scaling Laws: Scaling laws characterize how language-model performance varies with model size, dataset size, and training compute.The KM law models power-law relationships across these three factors, while the Chinchilla law targets compute-optimal allocation between model and data size.
  • Scaling Laws: The KM and Chinchilla laws differ in compute allocation: KM favors increasing model size more than data size, whereas Chinchilla favors increasing both at similar scales.The Chinchilla experiments varied model sizes from 70M to 16B and data sizes from 5B to 500B tokens.
  • GPT Evolution: GPT’s progression showed that scaling a largely unchanged generative pre-training architecture can produce major capacity gains, with GPT-3 marking a landmark transition from PLMs to LLMs.GPT-2 increased the parameter scale to 1.5B and pursued task performance through unsupervised language modeling without explicit labeled-data fine-tuning.
  • GPT Evolution: ChatGPT and GPT-4 substantially raised the capacity bar, while GPT-4V and related upgrades expanded GPT models toward vision, multimodal interaction, and broader task performance.ChatGPT combined dialogue data with the InstructGPT dataset and showed strong knowledge, reasoning, multi-turn context tracking, and alignment; GPT-4 improved complex-task performance over GPT-3.5.

3 RESOURCES OF LLMS

The section surveys publicly available resources for developing LLMs, including model checkpoints and APIs, training corpora, and libraries. It emphasizes that these resources help address the technical challenges and substantial computational costs of developing or reproducing LLMs.

  • Resources Overview: Public LLM resources include model checkpoints or APIs, corpora, and libraries for incremental development and experimental study.These resources provide a feasible alternative to developing or reproducing LLMs entirely from scratch.
  • Model Checkpoints and APIs: Public model checkpoints are critical because LLM pre-training is extremely costly, while APIs enable inference without running models locally.The survey discusses checkpoints according to parameter size, training data and computation, technologies, and downstream performance.
  • Representative Checkpoints: LLaMA-3.1 reaches 405B parameters, uses 15T pre-training tokens and a 128K context window, and performs competitively against GPT-4, GPT-4o, and Claude 3.5 Sonnet.Training involved more than 16,000 H100 GPUs for the 405B version, compared with 2,048 A100-80G GPUs for the 65B LLaMA model.
  • LLaMA Model Family: LLaMA’s openness, effectiveness, and availability have made it a widely used base for extensions, including instruction-tuned and multimodal models.Vicuna has been preferred as a base in multimodal systems such as LLaVA, MiniGPT-4, InstructBLIP, and PandaGPT.
  • Training Corpora: Training corpora for LLMs must be larger and broader than those for earlier PLMs, and the survey groups accessible datasets into web pages, books, Wikipedia, code, and other content.CommonCrawl is a petabyte-scale open-source web-crawling database, but its noisy and low-quality information requires filtering.

4 PRE-TRAINING

Pre-training establishes LLM abilities by acquiring language understanding and generation skills from large-scale corpora. Its effectiveness depends on data quality and diversity, curriculum design, model architecture, acceleration, and optimization techniques.

  • Pre-training data: Large-scale pre-training corpora provide essential language understanding and generation skills, while corpus scale and quality critically shape LLM capabilities.Effective pre-training also requires well-designed architectures, acceleration methods, and optimization techniques.
  • Pre-training data: General data such as webpages, books, and conversational text supports language modeling and generalization, while specialized data can target particular abilities.Existing LLMs mainly use mixtures of diverse public textual datasets, and web data requires filtering because it combines high- and low-quality text.
  • Data quality: Low-quality, noisy, toxic, or duplicate pre-training data can substantially harm model performance, making data quality vital to LLM capacity.The survey discusses studies including T5, GLaM, and Gopher that investigate how data quality influences model capabilities.
  • Data mixture: Increasing data-source diversity improves downstream performance, whereas excessive concentration on one domain can degrade generalization to other domains.Data proportions can also affect specific abilities, such as long-term-dependency capture on LAMBADA and validation performance on C4.
  • Data curriculum: Data curriculum can improve skill learning by presenting prerequisite skills before a target skill rather than training directly on a target-focused corpus.This approach follows curriculum learning and is used in model pre-training.
  • Model architecture: Mixture-of-Experts scaling sparsely activates a subset of weights per input, enabling parameter-scale increases while maintaining constant computational cost.The survey identifies Switch Transformer and GLaM as examples and reports substantial performance improvements when increasing either the number of experts or their parameters.

5 POST-TRAINING OF LLMS

Post-training, especially instruction tuning and RLHF, improves LLM capabilities, generalization, domain specialization, helpfulness, and harmlessness. Its effectiveness depends on instruction-data quality, diversity, formatting, and model scale, while RLHF complements supervised fine-tuning after pretraining.

  • Instruction Tuning: Instruction tuning improves or unlocks LLM abilities across model scales and costs less than pretraining because it requires substantially less data.Studies span models from 77M to 540B parameters, with all tested scales benefiting from instruction tuning.
  • Instruction Tuning: Instruction tuning enables models to follow natural-language instructions without demonstrations, including for unseen tasks, while supporting domain specialization.It adapts general LLMs into experts for domains such as medicine, law, and finance.
  • Instruction Data: Mixing instruction sources improves comprehensive abilities, while task-formatted instructions favor QA and may underperform chat-oriented data in chat settings.A mixed LLaMA (7B) variant achieved 43.69 versus 38.58 (FLAN-T5) in MMLU.
  • RLHF: RLHF mitigates harmful responses and enhances model capacity, complementing SFT, which is especially useful immediately after pretraining.However, demonstrations beyond an LLM’s knowledge or ability scope can induce hallucinations and affect factual accuracy.

6 UTILIZATION

LLM utilization primarily relies on prompting, including in-context learning, chain-of-thought reasoning, planning, and graph-structured approaches. Prompt design and model scale strongly affect performance, especially for complex and step-by-step reasoning tasks.

  • Planning and Structured Reasoning: Planning decomposes complex tasks into smaller sub-tasks and solves them sequentially, while graph-structured reasoning represents more intricate relationships with greater flexibility.Graph of Thoughts conceptualizes reasoning as an arbitrary graph but requires a large number of interactions.
  • Prompting: Prompting is the major approach to utilizing LLMs, with task-specific prompts created manually or optimized automatically.In-context learning expresses task descriptions or demonstrations as natural-language text.
  • Prompt Engineering: Carefully designed prompts improve ChatGPT’s zero-shot or few-shot performance, particularly on complex tasks requiring background knowledge or specific output formats.On WikiFact, performance rose from 23.61 to 28.47, while Colored Objects rose from 53.20 to 66.75.
  • Reasoning Applications: For mathematical reasoning, code-formatted few-shot demonstrations can convert the task into code generation and, with an external executor, produce more precise results.CoT prompting is also characterized by reasoning-path components including symbols, patterns, and text.
  • In-Context Learning: In-context learning becomes more significant with larger models, while task recognition appears at 350M parameters and task learning emerges only at least 66B parameters.Continual pre-training or fine-tuning on specially designed tasks can also strengthen in-context learning in smaller PLMs.
  • Chain-of-Thought Prompting: Chain-of-thought prompting helps sufficiently large models, typically 10B or more parameters, on tasks requiring step-by-step reasoning such as arithmetic, commonsense, and symbolic reasoning.It adds intermediate reasoning steps before the final answer and provides a flexible way to elicit LLM reasoning abilities.

7 CAPACITY AND EVALUATION

LLM capacity evaluation spans knowledge, reasoning, interaction, tool use, alignment, and specialized abilities, using both benchmarks and human-based assessment. Results show strong general-purpose and environmental capabilities, but also reveal domain-specific, reasoning, numerical, and evaluator limitations.

  • Limitations: LLMs may underperform on specialized generation, structured-data generation, and numerical computation, and their reasoning can be inconsistent even when using step-by-step strategies.Difficulties include injecting specialized knowledge while preserving original capabilities and handling seldom-seen arithmetic with large numbers.
  • Advanced abilities: LLMs can interact with external environments and generate accurate action plans, while also autonomously creating and manipulating tools for task-specific exploration.Evaluation uses benchmark metrics such as executability and correctness or real-world success rates.
  • Benchmark-based evaluation: BIG-bench contains 204 diverse tasks, and scaled LLMs exceed average human few-shot performance on 65% of its tasks.The benchmark covers linguistics, mathematics, commonsense reasoning, science, social bias, and software development.
  • Benchmark-based evaluation: Instruction tuning consistently improves accuracy, robustness, and fairness, while code-corpus pre-training yields superior reasoning-task performance.These findings come from HELM experimental results.
  • Specialized and human-level evaluation: Specialized LLMs require evaluation of both general abilities and domain-specific capabilities, while API models such as GPT-4, ChatGPT, and Claude outperform publicly available models on human-level tests.Human-level benchmarks include AGIEval, MMCU, M3KE, C-Eval, and Xiezhi.
  • Evaluation approaches: Evaluation combines automatic benchmarks for scalable checkpoint monitoring with human assessment that better reflects real-world abilities but remains vulnerable to annotator disagreement and evaluator bias.LLM evaluator biases include position, verbosity, and self-enhancement effects, and LLMs may be unqualified for difficult mathematical reasoning evaluation.

8 APPLICATIONS

LLMs are applied across core NLP and information retrieval tasks, as well as healthcare, education, law, finance, and scientific research. They offer broad capabilities and competitive few-shot performance, but remain limited by cost, task-specific requirements, domain gaps, and human-level evaluation.

  • NLP: LLMs perform well on classic NLP tasks through in-context learning, but fully fine-tuned small models can outperform them when specialized task knowledge and labeled data are available.This tradeoff is especially noted for semantic matching and sentiment analysis.
  • Information Retrieval: LLMs enhance information retrieval by generating relevance annotations and queries, yet require high inference overhead, long-text limitations, and special adaptation for ranking.Instruction tuning is one example of the required adaptation.
  • Healthcare: LLMs support healthcare tasks including information extraction, medical consultation, mental-health analysis, and report simplification.Applications commonly use task-specific prompts or instructions.
  • Education: LLMs achieve student-level performance on standardized tests and support educational assistance, while ChatGPT users performed better than average students in some computer-security courses.Reported educational scenarios include writing and reading assistance, personalized learning, and assessment.
  • Law and Finance: LLMs address legal and financial tasks, with GPT-4 achieving a top 10% simulated bar-exam score but general-purpose models underperforming million-parameter domain-specific PLMs in finance.Legal applications include document analysis, judgment prediction, and document writing; finance applications include sentiment, entity recognition, and reasoning.
  • Scientific Research and Evaluation: LLMs assist scientific research across literature surveys, hypothesis generation, and data analysis, especially on knowledge-intensive tasks when trained on scientific corpora, but advanced LLMs remain below human-level evaluation.Scientific examples include PubMedQA and BioASQ.

9 ADVANCED TOPICS · 9.1 Long Context Modeling · 9.2 LLM-empowered Agent

This section surveys advanced topics that constrain LLM capacity, focusing on long-context modeling and LLM-empowered agents. It presents approaches for extending context windows, architectures and workflows for agents, applications, and remaining technical challenges.

  • 9 ADVANCED TOPICS: Advanced LLM research addresses challenging technical issues that substantially limit model capacity, including long-context processing and agent development.The section introduces these issues and discusses feasible approaches to address them.
  • 9.1 Long Context Modeling: Long-context modeling is increasingly demanded for real-world text processing, with scaling position embeddings and adapting context windows as two main approaches.Applications include information parsing, extraction, and summarization.
  • 9.1.1 Scaling Position Embeddings: Position-embedding methods extend context by interpolation, truncation, base modification, and basis truncation, while some methods provide extrapolation beyond training length.Base modification enables longer-text modeling by decreasing the basis through a larger base, but may require continual pre-training.
  • 9.1.2 Adapting Context Window: Context-window adaptation uses parallel segmentation, Λ-shaped attention, and token selection to process long sequences without directly integrating all sequence information.Token selection retrieves relevant tokens from token-level or block-level memory, while Λ-shaped attention preserves initial and nearby tokens.
  • 9.1.3 Long Text Data: Small amounts of long-text data can suffice for continual pre-training to extend context windows, while coherent and cohesive data improve long-context modeling.Removing chaotic data and up-sampling cohesive data are reported as beneficial data-quality strategies.
  • 9.2.1 Overall Framework.: LLM-based agents use an LLM as their core computation unit alongside memory, planning, and execution to perceive environments, make decisions, and act toward goals.Their workflow writes environmental information to short-term memory, retrieves long-term information, generates plans, and executes actions through multi-turn interaction.
  • 9.2.2 Applications: LLM-based agents support autonomous single-agent task solvers and collaborative multi-agent systems, including cooperation-based and competition-based coordination.Debate-based communication can foster divergent thinking and external feedback for precise decision-making and accurate responses.
  • 9.2.3 Discussion: Agent development remains constrained by computational costs, human-social alignment, complex capability extension, and robustness and trustworthiness.Challenges include multi-agent communication overhead, role-playing limitations, dependence on tool quality and availability, and resilience against adversarial inputs.

9.3 Analysis and Optimization for Model Training

Training larger LLMs under limited computational resources requires optimizing GPU memory usage and maintaining computational efficiency. The section estimates major memory costs and presents memory-saving and efficiency-optimization techniques.

  • GPU Memory Consumption: Model states typically dominate training memory, with 4P bytes required for 16-bit parameters and gradients for a model containing P parameters.The 4P bytes comprise 2P bytes for parameters and 2P bytes for gradients.
  • GPU Memory Consumption: 16GB of activation memory is required per device for LLaMA-7B with B = 1 and T = 2,048.The example uses V = 32,000, L = 32, H = 4,096, H′ = 11,008, and N = 32.
  • GPU Memory Consumption: Additional GPU memory is consumed by frameworks, distributed training, intermediate results, and fragmentation.PyTorch requires approximately 1GB, distributed frameworks use 1GB–4GB, and the Transformers softmax implementation requires 8BTV bytes for intermediate copies.
  • Memory Optimization: Gradient checkpointing saves memory by retaining only selected activations during the forward pass and recomputing them during backpropagation, at additional computational cost.It addresses the substantial memory required to store all layer activations.
  • Memory Optimization: ZeRO reduces data-parallel memory redundancy, while offload transfers gradients and optimizer states to CPU memory and keeps only model parameters on the GPU.Data parallelism otherwise requires 16P bytes per GPU for replicated model states.
  • Efficiency Optimization: FlashAttention reduces attention memory transfers through matrix partitioning and operator fusion, while sequence parallelism partitions long sequences across devices.Both methods target computational efficiency as model scale and sequence length increase.

9.4 Analysis and Optimization for Model Inference

LLM inference is analyzed through prefill and decoding stages using GPU and model arithmetic-intensity metrics to identify bottlenecks. Because decoding is memory-bound, system-level and algorithmic optimizations target data transfer reduction, larger effective batches, or selective computation.

  • Inference comprises prefill, which computes input states and caches key-value tensors, and decoding, which generates tokens autoregressively while updating the KV cache.
  • Arithmetic intensity compares computation with data transfer: operations below the GPU threshold are memory-bound, whereas those above it are compute-bound.The GPU threshold is Imax, the ratio of compute capability to memory bandwidth; model operations use I analogously.
  • Decoding stage: Decoding linear transformations and multi-head attention have arithmetic intensities below 8 versus the A100’s 142.51 maximum, making decoding memory-bound and subject to the memory wall.
  • Prefill stage: In LLaMA (7B) prefill with batch size 8 and sequence length 1024, linear transformations reach approximately 2730.67 arithmetic intensity, while multi-head attention reaches approximately 114.67.
  • System optimizations reduce data transfer through FlashAttention or Flash-Decoding, PagedAttention’s preallocated memory blocks, and continuous batching or Dynamic SplitFuse for larger effective batches.PagedAttention reduces allocation and copying overhead in KV-cache concatenation; Dynamic SplitFuse overlaps prefill and decoding.
  • Algorithmic methods further improve autoregressive inference through speculative decoding with a smaller model and cascade inference that routes requests across models of different scales.Cascade inference can bypass subsequent models when a binary classifier judges an earlier result reliable.

9.5 Model Compression

This section addresses reducing LLMs’ substantial inference memory footprint for real-world deployment, primarily through quantization and briefly through pruning and distillation. It distinguishes QAT from PTQ and explains why LLM quantization favors PTQ while facing activation outliers.

  • Model Compression: LLM compression targets their substantial inference memory footprint, focusing mainly on quantization and briefly on pruning and distillation.The motivation is the high deployment cost caused by the huge number of model parameters.
  • Model Quantization: Quantization-aware training requires additional full-model retraining, whereas post-training quantization requires no model retraining.These are the two major model quantization approaches identified for LLMs.
  • Model Quantization: LLMs favor PTQ because their huge parameter counts make its computational cost much lower than QAT, but large outlier features complicate activation quantization.Quantization is especially difficult for hidden activations because LLMs exhibit very different activation patterns.

Background for Quantization.

Quantization maps floating-point weights and activations to integers to reduce LLM deployment memory and latency, but activations are harder to quantize because of outliers. Existing methods address quantization error through mixed precision, salient-weight protection, fine-grained or layerwise optimization, and efficient fine-tuning, with INT8 weights generally retaining accuracy more reliably than lower precisions.

  • Background for Quantization.: Quantization maps floating-point weights and activations to integers, with parameters calibrated statically offline or dynamically at runtime.The two primary quantized data types are model weights and hidden activations.
  • Empirical Analysis and Findings.: 6.7B parameters or more can trigger activation outliers that distort distributions and make effective quantization difficult.Methods including mixed-precision decomposition, fine-grained quantization, and difficulty migration reduce the influence of these outliers.
  • Post-Training Quantization (PTQ).: PTQ methods reduce quantization error by separately processing outliers, preserving salient weights, using fine-grained parameters, or minimizing layerwise reconstruction loss.GPTQ makes layerwise optimization feasible for 175B OPT in 3 or 4 bit precision, while AWQ uses activation-aware weight scaling.
  • Other Quantization Methods.: 4-bit quantization shows promising results for weights and key-value cache under QAT, but 4-bit activation quantization remains unresolved.QLoRA instead adds small 16-bit adapters to quantized models to support efficient, high-precision fine-tuning after low-bit quantization.
  • Empirical Analysis and Findings.: INT8 weight quantization often reduces memory without performance degradation, whereas INT4 or INT3 weights require method-specific strategies to limit degradation.The effectiveness of lower-precision weight quantization depends on the selected quantization method.
  • Empirical Analysis and Findings.: Efficient fine-tuning can compensate for low-bit quantization degradation by updating high-precision adapters or using suitable low-rank LoRA initialization.This approach enhances the performance of quantized LLMs while preserving efficient fine-tuning.

9.6 Retrieval-Augmented Generation

Retrieval-augmented generation (RAG) supplements LLMs with timely or domain-relevant external information to reduce factual errors when internal knowledge is insufficient. Its standard workflow retrieves context, constructs a prompt, and generates a response, with performance improved through retrieval, refinement, iterative augmentation, and specialized training strategies.

  • Motivation and Method: RAG retrieves relevant information from external sources to provide LLMs with timely or domain-specific context and reduce factual errors.External sources include the internet and domain-specific knowledge bases.
  • Basic Workflow: The standard RAG workflow consists of context retrieval, prompt construction, and response generation.Retrieved documents are incorporated into the task prompt, which is then input to the LLM.
  • Improvement Strategies: Retrieval quality directly affects final response quality, and text granularity trades retrieval efficiency against irrelevant context.Coarser document-level retrieval is efficient but may include substantial irrelevant information, whereas finer granularity can improve relevance.
  • Improvement Strategies: Retrieved content can be refined through relevance-based reranking, filtering, extraction, summarization, or token-level compression.These methods address long contexts and irrelevant information that may hinder LLM use of retrieved documents.
  • Improvement Strategies: Iterative and adaptive retrieval augmentation address complex scenarios in which a single retrieval procedure is insufficient.Iterative retrieval refines the initial query using generated results and accumulates information across multiple retrieval rounds.
  • Improvement Strategies: Specialized instruction-tuning and pre-training tasks can further improve LLMs’ ability to use retrieved content.One construction method uses portions of an original document as queries and trains the model to reconstruct the remaining content from retrieval results.

9.7 Hallucination

LLM hallucination is the generation of content inconsistent with factual information, substantially affecting task performance. The section categorizes hallucinations, examines their sources, and summarizes detection methods.

  • Definition and Types: Hallucinations are generated contents inconsistent with factual information and include entity, relation-error, incompleteness, outdatedness, overclaim, and unverifiability forms.These forms involve incorrect entities or relationships, incomplete aggregated facts, obsolete information, claims beyond factual knowledge, or information that cannot be verified.
  • Sources of Hallucination: Training data is a primary hallucination source because erroneous or low-quality information can be imitated, while limited recency and missing domain knowledge distort model behavior.Increasing pre-training data may improve performance, but low-quality data can severely damage generation performance; evolving world knowledge can make stored knowledge outdated.
  • Sources of Hallucination: Pre-training and post-training methods can induce hallucinations through decaying attention over long sequences, hallucinated synthetic instruction data, and reward-driven responses that diverge from factual knowledge.Autoregressive training may hinder long-range dependency modeling, while knowledge distillation and human alignment can propagate or encourage unsupported content.
  • Sources of Hallucination: Prompt design and decoding strategies affect generation behavior, with unclear instructions and greater sampling diversity potentially increasing incorrect, irrelevant, or hallucinated content.Readability, format, and concreteness influence outputs, while higher temperature produces a more uniform token distribution that can favor irrelevant low-frequency words.
  • Detection Methods: Existing detection methods are model-based, uncertainty-based, or tool-based, with uncertainty approaches using token probabilities, logits, and response consistency.Lower token probability for key generated concepts indicates higher uncertainty and a greater likelihood of hallucination.

9.8 Complex Reasoning

Long CoT reasoning gives LLMs additional time to search for solutions in natural language before responding, using flexible reasoning patterns and actions such as planning, reflection, evaluation, and exploration. It can improve reasoning across domains, but requires careful data and training design because benefits may diminish with sufficient data and models may overuse long reasoning on simple problems.

  • Overview: Long CoT reasoning allocates more time to thinking and searches for solutions within natural language before producing a response.It is presented as a slow-thinking mode analogous to human reasoning on difficult problems.
  • Reasoning Patterns Analysis: Empirical studies identify systematic analysis, method reuse, divide-and-conquer, self-refinement, context identification, and constraint emphasis as key reasoning patterns.Their use varies across tasks and enhances cognitive processes compared with standard CoT reasoning.
  • Reasoning Advantages: Long CoT integrates reflection and backtracking rather than enforcing a linear reasoning chain, enabling natural-language search processes that emulate tree- or graph-structured algorithms.The approach supports trial-and-error navigation through planning, evaluation, reflection, and exploration.
  • Reasoning Advantages: Long CoT reasoning can generalize across domains: training exclusively on mathematical data can significantly improve performance in physics and chemistry.The passage attributes this transfer to long CoT being a reasoning mode rather than a domain-specific ability.
  • Training and Utilization: Long CoT fine-tuning may default to extended reasoning on simple problems, while self-generated training enhancements have diminishing impact when sufficient high-quality long CoT data is available.These limitations motivate methods that integrate long CoT and standard response modes.

10 CONCLUSION AND FUTURE DIRECTIONS

The survey reviews LLMs larger than 10B across pre-training, adaptation, utilization, and evaluation, while summarizing development resources and implementation guidance. It identifies open challenges spanning foundational principles, architectures, training, utilization, safety, and applications.

  • Survey scope: The survey focuses on LLMs larger than 10B and organizes their progress around pre-training, adaptation, utilization, and evaluation.It also summarizes available development resources and implementation guidelines for reproducing LLMs.
  • Basics and Principles: LLMs require clearer foundational principles because unsupervised pre-training on large-scale text differs from prior multitask learning approaches.The survey identifies explaining the elements underlying LLM abilities as an essential challenge.
  • Model Architecture: Transformers remain the de facto LLM architecture, but high training costs, slow inference, weak long-context processing, and limited exploration beyond decoder-only designs remain challenges.Specific architectural adaptations or algorithms may be needed to improve long-context modeling and utilization.
  • Model Training: LLM pre-training needs data-centric infrastructure for collection, cleaning, mixture, and curriculum design, alongside more flexible hardware support and resource scheduling.The survey emphasizes that training capable LLMs remains practically challenging.
  • Model Utilization: Prompting and in-context learning support broad task use, while retrieval augmentation can extend knowledge and improve question answering but long-context utilization and inference cost remain concerns.Reducing inference cost is especially important for large-scale deployment.
  • Safety and Alignment: LLMs face hallucination and misuse risks, including harmful, biased, or toxic outputs, even as systems such as ChatGPT broaden real-world applications and information access.The survey presents AI safety as a primary concern in developing more capable systems and exploring AGI.

CODA

The survey is continuously revised to incorporate recent LLM developments, while its authors acknowledge incomplete coverage and limited experimental results due to computational constraints.

  • Survey Writing: The survey was designed as a readable, objective, and comprehensive report on recent LLM advances, with its first draft completed on March 13, 2023 and subsequent extensive revisions.The authors describe survey writing as both a team effort and a learning process about LLMs.
  • Seeking for Advice: The authors acknowledge that the survey may miss important references or topics and contain non-rigorous discussions, and they plan to improve it continuously.Readers are invited to provide constructive suggestions through the survey’s GitHub page or directly to the authors.
  • Clarifications on Experiments: The reported experiments cover instruction-tuning, overall ability evaluation, and prompt engineering, but remain incomplete because computational resources limited them to small models or few comparisons.The authors intend to add missing larger-model results and more comparisons in future versions and request support for broader experiments.
  • Chinese Book: A Chinese book based on the survey has also been released and is in the publication process.The book is available at https://llmbook-zh.github.io.
Loading 2303.18223v19…