{
    "componentChunkName": "component---src-templates-blog-post-js",
    "path": "/gpt-3-my-fine-tuning-posts-might-already-be-obsolete/",
    "result": {"data":{"site":{"siteMetadata":{"title":"catch { snail }","author":"Andrew"}},"markdownRemark":{"id":"a522c037-d315-5469-9b3d-f75734539a0a","excerpt":"Three weeks ago OpenAI dropped the GPT-3 paper — “Language Models are Few-Shot Learners”, 31 authors, 75 pages — and then last week announced an API for it…","html":"<p>Three weeks ago OpenAI dropped the GPT-3 paper — <a href=\"https://arxiv.org/abs/2005.14165\">“Language Models are Few-Shot Learners”</a>, 31 authors, 75 pages — and then last week announced an API for it. Private beta, waitlist. I’m on the waitlist. This post is me processing the paper while I refresh my inbox.</p>\n<p>And I have to process it, because if the paper’s claims hold up, the two posts I wrote this spring about <a href=\"/gpt2-commit-messages\">fine-tuning GPT-2</a> describe a workflow with an expiration date.</p>\n<h2 id=\"the-boring-headline-its-just-bigger\" style=\"position:relative;\"><a href=\"#the-boring-headline-its-just-bigger\" aria-label=\"the boring headline its just bigger permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>The boring headline: it’s just bigger</h2>\n<p>GPT-3 is architecturally GPT-2 with the dials turned up. Same decoder-only transformer, more of everything: 175 billion parameters across 96 layers, trained on roughly 300 billion tokens of filtered Common Crawl, WebText, books, and Wikipedia. Context window doubled from 1024 to 2048 tokens.</p>\n<p>For scale: the model I fine-tuned on my commit messages was GPT-2 small, 124 million parameters. GPT-3 is over 1,400 of those. The training compute estimates floating around are in the several-million-dollar range, and the weights in half precision would be ~350GB — this thing wouldn’t fit on my SSD, let alone my GPU. Which explains why there’s an API and no download link, and why “Open”AI jokes are back on the menu.</p>\n<p>None of that is the interesting part. If “bigger model, better perplexity” were the whole story, this would be a shrug. The Kaplan et al. <a href=\"https://arxiv.org/abs/2001.08361\">scaling laws paper</a> from January already showed loss falling smoothly and predictably with model size, data, and compute — GPT-3 is in some sense just OpenAI running that curve way past where anyone else was willing to spend. The interesting part is what showed up along the way.</p>\n<h2 id=\"the-actually-interesting-part-learning-without-learning\" style=\"position:relative;\"><a href=\"#the-actually-interesting-part-learning-without-learning\" aria-label=\"the actually interesting part learning without learning permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>The actually interesting part: learning without learning</h2>\n<p>Here’s the thing the paper is really about, and it’s worth being precise because it’s genuinely strange.</p>\n<p><strong>Fine-tuning</strong>, the thing I did in March, means updating the model’s weights with gradient descent on your data. The model <em>changes</em>. That’s why my 3,124 commit messages got memorized — with a dataset that small, the cheapest way for the network to reduce loss is to just store the training set. I watched that happen in real time on a free Colab GPU.</p>\n<p><strong>In-context learning</strong>, the GPT-3 pitch, involves no weight updates at all. You put a few examples <em>in the prompt</em>:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">English: cheese  French: fromage\nEnglish: bread   French: pain\nEnglish: snail   French:</code></pre></div>\n<p>…and the model completes the pattern. The weights are frozen. Nothing is “trained.” And yet on task after task in the paper, performance climbs as you go from zero examples to one to a few dozen — as if the model is learning the task at inference time. The bigger the model, the steeper that climb: the small models in their ablations barely benefit from examples in the prompt, and the 175B model benefits a lot. Whatever this ability is, it’s something that <em>shows up with scale</em> rather than something anyone explicitly built.</p>\n<p>The least mystical way I can describe it: after reading a good chunk of the internet, the model has seen so many patterns-with-examples that “infer the pattern and continue it” became part of what next-token prediction means. Conditioning does the work that gradient descent used to do. The examples don’t update the model; they <em>locate</em> the task inside what the model already knows.</p>\n<p>I’m honestly not sure whether that framing is deep or deflationary. Possibly both.</p>\n<h2 id=\"scoring-my-own-take-from-april\" style=\"position:relative;\"><a href=\"#scoring-my-own-take-from-april\" aria-label=\"scoring my own take from april permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Scoring my own take from April</h2>\n<p>In the git hook post I wrote that GPT-2 “completes, it doesn’t obey,” and that what these models are missing “isn’t size, it’s some way of being trained to follow intent.”</p>\n<p>GPT-3’s answer to that is annoying: it doesn’t follow intent either — it’s still a pure completion engine — but at 175B parameters, completion gets so good that <em>arranging examples</em> becomes a usable interface. The paper’s few-shot prompts are exactly the “prompt origami” I was complaining about. They didn’t remove the origami. They made the paper so foldable that origami works.</p>\n<p>So: half right, half wrong. Wrong that size wouldn’t matter — size mattered enormously, and I’d have lost money betting on that. But I’ll stand by the other half: nothing in this paper trains the model to <em>want</em> to do your task. You’re still tricking an autocomplete into usefulness, and prompts are a brittle, undebuggable way to program. Someone is eventually going to fine-tune one of these giants on the objective “actually do what the instruction says” rather than “continue the document,” and I suspect that model will be the one non-nerds end up using. The capability is clearly in there now; what’s missing is the steering wheel.</p>\n<h2 id=\"is-fine-tuning-dead-then\" style=\"position:relative;\"><a href=\"#is-fine-tuning-dead-then\" aria-label=\"is fine tuning dead then permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Is fine-tuning dead, then?</h2>\n<p>The paper’s title is basically a shot at fine-tuning, so as someone with two fine-tuning posts, let me defend my turf — because I think the honest answer is “fine-tuning is dead for tasks, alive for distributions,” and the difference is exactly what my commit-message toy demonstrates.</p>\n<p>A <em>task</em> is “translate this,” “summarize this,” “classify this sentiment.” If a handful of demonstrations fit in 2048 tokens, GPT-3 says you may not need a dataset, a GPU, or a training loop at all. That’s a real democratization: collecting 50k labeled examples was always the actual cost of applied NLP, and few-shot moves that cost toward zero.</p>\n<p>But my commit-message model wasn’t learning a task. It was learning a <em>distribution</em> — the specific texture of my habits, my vocabulary, my guilt. That’s thousands of examples’ worth of signal. It doesn’t fit in any prompt, and no amount of general internet knowledge contains it, because it’s <em>mine</em>. The whole reason the “commit-message-driven development” trick worked is that the model had my history baked into its weights. Ten examples in a context window is a description of me; fine-tuning was a compression of me. Those aren’t the same object.</p>\n<p>So my bet: prompting eats the tasks, fine-tuning keeps the personalization and the domains — your codebase, your support tickets, legal boilerplate, medical notes. And knowing <em>which regime your problem is in</em> becomes the actual skill, more than knowing how to run a training script.</p>\n<h2 id=\"reasons-to-keep-a-foot-on-the-ground\" style=\"position:relative;\"><a href=\"#reasons-to-keep-a-foot-on-the-ground\" aria-label=\"reasons to keep a foot on the ground permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Reasons to keep a foot on the ground</h2>\n<p>Things in the paper that the hype tweets will skip:</p>\n<ul>\n<li><strong>Arithmetic falls off a cliff.</strong> Two- and three-digit addition mostly works; five-digit collapses. It has not learned math, it has learned the <em>look</em> of math — memorization and pattern-matching wearing a calculator costume.</li>\n<li><strong>Contamination.</strong> When your training set is a filtered internet crawl, some benchmark test sets are inevitably <em>in it</em>. The authors found a bug in their dedup and dedicate a whole section to damage control. They’re candid about it, but every benchmark number deserves a mental asterisk.</li>\n<li><strong>It confidently makes things up.</strong> Same failure mode as my GPT-2 inventing APIs, now delivered in fluent, authoritative paragraphs. Scale made the errors <em>more</em> convincing, not less frequent. That’s arguably worse.</li>\n<li><strong>You can’t have it.</strong> API-only, paid, one company. The era of “clone the repo and fine-tune on Colab” — literally my March post — doesn’t apply here. When the best model is a service, reproducibility, research access, and pricing power all get complicated. I don’t love it, even while acknowledging that nobody’s laptop was running 350GB of weights anyway.</li>\n</ul>\n<h2 id=\"what-ill-do-when-the-invite-arrives\" style=\"position:relative;\"><a href=\"#what-ill-do-when-the-invite-arrives\" aria-label=\"what ill do when the invite arrives permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What I’ll do when the invite arrives</h2>\n<p>First experiment is obvious: rerun the commit-message generator with zero training. Paste five diffs with their real messages into the prompt as demonstrations, staged diff sixth, let it complete. If a frozen model with five examples beats my lovingly fine-tuned GPT-2 with 3,124 — and after this paper I’d bet it does — that’s the whole regime change reproduced on my own silly benchmark, and post number four writes itself.</p>\n<p>Until then I’m a guy with a waitlist confirmation email and a 75-page PDF full of margin notes. Weirdest thing I’ve read all quarantine, and that’s a high bar this year.</p>","frontmatter":{"title":"GPT-3: my fine-tuning posts might already be obsolete","date":"June 20, 2020","description":"Reading the GPT-3 paper, waiting for API access, and rethinking what fine-tuning is even for"}}},"pageContext":{"slug":"/gpt-3-my-fine-tuning-posts-might-already-be-obsolete/","previous":{"fields":{"slug":"/my-ai-writes-the-commit-message-first-then-i-write-the-code/"},"frontmatter":{"title":"My AI writes the commit message first. Then I write the code"}},"next":{"fields":{"slug":"/so-about-that-docker-swarm-post-i-moved-to-k3s/"},"frontmatter":{"title":"So about that Docker Swarm post: I moved to k3s"}}}},
    "staticQueryHashes": ["3435731857","426816048","63159454"]}