Part 5 of 12 · 2 min read
The toy curve shows why tuning needs data, and in-context learning doesn't scale with it
Giving a model more examples in its context window helps only up to the size of that window; fine-tuning keeps improving as long as there's more data to train on.
Think of handing someone a cheat sheet with sixteen worked examples versus actually teaching them the method. The cheat sheet helps regardless of how many problems they'll eventually see. But teaching keeps paying off the more practice problems you give them.
In plain words: on a toy classification task, in-context learning with a fixed number of exemplars plateaus immediately, while a fine-tuned model's accuracy keeps climbing as it gets more labelled data. This is the general shape, not a measurement of any real language model.
A worked example. With 16 labelled examples, in-context learning (using all 16 as context) scores 60 percent and the tuned model scores 69 percent. Tuning is already ahead, but not by much. At 256 examples, in-context is still stuck at 60 percent (it only ever sees 16 exemplars, however much data exists) while tuned has climbed to 88 percent. At 2,048 examples, in-context is at 61 percent and tuned is at 92 percent. The in-context curve is flat because it genuinely cannot use data beyond its fixed exemplar window; the tuned curve keeps rising because training keeps finding more signal in the samples.
The key lines. From code/mini-finetune/sample_eff.py:
# from code/mini-finetune/sample_eff.py
def knn_in_context(Xtr, ytr, Xte, k_examples):
"""Use only k_examples exemplars (the context window) and classify by nearest one."""
Xs, ys = Xtr[:k_examples], ytr[:k_examples]
Read it as: knn_in_context always slices out exactly k_examples from the training set, no matter how large Xtr actually is. That's the literal reason the in-context line in the results table stays flat regardless of how much labelled data becomes available.
Supervised fine-tuning (SFT), distillation
SFT is training on (input, desired output) pairs. Distillation is a specific use of the same SFT mechanics: training a small model to imitate a larger one's outputs, with the "desired output" supplied by another model instead of a human.
Example: logistic_finetune above is doing the toy-task equivalent of SFT: training directly on labelled (input, output) pairs. That is why its accuracy keeps rising with more pairs while the fixed-context approach cannot.