Skip to content
Back to the collection

Language Models are Few-Shot Learners

Tom B. Brown, Benjamin Mann, Nick Ryder

Show all 31 authors

Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, Dario Amodei

2020 · arXiv

Read the paper
HN score
3
Mentions
83
Readers
71
Months
35
What’s in a score?

From the abstract

Recent work has demonstrated substantial gains on many NLP tasks and benchmarks by pre-training on a large corpus of text followed by fine-tuning on a specific task. While typically task-agnostic in architecture, this method still requires task-specific fine-tuning datasets of thousands or tens of thousands of examples. By contrast, humans can generally perform a new language task from only a few examples or from simple instructions - something which current NLP systems still largely struggle to do. Here we show that scaling up language models greatly improves task-agnostic, few-shot performance, sometimes even reaching competitiveness with prior state-of-the-art fine-tuning approaches. Specifically, we train GPT-3, an autoregressive language model with 175 billion parameters, 10x more than any previous non-sparse language model, and test its performance in the few-shot setting. For all tasks, GPT-3 is applied without any gradient updates or fine-tuning, with tasks and few-shot demonstrations specified purely via text interaction with the model. GPT-3 achieves strong performance on many NLP datasets, including translation, question-answering, and cloze tasks, as well as several tasks that require on-the-fly reasoning or domain adaptation, such as unscrambling words, using a novel word in a sentence, or performing 3-digit arithmetic. At the same time, we also identify some datasets where GPT-3's few-shot learning still struggles, as well as some datasets where GPT-3 faces methodological issues related to training on large web corpora. Finally, we find that GPT-3 can generate samples of news articles which human evaluators have difficulty distinguishing from articles written by humans. We discuss broader societal impacts of this finding and of GPT-3 in general.

Metadata: arXiv. Abstracts retain their original authors’ rights.

In the conversation

Original HN comments, with labels from simple text rules. A label describes the whole comment and may miss context or irony. Read the discussion to make up your own mind. About the labels

20 selected excerpts · 83 total mentions

