<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>GPT-3 on Lee</title>
        <link>/en/tags/gpt-3/</link>
        <description>Recent content in GPT-3 on Lee</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en</language>
        <copyright>Lee</copyright>
        <lastBuildDate>Wed, 02 Sep 2026 23:21:52 +0800</lastBuildDate><atom:link href="/en/tags/gpt-3/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>GPT-3: In-Context Learning and the Few-Shot Explosion</title>
        <link>/en/p/gpt-03/</link>
        <pubDate>Wed, 02 Sep 2026 00:00:00 +0000</pubDate>
        
        <guid>/en/p/gpt-03/</guid>
        <description>&lt;img src="/en/p/gpt-03/cover.jpg" alt="Featured image of post GPT-3: In-Context Learning and the Few-Shot Explosion" /&gt;&lt;h2 id=&#34;gpt-2s-unfinished-question&#34;&gt;GPT-2&amp;rsquo;s Unfinished Question
&lt;/h2&gt;&lt;p&gt;GPT-2 showed two things: zero-shot capability exists, and scaling shows no saturation. But at 1.5B, zero-shot CoQA scored 55 F1 while fine-tuned SOTA was 90.7 — a huge gap.&lt;/p&gt;
&lt;p&gt;GPT-3&amp;rsquo;s question: &lt;strong&gt;what happens at 100× the scale?&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&#34;the-175b-configuration&#34;&gt;The 175B Configuration
&lt;/h2&gt;&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;&lt;/th&gt;
					&lt;th&gt;GPT-2 XL&lt;/th&gt;
					&lt;th&gt;GPT-3&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;Layers&lt;/td&gt;
					&lt;td&gt;48&lt;/td&gt;
					&lt;td&gt;96&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;d_model&lt;/td&gt;
					&lt;td&gt;1600&lt;/td&gt;
					&lt;td&gt;12288&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Heads&lt;/td&gt;
					&lt;td&gt;25&lt;/td&gt;
					&lt;td&gt;96&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Context&lt;/td&gt;
					&lt;td&gt;1024&lt;/td&gt;
					&lt;td&gt;2048&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Params&lt;/td&gt;
					&lt;td&gt;1.5B&lt;/td&gt;
					&lt;td&gt;175B&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Trained on ~300B tokens (Common Crawl + WebText + books + Wikipedia), roughly 570× the text of GPT-2.&lt;/p&gt;
&lt;h2 id=&#34;in-context-learning-the-core-discovery&#34;&gt;In-Context Learning: The Core Discovery
&lt;/h2&gt;&lt;p&gt;GPT-3&amp;rsquo;s headline result: &lt;strong&gt;few-shot learning via prompts, no gradient updates at all.&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Translate English to French:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sea otter =&amp;gt; loutre de mer
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;cheese =&amp;gt; fromage
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;hello =&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The model completes &amp;ldquo;bonjour&amp;rdquo; — not because it was fine-tuned on translation, but because attention over the prompt&amp;rsquo;s examples conditions the output distribution.&lt;/p&gt;
&lt;h3 id=&#34;the-scaling-pattern&#34;&gt;The Scaling Pattern
&lt;/h3&gt;&lt;p&gt;Across tasks, performance follows a consistent pattern: &lt;strong&gt;zero-shot &amp;lt; one-shot &amp;lt; few-shot&lt;/strong&gt;, and the gap widens with model size. Small models barely benefit from examples; 175B models benefit dramatically.&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Task&lt;/th&gt;
					&lt;th&gt;Fine-tuned SOTA&lt;/th&gt;
					&lt;th&gt;GPT-3 zero-shot&lt;/th&gt;
					&lt;th&gt;GPT-3 few-shot&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;SuperGLUE&lt;/td&gt;
					&lt;td&gt;89.8&lt;/td&gt;
					&lt;td&gt;52.9&lt;/td&gt;
					&lt;td&gt;&lt;strong&gt;85.6&lt;/strong&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;TriviaQA&lt;/td&gt;
					&lt;td&gt;—&lt;/td&gt;
					&lt;td&gt;54.2&lt;/td&gt;
					&lt;td&gt;&lt;strong&gt;71.2&lt;/strong&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;LAMBADA&lt;/td&gt;
					&lt;td&gt;63.2&lt;/td&gt;
					&lt;td&gt;63.8&lt;/td&gt;
					&lt;td&gt;&lt;strong&gt;76.2&lt;/strong&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Arithmetic (2-digit +)&lt;/td&gt;
					&lt;td&gt;—&lt;/td&gt;
					&lt;td&gt;26.5&lt;/td&gt;
					&lt;td&gt;&lt;strong&gt;80.4&lt;/strong&gt;&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Few-shot GPT-3 matches or exceeds fine-tuned models on many tasks — with zero parameter updates.&lt;/p&gt;
&lt;h2 id=&#34;why-icl-works-mechanistically&#34;&gt;Why ICL Works (Mechanistically)
&lt;/h2&gt;&lt;p&gt;In-context learning is not fully understood, but the leading hypotheses:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Implicit gradient descent&lt;/strong&gt; — the forward pass over examples approximates a meta-learned update (von Oswald et al., 2022)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Induction heads&lt;/strong&gt; — specific attention heads implement &amp;ldquo;find previous occurrence of current token, copy what followed&amp;rdquo; (Olsson et al., 2022)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bayesian inference&lt;/strong&gt; — the model treats the prompt as evidence and conditions on a latent task distribution (Xie et al., 2021)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;None is the full story; all capture parts of it.&lt;/p&gt;
&lt;h2 id=&#34;the-scaling-laws-connection&#34;&gt;The Scaling Laws Connection
&lt;/h2&gt;&lt;p&gt;Kaplan et al. (2020) showed loss follows power laws in parameters, data, and compute:&lt;/p&gt;
$$L(N) \propto N^{-0.076}$$&lt;p&gt;GPT-3 sits on the predicted curve. Chinchilla (2022) later showed the optimal token/parameter ratio is ~20 tokens per parameter — GPT-3 was undertrained by that measure, which is why LLaMA-65B (1.4T tokens) matches it at ~⅓ the size.&lt;/p&gt;
&lt;h2 id=&#34;what-gpt-3-changed&#34;&gt;What GPT-3 Changed
&lt;/h2&gt;&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Prompting as interface&lt;/strong&gt; — natural language became the programming interface for models&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The API economy&lt;/strong&gt; — no fine-tuning means one model serves all users&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scaling as business strategy&lt;/strong&gt; — GPT-3 justified compute investment at a scale no paper had before&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;limitations&#34;&gt;Limitations
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Hallucination&lt;/strong&gt; — fluent but factually wrong outputs (the term entered common usage with GPT-3)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No memory&lt;/strong&gt; — 2048-token context is tiny; later models extended this by orders of magnitude&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Compute cost&lt;/strong&gt; — few-shot inference on 175B was extremely expensive&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Undertrained by modern standards&lt;/strong&gt; — Chinchilla-optimal training would use ~3.5T tokens&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;references&#34;&gt;References
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;Brown, T., et al. (2020). &lt;em&gt;Language Models are Few-Shot Learners&lt;/em&gt;. arXiv:2005.14165.&lt;/li&gt;
&lt;li&gt;Kaplan, J., et al. (2020). &lt;em&gt;Scaling Laws for Neural Language Models&lt;/em&gt;. arXiv:2001.08361.&lt;/li&gt;
&lt;li&gt;Hoffmann, J., et al. (2022). &lt;em&gt;Training Compute-Optimal Large Language Models&lt;/em&gt;. arXiv:2203.15556.&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        
    </channel>
</rss>
