knowledge base · entry 14
A thousand examples, carefully chosen
A read-through of LIMA: Less Is More for Alignment — the paper that asked how much of alignment is really teaching, and answered: almost none of it. The knowledge was already in the base model; 1,000 hand-picked examples taught it how to speak. It opens our post-training arc, and it is entry 08’s data-quality lesson arriving at the alignment stage.
every figure zooms — click it, scroll to magnify, drag to pan
part one
The idea, before any jargon
figure 1 · the hypothesis
The knowledge is already in there
A base language model has read trillions of tokens. Somewhere in its weights it already knows how to plan a trip, explain a proof, write a cover letter. What it does not know is that it is supposed to behave like an assistant — answer the question, in a helpful register, and stop. LIMA’s claim, stated as the Superficial Alignment Hypothesis: a model’s knowledge and capabilities are learnt almost entirely during pretraining, while alignment merely teaches it which subdistribution of formats to use when talking to a user.
click any figure to zoom · scroll to magnify · drag to pan
If that is true, alignment is a small lesson, not a second education — and a small, perfect dataset should be enough to deliver it. The paper is one long test of that corollary.
part two · the data
What a thousand examples look like
figure 2 · the dataset
750 borrowed, 250 written by hand
The entire training set is 1,000 prompt–response pairs — about 750,000 tokens. Three quarters are mined from community sites where good answers already exist: Stack Exchange, wikiHow, and Reddit’s WritingPrompts. The last quarter the authors wrote themselves, deliberately, to stamp one uniform assistant voice across the set. A further 300 prompts are held out as the test set — the model never sees them.
The hand-written 250 are the quiet trick. Community answers bring knowledge and variety; the authored examples bring consistency of persona. The mix is the point: diversity in the prompts, uniformity in the voice.
figure 3 · the filter
Millions of threads in, a thousand answers out
“Curated” is doing heavy lifting, so here is what it meant. From millions of Stack Exchange threads: keep only highly-voted answers to self-contained questions; drop answers shorter than 1,200 or longer than 4,096 characters; strip links, HTML, and first-person asides; sample across topics rather than deep within one. What survives is rewritten where needed into one calm, helpful register.
The funnel is the work. Nothing in it is clever machine learning — it is editorial judgment applied a thousand times, which is exactly why so few teams do it.
part three · the arithmetic
How small is small?
figure 4 · worked by hand
Five parts in ten million
It is worth feeling the ratio. LLaMA 65B pretrained on roughly 1.4 trillion tokens. LIMA’s alignment set is 750 thousand. Divide them and the entire alignment lesson is about 0.00005% of what the model has read — five parts in ten million. For contrast, Alpaca fine-tuned on 52,000 examples (52× more), and InstructGPT’s pipeline consumed tens of thousands of demonstrations and rankings plus a reinforcement-learning stage.
part four · the verdict
Humans compare the answers
results · human preference
Holding its own against the RLHF heavyweights
The test: show human judges a prompt with two responses — LIMA’s and a rival’s — and ask which is better, or whether they tie. LIMA, with its thousand examples and no preference tuning of any kind, beats Alpaca 65B (trained on 52× more data) and OpenAI’s RLHF-trained DaVinci003. Against the era’s product models it loses the match but wins a startling share of rounds.
| compared against | its training | LIMA equal or preferred |
|---|---|---|
| Alpaca 65B | 52,000 examples — 52× LIMA’s data | clear majority |
| DaVinci003 | full RLHF pipeline | 65% |
| Bard | product post-training | 58% |
| Claude | RLHF + constitutional AI | 46% |
| GPT-4 | the strongest pipeline of its day | 43% |
Read the last row carefully: on 43% of prompts, judges found the 1,000-example model at least as good as GPT-4. Absolute grading agreed — 88% of LIMA’s responses met the prompt’s requirements, half rated excellent. That is the hypothesis surviving contact with the evidence.
part five · why it works
Quality, diversity — and the quantity that didn’t matter
figure 6 · the ablations
Doubling the data did nothing
The ablations separate the three ingredients. Quality: training on filtered versus unfiltered Stack Exchange answers is worth half a point on a six-point grading scale. Diversity: heterogeneous Stack Exchange prompts beat wikiHow’s uniform how-to formula at the same size and quality. Quantity: doubling the training set from 2,000 examples — and doubling it again, and again, up to 16,000 — produced no improvement at all.
the shape of the finding quantity is the only knob that costs nothing to turn, and it is the one that does nothing. The two that work — quality and diversity — are exactly the ones that demand human judgment per example. “More data” is not a data strategy.
part six · the fine print
What a thousand examples cannot buy
figure 7 · the limits
Where the seams show
The authors are candid about the edges. Authoring uniform, excellent examples is laborious and does not scale like scraping does. LIMA is not robust: an unlucky sampling seed or an adversarial prompt can produce a weak answer where a product model would recover. And on a small safety probe of 30 sensitive prompts, it responded safely only 80% of the time — style transfer alone does not install guardrails.
This is precisely the gap the rest of the arc fills: entry 15 shows what the full human-feedback pipeline buys, and entry 16 shows how cheaply its core can now be had.
the math · in the paper's notation
One loss, and the statistics of a verdict
LIMA's training math is a single classical equation — that absence is the paper's point. What deserves care is the arithmetic of the human-preference verdict, decoded here so you can read the results table with error bars in mind.
the equations · worked
The only loss in the paper, and how the verdict is counted
the training objective · plain supervised fine-tuning
ℒ(θ) = − Σt=1|y| log πθ( yt | x, y<t )
read aloud: maximize the probability of the curated response, token by token, given the prompt and the tokens so far. This is the ordinary language-modelling loss — no reward model, no preference term, no RL. Every equation the next two entries add, LIMA deliberately does without; its entire bet is placed on the thousand (x, y) pairs this sum runs over.
- x, yone curated prompt and its response — the pairs from figure 2
- y<tthe response tokens before position t — the model always predicts the next one
- πθthe model being tuned, from the LLaMA 65B base
the evaluation · a preference share, with its error bar
p̂ = # preferred + # tiesn SE = √( p̂·(1−p̂) / n )
read aloud: the reported percentage is a proportion over n judged prompts, and a proportion over n prompts carries a standard error of root p(1−p)/n. The paper's verdicts are human counts, and counts have widths — worth holding whenever a single preference percentage is doing a lot of arguing.
- njudged test prompts — 300 held out, never trained on
- p̂the "LIMA equal or preferred" share from the results table
part seven
What we take from it
applied · our reading
The data bar for a domain fine-tune
LIMA is the first paper we hand anyone who says “we need ten thousand training examples.” Three things we carry into our own fine-tuning work:
- Budget for curation, not collection. A few hundred expert-written, style-uniform examples are a real alignment dataset. The cost centre is editorial time from people who know the domain — not scraping, not labeling farms.
- Diversify the prompts, unify the voice. LIMA’s split — varied community questions plus a hand-authored core that fixes the persona — is a recipe. For a domain assistant: real user questions for coverage, expert-authored answers for tone.
- Let the plateau save you money. Before commissioning example 10,001, re-read the scaling ablation: past a small, well-chosen core, quantity bought nothing. If your fine-tune is weak, the fix is almost never “more of the same.”
the caveat we would flag LIMA aligned a 65B base model — a big vessel with plenty of latent capability to surface. A small model with thin pretraining has less to reveal, and a thousand examples cannot conjure knowledge that was never there. That failure mode — fine-tuning to inject facts — is the most expensive mistake in applied fine-tuning, and no amount of curation rescues it.
source
Chunting Zhou, Pengfei Liu, Puxin Xu, Srini Iyer, Jiao Sun, Yuning Mao, Xuezhe Ma, Avia Efrat, Ping Yu, Lili Yu, Susan Zhang, Gargi Ghosh, Mike Lewis, Luke Zettlemoyer, Omer Levy. LIMA: Less Is More for Alignment. arXiv:2305.11206. Figures on this page are our own; the dataset composition, preference percentages and ablation findings are the paper’s, and any other plotted values are illustrative.
← back to the knowledge base · ← entry 08 · Textbooks Are All You Need · entry 15 · InstructGPT →
attention.sh — a division of Jinacode Systems. Transformers,
fine-tuning, and sovereign LLMs.
we're hiring the curious — hello@attention.sh