photon_lines
Recommendation · rule
Sorry -- I keep seeing this being used but I'm not entirely sure how it differs from most of human thinking. Most human 'reasoning' is probabilistic as well and we rely on 'associative' networks to ingest information. In a similar manner - LLMs use association as well -- and not only that, but they are capable of figuring out patterns based on examples (just like humans are) -- read this paper for context: https://arxiv.org/pdf/2005.14165. In other words, they are capable of grokking patterns from simple data (just like humans are). I've given various LLMs my requirements and they produced working solutions for me by simply 1) including all of the requirements in my…
Read the full comment
prompt and 2) asking them to think through and 'reason' through their suggestions and the products have always been superior to what most humans have produced. The 'LLMs are probabilistic predictors' comments though keep appearing on threads and I'm not quite sure I understand them -- yes, LLMs don't have 'human context' i.e. data needed to understand human beings since they have not directly been fed in human experiences, but for the most part -- LLMs are not simple 'statistical predictors' as everyone brands them to be. You can see a thorough write-up I did of what GPT is / was here if you're interested: https://photonlines.substack.com/p/intuitive-and-visual-guid...
cypress66
Recommendation · rule
What you're saying is outright false. If read llm papers you'll see that a lot of benchmarks used are related to math and logic. GPT3 paper as an example https://arxiv.org/abs/2005.14165 I recommend you read that paper as it answers a lot of misconceptions you may have about llms.
fossuser
Recommendation · rule
I think mixing in the human bit confuses the issue, you could have a goal oriented AGI that isn't human like that causes problems (paperclip maximizer). Check out GPT-3’s performance on arithmetic tasks in the original paper (https://arxiv.org/abs/2005.14165) Pages: 21-23, 63 Which shows some generality, the best way to accurately predict an arithmetic answer is to deduce how the mathematical rules work. That paper shows some evidence of that. > evolution has had almost a billion years to arrive at complex brains There are brains everywhere and evolution is extremely slow. Maybe the large computational cost of training models is similar to speeding that computation up? >…
Read the full comment
there is no obvious way to go from approximately human-level AGI to the kinds of sci-fi super-super-human AGIs that some AI catastrophists imagine. It's worth reading more about the topic, it's less that we'll have some human comparable AI and then be stuck with it - more so that things will continue to scale. Stopping at human level might be a harder task (or even getting something that's human like at all). > This is all not to mention that we have no way right now of tackling the problem of teaching the vast amounts of human common sense knowledge that is likely baked into our genes to an AI, and it's hard to tell how much that will impact true AGI. This is a good point and basically the 'goal alignment problem' or 'friendly AI' problem. It's the main reason for the risk since you're more likely to get a powerful AGI without these 'common sense' human intuitions of things. I think your mistake is thinking the goal alignment is a prerequisite for AGI - the risk comes from the truth being that it's not. Also humans aren't entirely goal aligned either, but that's a different issue. I understand the skepticism, I was skeptical too - but if you read more about it (not pop-sci, but the books from the people working on the stuff) it's more solid than you probably think and your positions on it won't hold up.
blackbear_
Neutral mention · rule
The GPT3 paper is a good starting point Language Models are Few-Shot Learners https://arxiv.org/abs/2005.14165 I also enjoyed the papers for DeepSeek and GLM for an overview of all the tricks you need to make these things work DeepSeek-V3.2: Pushing the Frontier of Open Large Language Models https://arxiv.org/abs/2512.02556 GLM-4.5: Agentic, Reasoning, and Coding (ARC) Foundation Models https://arxiv.org/abs/2508.06471
renewiltord
Neutral mention · rule
A lot of things are easy if you ignore the incentive structure. E.g. a lot of papers will no longer be published if the data must be published. You’d lose all published research from ML labs. Many people like you would say “that’s perfectly okay; we don’t need them” but others prefer to be able to see papers like Language Models Are Few-Shot Learners https://arxiv.org/abs/2005.14165 So the answer is that we still want to see a lot of the papers we currently see because knowing the technique helps a lot. So it’s fine to lose replicability here for us. I’d rather have that paper than replicability through dataset openness.
CamperBob2
Neutral mention · rule
For example, the fact that they can't learn from few examples For one thing, yes, they can, obviously [1] -- when's the last time you checked? -- and for another, there are plenty of humans who seemingly cannot. The only real difference is that with an LLM, when the context is lost, so is the learning. That will obviously need to be addressed at some point. that they can't perform simple mathematical operations without access to external help (via tool calling) But yet you are fine with humans requiring a calculator to perform similar tasks? Many humans are worse at basic arithmetic than an unaided transformer network. And, tellingly, we make the same kinds of errors. or…
Read the full comment
that they have to expend so much more energy to do their magic (and yes, to me they are a bit magical), which makes some wonder if what these models do is a form of refined brute-force search, rather than ideating. Well, of course, all they are doing is searching and curve-fitting. To me, the magical thing is that they have shown us, more or less undeniably (Penrose notwithstanding), that that is all we do. Questions that have been asked for thousands of years have now been answered: there's nothing special about the human brain, except for the ability to form, consolidate, consult, and revise long-term memories. 1: E.g., https://arxiv.org/abs/2005.14165 from 2020
cs702
Neutral mention · rule
The cost of developing GPT-2 and GPT-3 was on the order of millions of dollars, well within the budget of most tech organizations. See https://arxiv.org/abs/2005.14165 for the total compute invested in them. OpenAI had raised only a few tens of millions in donations at the time, as a non-profit organization. The increase in performance of computation has been happening for so many decades now that it's been given names like "Moore's Law." People like Hans Moravec predicted way back in the 1980's that the cost of compute would continue to decline and become cheap enough for AGI by the 2020's or 2030's. That's half a century ago!
godelski
Neutral mention · rule
> The results are surprisingly good, I don't think I could've done better as a human I'm actually surprised that the performance is so poor and would expect a human to do much better. The GPT model has embedding PLUS a whole transformer model that can untangle the embedded structure. To clarify some of the issues: data is both singular and plural, being a mass noun[0,1]. Datum is something you'll find in the dictionary, but not common in use[2]. The dictionary lags actual definitions. I mean words only mean what we collectively agree they mean (dictionary definitely helps with that but we also invent words all the time -- i.e. slang). I see how this one could trick up a…
Read the full comment
human, feeling the need to change the output and would likely consult a dictionary but I don't think that's a fair comparison here as LLMs don't have these same biases. King - crown really seems like it should be something like "man" or "person". The crown is the manifestation of the ruling power. We still use phrases like "heavy is the head that wears the crown" in reference to general leaders, not just monarchs. king - princess I honestly don't know what to expect. Man is technically gender neutral so I'll take this one. king - queen I would expect similar outputs to the previous one. Don't quite agree here. queen - king I get why is removing royalty but given the previous (two) results I think is showing a weird gender bias. Remember that queen is something like (woman + crown) and king is akin to (man + crown). So subtracting should be woman - man. The others I agree with. These were actually done because I was quite surprised at the results and was thinking about the aforementioned gender bias. > But keep in mind that this doesn't do embedding math like OP! I think you are misunderstanding the architecture of these models. The embedding sub-network is the translation of text to numeric tokens. You'll find mention of the embedding sub-networks in both the GPT3[3] and GPT4 papers. Though they are given lower importance than other works. While much smaller than the main network, don't forget that embedding networks are still quite large. For the smaller models they constitute a significant part of the total parameter count[4] After the embedding sub-network is your main transformer network. The purpose of this network is to perform embedding math! It is just that the goal is to do significantly more complicated math. Remember, these are learnable mappings (see Optimal Transport). We're just breaking it down into their two main intermediate mappings. But the embeddings still end up being a bottleneck. It is your literal gateway from words to numbers. [0] https://en.wikipedia.org/wiki/Mass_noun [1] https://www.merriam-webster.com/dictionary/data [2] https://www.sciotoanalysis.com/news/2023/1/18/this-data-or-t... [3] https://arxiv.org/abs/2005.14165 [4] https://arxiv.org/abs/2303.08774 [4] https://www.lesswrong.com/posts/3duR8CrvcHywrnhLo/how-does-g...
intended
Neutral mention · rule
Thank you for being blunt. Let me attempt to speak in the same earnest tone. You are contradicting the papers and work that the people who make the models are saying. Alternatively, you are looking at the dataset curation process with rose tinted glasses. >There is a tremendous amount of work that goes on by the LLM companies in verifying, sanitizing, and structuring the training corpuses, using a wide array of techniques. Common crawl is instrumental in building our models, 60% of GPT's training data was Common Crawl. (https://arxiv.org/pdf/2005.14165) pg 9. CC in turn was never intended for LLM training, this misalignment in goals results in downstream issues like hate…
Read the full comment
speech, NYT content, copyrighted content and more getting used to train models. https://foundation.mozilla.org/en/research/library/generativ... (This article is to establish the issues with CC as a source of LLM training) https://facctconference.org/static/papers24/facct24-148.pdf (this details those issues.) Firms, such as the NYT are now stopping common crawl from archiving their pages. https://www.wired.com/story/the-fight-against-ai-comes-to-a-... ----- TLDR: 'NYT' and other high quality content has largely been ingested by models. Reddit and other sources play a large part in training current models. While I appreciate your being blunt, this also means not being sharp and incisive. Perhaps precision would be required here to clarify your point. Finally - >Factual accuracy is not binary, it is a matter of degrees. Obviously training on content that is more factually correct will result in more factually correct next tokens What. Come on, I think you wouldnt agree with your own statement after reading it once more -Factual correctness is not a matter of degrees. Furthermore, facts dont automatically create facts. Calcuation, processing, testing and verification create more facts. Just putting facts together creates content.
reissbaker
Neutral mention · rule
BERT is a language model! It was considered a "large" language model for its time, and it's even based on transformers. It's a very small language model by today's standards (340MM params), and is encoder-only instead of decoder-only, but trying to draw a hard line between "BERT" and "LLMs" is more about parameter count than capabilities — in fact, the original GPT-3 paper benchmarked GPT-3 against finetuned BERT-large and beat it on nearly every measure [1]. And BERT-large is not unique in being able to be finetuned; finetuning Mistral 7B on your task should result in very good performance (similarly, OpenAI allows finetuning of gpt-3.5-turbo, and there are plenty of…
Read the full comment
non-Mistral open-source LLMs like Yi and Qwen that should do well too). I'm not sure what BloombergGPT has to do with LLMs vs non-LLMs; BloombergGPT is an LLM [2], and it defeating other LLMs on financial benchmarks doesn't prove much about large language models other than "LLMs can be trained to be better at specific tasks." 1: https://arxiv.org/abs/2005.14165 2: https://www.bloomberg.com/company/press/bloomberggpt-50-bill...
WhitneyLand
Neutral mention · rule
As a prerequisite to the attention paper? One to check out is: A Survey on Contextual Embeddings https://arxiv.org/abs/2003.07278 Embeddings are sort of what all this stuff is built on so it should help demystify the newer papers (it’s actually newer than the attention paper but a better overview than starting with the older word2vec paper). Then after the attention paper an important one is: Language Models are Few-Shot Learners https://arxiv.org/abs/2005.14165 I’m intentionally trying to not give a big list because they’re so time-consuming. I’m sure you’ll quickly branch out based on your interests.
jjoonathan
Neutral mention · rule
> Transformers existed in 2019, and while GPT4 is genuinely advanced, it's not a gigantic leap I'm referring to the emergent capabilities that show up with scale, which are a gigantic leap. The usual citation suggests that this emerged into the public consciousness in 2020 [1]. Do you take issue with the timeline or the idea that these were a gigantic leap? [1] https://arxiv.org/abs/2005.14165
ipsum2
Neutral mention · rule
> OpenAI's product was technically made by Ilya Nope, he is not a core contributor of GPT-4, GPT-3, GPT-2, DALLE-3, DALLE-2: https://arxiv.org/abs/2303.08774 https://cdn.openai.com/papers/dall-e-2.pdf https://arxiv.org/pdf/2005.14165.pdf https://arxiv.org/abs/1908.09203
thethimble
Neutral mention · rule
This paper suggests that learning does happen within a prompt. https://arxiv.org/abs/2005.14165 By extension it seems totally reasonable that the model is developing self awareness by introspecting its tendencies (prior generated output), summarizing those tendencies, and then iteratively building a more nuanced description of those tendencies over time.
ssnistfajen
Neutral mention · rule
GPT-3 had "books1" and "books2" among its training material and "books2" never had its actual source disclosed :https://arxiv.org/pdf/2005.14165.pdf Speculations about these source materials can be traced back as far as 2020: https://twitter.com/theshawwn/status/1320282152689336320 I don't think this issue would've flown under the radar for so long, especially with the implication that Ilya sided with the rest of the board to vote against Sam and Greg.
hexaga
Neutral mention · rule
Ah, I see. You are unfamiliar with how SOTA language models are actually trained in current day, what RLHF is in detail, and how it differs from other training phases. I'd encourage you to read through the GPT3 [0] and llama2 [1] papers for more salient descriptions of the specific mechanics involved and why RLHF is used at all, before trying to argue from some kind of introduction to ml 101 level simplification of how SOTA models are produced. - [0]: https://arxiv.org/abs/2005.14165 - [1]: https://arxiv.org/abs/2307.09288 For example, from the llama2 paper, section "3.2 Reinforcement Learning with Human Feedback (RLHF)": > RLHF is a model training procedure that is…
Read the full comment
applied to a fine-tuned language model to further align model behavior with human preferences and instruction following. We collect data that represents empirically sampled human preferences, whereby human annotators select which of two model outputs they prefer. This human feedback is subsequently used to train a reward model, which learns patterns in the preferences of the human annotators and can then automate preference decisions. The rest of 3.2 should be enlightening as well (in service to understanding how RLHF is actually quite different from the training algorithms used in pretraining or finetuning). > The data is input to the learning algorithm which generates the model. > To make ChatGPT less "racist" they provided new training data and rewarded it for the correct answers. For frontier language models, this is strictly incorrect. Multiple rounds of different training algorithms are used, each with its own objectives. RLHF is more complex than just 'put better data into same old pretraining algorithm.' > The process or algorithm of RHLF was not modified specially to handle "racism". These are general learning algorithms. They simply added new training data. Nobody is claiming RLHF was modified, but that the 'logic behind the weighting methods' are modified. Pretraining, then finetuning on specialized dataset does not produce a sufficiently aligned (non-racist, gender-neutral, etc) model, no matter how much extra data you throw at it: the answer to this is the introduction of a different algorithm, RLHF, which more accurately fits the model to desired alignment than unsupervised autoregressive loss minimization does. The sequence of events here is: 1. unsupervised pretraining on mixed dataset eval result: "it's just continuing the prompt instead of answering questions or being useful" researcher response: "let's put more focused data in to make it respond better" 2. instruction tuning on task-specific dataset eval result: "it's answering questions now but it has inherited biases from the pretraining corpus (it's too racist, sexist, or otherwise not aligned with desired values)" researcher response: "we've hit the limit on what you can reasonably accomplish with this training algorithm, let's try something else" (see GPT3, section "5. Limitations") 3. rlhf on human preference dataset eval result: "well, it's less racist now" > You are confusing yourself and still not quite understanding the basic concept. Once again, as per my last reply: "If you only look at the very high level superficial details, they could be said to be similar. That is all. The details differ in nontrivial ways." The basic ontology that you're trying to argue exists, is counterfactual. It boils down to: "put data into training algorithm, get model out. if it's too racist, put aligned data in and get non-racist model out." It's not hard to understand, you're just wrong. SOTA models are not produced this way. Full stop. The details of training phases are nontrivially different both algorithmically, and in the datasets used. At this point we've exhausted all reasonable discourse; it's clear that you're not engaging in good faith and I remain convinced that your position falls apart under the most trivial application of rigorous analysis. If you have any actual source to back up your claims, I'd love to see it. Beyond that, good day.
swyx
Neutral mention · rule
i highlighted this last night which seems to be making the rounds - https://twitter.com/swyx/status/1699369076529971545 Alec's CV (https://www.linkedin.com/in/alecradford/) seems to be: - 2011-2016 BSc Eng from Olin College - 2013+ started a data/AI consultancy as a sophomore that turned into a vague startup/product? - 2015 first paper on GANs coauthored with soumith https://arxiv.org/pdf/1511.06434.pdf%C3 - 2016 first GAN paper under openai email https://proceedings.neurips.cc/paper_files/paper/2016/file/8... - 2017 the generative reviews paper mentioend in the Wired article, with Ilya https://arxiv.org/pdf/1704.01444.pdf - 2017 coauthor on PPO paper (precursor to…
Read the full comment
instructgpt/rlhf) https://arxiv.org/pdf/1707.06347.pdf). - 2018 lead author on GPT1 https://www.mikecaptain.com/resources/pdf/GPT-1.pdf - 2019 lead author on GPT2 https://insightcivic.s3.us-east-1.amazonaws.com/language-mod... blog https://openai.com/research/better-language-models - 2019 coauthor on RLHF https://arxiv.org/pdf/1909.08593.pdf) - 2020 coauthor on gpt3 https://arxiv.org/abs/2005.14165 - 2020 coauthor on scaling laws https://arxiv.org/pdf/2001.08361.pdf%E4%B8%AD%E5%BE%97%E5%88... - 2021 coauthor on DallE http://proceedings.mlr.press/v139/ramesh21a/ramesh21a.pdf - 2021 coauthor on Codex https://arxiv.org/pdf/2107.03374.pdf?trk=public_post_comment... - 2023 lead author on Whisper https://proceedings.mlr.press/v202/radford23a/radford23a.pdf name a more successful 7 year CS career post undergrad... Update: FYI openai just announced a "developer day" in Nov - somehow not blessed by the HN gods https://news.ycombinator.com/item?id=37408234
YeGoblynQueenne
Neutral mention · rule
>> I'd question why you'd ask an LLM something like this instead of Wolfram Alpha, or just look up the answer. That's because OpenAI dedicated an entire section in claims that GPT-3 is reasonably good at arithmetic. See Section 3.9.1 titled "Arithmetic" in "Language Models are Few-Shot Learners": https://arxiv.org/abs/2005.14165 Whence I quote below: Overall, GPT-3 displays reasonable proficiency at moderately complex arithmetic in few-shot, one-shot, and even zero-shot settings. The reported results are pretty poor and too poor to justify even the relatively weak claim above (although the rest of the text in the same section very clearly and strongly implies that GPT-3…
Read the full comment
is doing something else than simply memorising a table of sums, which is an altogether much grander claim). OpenAI themselves seemed to be dubious enough about their own claim that the Arithmetic section of their paper was only included in the preprint (on Arxiv) and not in the published paper (in the 34th NeurIPS). Yet, the claim in the preprint was still enough for people to forcefully argue that GPT-3 can do arithmetic, that it can learn the rules of arithmetic, and other impossible things before breakfast. This is a discussion that goes back at least 3 years (judging from my comments where I point out that it's nonsense). It seems that the arithmetic ability of large language models is now a well accepted truth in the minds of the general public, who will casually use it to do, say, their maths coursework etc. So blame OpenAI who made the big claims.

Keep following the thread.

More in Language models

More from the same topics.