atlas

Research map / Large language models / Language, safety and interpretability

Fewer Truncations Improve Language Modeling

ICML 2024 · Large language models › Language, safety and interpretability · approach: LLM pruning and scaling data

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes Best-fit Packing, which splits documents only at the context-length limit and packs the resulting chunks with an optimized best-fit-decreasing bin packing algorithm, so LLM pre-training avoids unnecessary truncation at near-concatenation efficiency.

Problem

Concatenate-then-split data formatting for LLM pre-training fragments many documents into incomplete pieces, causing information loss and closed-domain hallucination.

Approach

Segment documents into chunks at most the context length, then pack chunks into sequences via an optimized Best-Fit-Decreasing bin packing (segment-tree search, O(N log L)), with cross-document attention masked, so only unavoidable truncations occur while padding and training cost stay near concatenation.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Replace concatenation with Best-fit Packing13B language model pre-training · Reading comprehension, 2kAverage score: 46.71% -> 48.92%Helped
Replace concatenation with Best-fit Packing13B language model pre-training · Reading comprehension, 8kAverage score: 47.13% -> 49.03%Helped
Replace concatenation with Best-fit Packing13B language model pre-training · NQ-Swap, 2kExact match: 45.62% -> 51.03%Helped
Replace concatenation with Best-fit Packing13B language model pre-training · HumanEval, 2kPass@100: 35.28% -> 40.57%Helped
Replace concatenation with Best-fit Packing7B code language model pre-training · HumanEval, 2kUndefined name errors: 5.10% -> 2.41%Helped
Replace concatenation with Best-fit Packing7B code language model pre-training · MBPP, 2kPass@100: 59.46% -> 62.93%Helped
Add cross-document attention mask to concatenation (ablation)13B language model pre-training · Validation setPerplexity: 9.64 -> 9.53Helped
Add cross-document attention mask to concatenation (ablation)13B language model pre-training · Summarization, 2kROUGE-2: 12.16 -> 11.79Hurt
Add cross-document attention mask to concatenation (ablation)13B language model pre-training · Reading comprehension, 2kAverage score: 46.71% -> 47.92%Helped
Add cross-document attention mask to concatenation (ablation)13B language model pre-training · Context following, 2kAverage score: 40.60% -> 42.41%Helped

Surprising findings

Limitations

Experimental setup

Datasets: RefinedWeb The Stack

Benchmarks: NarrativeQA QuAC Natural Questions SQuAD DROP BoolQ RACE MNLI RTE NQ-Swap MemoTrap CNN/DailyMail

Metrics: F1 exact match accuracy ROUGE SummaC QAFactEval FAVA Pass@k undefined name error rate perplexity

Baselines: Concatenation (concat-then-split)

Builds on: LLaMA Best-Fit-Decreasing FlashAttention2 RefinedWeb The Stack

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy