从GPT(Generative Pre-trained Transformer)到GPT-4的演进路径可以总结为以下几个主要阶段,主要是基于模型的规模、能力、训练方法和应用的逐步增强:
-
GPT (2018):
- 基础架构: 首个GPT模型是基于Transformer架构,采用了无监督预训练和微调的方法。模型的训练目标是使用大量文本数据预训练一个语言模型,再通过微调来完成特定任务。
- 模型规模: GPT有1.17亿个参数,尽管相对于后来版本而言较小,但这一模型为后来的进步打下了基础。
- 创新点: GPT通过预训练+微调的方式大大提升了任务的泛化能力,尤其在没有标注数据的情况下,能够实现多个NLP任务。
-
GPT-2 (2019):
- 模型规模: GPT-2大幅度增加了模型规模,最大版本的参数达到了15亿个。其规模的扩大使得模型在语言生成和理解能力上有了显著提升。
- 改进: GPT-2在生成文本的连贯性、流畅性和创造性上有了突破。并且它的模型不需要特定的任务微调,通过零-shot学习可以完成多个任务。
- 影响: GPT-2由于其强大的生成能力,引起了广泛关注,也引发了关于AI伦理和安全性的问题。OpenAI最初并未公开GPT-2的全部模型,以防滥用。
-
GPT-3 (2020):
- 模型规模: GPT-3在GPT-2的基础上进一步扩展,具有1750亿个参数,使其成为当时世界上最大的语言模型。
- 进步: GPT-3通过更大规模的参数和数据集,在多个NLP任务(如翻译、写作、代码生成等)上达到了前所未有的表现。其能力甚至接近或超过了人类在某些任务上的表现。
- 零-shot学习: GPT-3展示了出色的零-shot和少-shot学习能力,即使没有专门的训练,它也能在很多任务中做出合理的回应。
- 影响: GPT-3引发了广泛的商业应用和研究,也促使了更多关于AI伦理、偏见和滥用的讨论。
-
GPT-4 (2023):
- 模型规模与能力: GPT-4相比GPT-3有了更为显著的提升,虽然具体的参数数量未公开,但根据OpenAI的描述,它在多个任务的性能上超过了GPT-3。
- 多模态能力: GPT-4引入了多模态能力,除了文本输入外,还能理解图像等其他类型的输入。这使得它在处理复杂的任务时表现更加灵活。
- 精细化控制与更高的生成质量: GPT-4在生成的文本质量上进一步提升,减少了无关、错误或有害信息的产生,并且能够更好地理解和生成长文本。
- 应用范围: GPT-4的强大能力不仅提升了传统NLP任务的表现,还为多个领域的创新应用提供了支持,例如编程、法律文书生成、教育辅导等。
总结:
从GPT到GPT-4的演进,主要体现为以下几个方面的变化:
- 规模的不断扩大:每一代模型的参数数量都大幅增加,这使得模型的表现不断提升。
- 能力的增强:从基本的文本生成能力,到能够理解和生成更复杂的文本,甚至在多模态任务中展示出色的表现。
- 任务处理的灵活性:通过零-shot学习、少-shot学习等方法,模型能够在没有明确训练的情况下完成多种任务。
- 安全性和伦理问题:随着模型能力的提升,安全性、偏见和滥用等问题变得更加突出,OpenAI在发布新模型时更加注重这些问题的管理。
整体上,GPT系列模型的进化展示了深度学习领域在自然语言处理方面的快速进步,模型的规模、灵活性和智能水平都有了显著提高。
GPT1
GPT2
GPT3:Language Models are Few-Shot Learners
https://arxiv.org/abs/2005.14165
最近的研究表明,通过在大规模文本语料库上进行预训练,然后在特定任务上进行微调,可以在许多NLP任务和基准测试中取得显著进展。虽然这种方法在架构上通常与任务无关,但仍然需要数千到数万个任务特定的微调数据集。
相比之下,人类通常只需要少量示例或简单的指令就能执行新的语言任务,而当前的NLP系统在这方面仍然存在很大的困难。
在本文中,我们展示了通过大规模扩展语言模型可以显著提高任务无关的少量示例学习能力,有时甚至能与以往的最先进的微调方法相媲美。具体来说,我们训练了GPT-3,一种拥有1750亿个参数的自回归语言模型,比任何之前的非稀疏语言模型多出10倍,并测试其在少量示例设置下的表现。
在所有任务中,GPT-3都没有进行任何梯度更新或微调,任务和少量示例完全通过与模型的文本交互来指定。GPT-3在许多NLP数据集上表现强劲,包括翻译、问答和完形填空任务,以及一些需要即时推理或领域适应的任务,如单词重排、使用新词造句或进行三位数的算术运算。
与此同时,我们也发现了一些数据集,在这些数据集上GPT-3的少量示例学习仍然存在困难,还有一些数据集在训练过程中由于大规模网络语料库的问题而出现方法论上的问题。
最后,我们发现GPT-3能够生成新闻文章样本,人类评估员很难将其与人类写作的文章区分开来。
我们讨论了这一发现以及GPT-3在更广泛社会影响方面的意义。
Author:
Tom B. Brown, Benjamin Mann, Nick Ryder, 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
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.
GPT3.5:Training language models to follow instructions with human feedbaek(2022)
https://arxiv.org/abs/2203.02155
将语言模型做得更大并不一定使它们更好地遵循用户的意图。
例如,大型语言模型可能会生成不真实、有毒或根本不对用户有帮助的输出。
换句话说,这些模型与用户的意图不一致。在本文中,我们展示了一种通过人类反馈来使语言模型与用户意图对齐的方法,这种方法适用于广泛的任务。
我们从一组标注员编写的提示和通过OpenAI API提交的提示开始,收集一个包含标注员演示的期望模型行为的数据集,并利用这个数据集通过监督学习对GPT-3进行微调。
随后,我们收集一个包含模型输出排名的数据集,用于进一步通过人类反馈的强化学习微调该监督模型。我们将得到的模型称为InstructGPT。
在对我们提示分布进行的人工评估中,1.3B参数的InstructGPT模型的输出比175B的GPT-3更受欢迎,尽管参数少了100倍。
此外,InstructGPT模型在真实度上有所提高,并且减少了有毒输出的生成,同时在公共NLP数据集上的表现几乎没有回退。
尽管InstructGPT仍然会犯一些简单的错误,我们的结果表明,通过人类反馈进行微调是将语言模型与人类意图对齐的一个有前景的方向。
Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul Christiano, Jan Leike, Ryan Lowe
Making language models bigger does not inherently make them better at following a user’s intent. For example, large language models can generate outputs that are untruthful, toxic, or simply not helpful to the user. In other words, these models are not aligned with their users. In this paper, we show an avenue for aligning language models with user intent on a wide range of tasks by fine-tuning with human feedback. Starting with a set of labeler-written prompts and prompts submitted through the OpenAI API, we collect a dataset of labeler demonstrations of the desired model behavior, which we use to fine-tune GPT-3 using supervised learning. We then collect a dataset of rankings of model outputs, which we use to further fine-tune this supervised model using reinforcement learning from human feedback. We call the resulting models InstructGPT. In human evaluations on our prompt distribution, outputs from the 1.3B parameter InstructGPT model are preferred to outputs from the 175B GPT-3, despite having 100x fewer parameters. Moreover, InstructGPT models show improvements in truthfulness and reductions in toxic output generation while having minimal performance regressions on public NLP datasets. Even though InstructGPT still makes simple mistakes, our results show that fine-tuning with human feedback is a promising direction for aligning language models with human intent.