Stephen Wolfram:ChatGPT 的训练

news2025/2/25 15:49:21

The Training of ChatGPT 

ChatGPT 的训练

OK, so we’ve now given an outline of how ChatGPT works once it’s set up. But how did it get set up? How were all those 175 billion weights in its neural net determined? Basically they’re the result of very large-scale training, based on a huge corpus of text—on the web, in books, etc.—written by humans. As we’ve said, even given all that training data, it’s certainly not obvious that a neural net would be able to successfully produce “human-like” text. And, once again, there seem to be detailed pieces of engineering needed to make that happen. But the big surprise—and discovery—of ChatGPT is that it’s possible at all. And that—in effect—a neural net with “just” 175 billion weights can make a “reasonable model” of text humans write.

好了,我们现在已经描述了一旦 ChatGPT 建立起来,它是如何工作的。但是它是如何建立起来的呢?神经网络中的那 1750 亿个权重是如何确定的?基本上,它们是基于大量的文本(来自网络、书籍等)所进行的大规模训练的结果,这些文本都是人类编写的。正如我们所说,即使有了所有的训练数据,神经网络能够成功地生成“类人”的文本也绝非显而易见。而且,再次强调,似乎需要详细的工程部分来实现这一目标。但 ChatGPT 的一个巨大的惊喜和发现是,这样的事情竟然是可能的。实际上,一个拥有“仅仅” 1750 亿权重的神经网络,就可以成为一个对人类书写文本的“合理模型”。

In modern times, there’s lots of text written by humans that’s out there in digital form. The public web has at least several billion human-written pages, with altogether perhaps a trillion words of text. And if one includes non-public webpages, the numbers might be at least 100 times larger. So far, more than 5 million digitized books have been made available (out of 100 million or so that have ever been published), giving another 100 billion or so words of text. And that’s not even mentioning text derived from speech in videos, etc. (As a personal comparison, my total lifetime output of published material has been a bit under 3 million words, and over the past 30 years I’ve written about 15 million words of email, and altogether typed perhaps 50 million words—and in just the past couple of years I’ve spoken more than 10 million words on livestreams. And, yes, I’ll train a bot from all of that.)

在现代社会,人类编写的大量文本以数字形式存在。公共网络上至少有数十亿个由人类编写的页面,总共可能有一万亿字左右的文本。如果算上非公共网页,这个数字可能至少增加 100 倍。到目前为止,已经有 500 多万本数字化图书可供使用(从历史上看,共出版了约 1 亿本图书),另有大约 1000 亿字的文本。这还不包括来自视频中的语音转化成的文本等。(作为个人对比,我一生中出版的材料总共不到 300 万字,过去 30 年里我写了大约 1500 万字的电子邮件,总共可能敲了 5000 万字。仅在过去的几年里,我在直播中就说了超过 1000 万字。而且,是的,我将从所有这些内容中训练一个机器人。)

But, OK, given all this data, how does one train a neural net from it? The basic process is very much as we discussed it in the simple examples above. You present a batch of examples, and then you adjust the weights in the network to minimize the error (“loss”) that the network makes on those examples. The main thing that’s expensive about “back propagating” from the error is that each time you do this, every weight in the network will typically change at least a tiny bit, and there are just a lot of weights to deal with. (The actual “back computation” is typically only a small constant factor harder than the forward one.)

那么,既然有了这些数据,如何从中训练神经网络呢?基本过程与我们在上面简单示例中讨论的非常相似。你呈现一批示例,然后调整网络中的权重以使网络在这些示例上产生的误差(“损失”)最小化。关于“反向传播”错误的主要昂贵之处在于,每次执行此操作时,网络中的每个权重通常都会发生至少微小的变化,而且还有许多权重需要处理。(实际的“反向计算”通常只比正向计算稍难一些。)

With modern GPU hardware, it’s straightforward to compute the results from batches of thousands of examples in parallel. But when it comes to actually updating the weights in the neural net, current methods require one to do this basically batch by batch. (And, yes, this is probably where actual brains—with their combined computation and memory elements—have, for now, at least an architectural advantage.)

借助现代 GPU 硬件,可以轻松地并行计算数千个示例的结果。但是在实际更新神经网络中的权重时,当前的方法需要逐批次进行。(是的,这可能是实际大脑(具有结合计算和存储单元)至少在架构上具有优势的地方。)

Even in the seemingly simple cases of learning numerical functions that we discussed earlier, we found we often had to use millions of examples to successfully train a network, at least from scratch. So how many examples does this mean we’ll need in order to train a “human-like language” model? There doesn’t seem to be any fundamental “theoretical” way to know. But in practice ChatGPT was successfully trained on a few hundred billion words of text.

即使在我们之前讨论过的学习数值函数的看似简单的情况下,我们也发现通常需要使用数百万个示例来成功训练网络,至少是从头开始的。那么,这意味着我们需要多少个示例来训练一个“类人语言”的模型呢?似乎没有任何基本的“理论”方法来知道。但实际上,ChatGPT 已经成功地通过几千亿字的文本进行了训练。

Some of the text it was fed several times, some of it only once. But somehow it “got what it needed” from the text it saw. But given this volume of text to learn from, how large a network should it require to “learn it well”? Again, we don’t yet have a fundamental theoretical way to say. Ultimately—as we’ll discuss further below—there’s presumably a certain “total algorithmic content” to human language and what humans typically say with it. But the next question is how efficient a neural net will be at implementing a model based on that algorithmic content. And again we don’t know—although the success of ChatGPT suggests it’s reasonably efficient.

有些文本被反复输入了多次,有些只输入了一次。但不知何故,它从所看到的文本中“获得了所需”。考虑到这么多的文本供其学习,需要多大的网络才能“学得好”呢?同样,我们尚没有一个基本的理论方法来回答这个问题。归根结底,正如我们将在下面进一步讨论的那样,人类语言及其典型表达应该具有一定的“总体算法内容”。但下一个问题是神经网络在实现基于该算法内容的模型时的效率如何。我们同样不知道,尽管 ChatGPT 的成功表明其效率相当不错。

And in the end we can just note that ChatGPT does what it does using a couple hundred billion weights—comparable in number to the total number of words (or tokens) of training data it’s been given. In some ways it’s perhaps surprising (though empirically observed also in smaller analogs of ChatGPT) that the “size of the network” that seems to work well is so comparable to the “size of the training data”. After all, it’s certainly not that somehow “inside ChatGPT” all that text from the web and books and so on is “directly stored”. Because what’s actually inside ChatGPT are a bunch of numbers—with a bit less than 10 digits of precision—that are some kind of distributed encoding of the aggregate structure of all that text.

最后我们可以注意到,ChatGPT 在处理时使用了大约几百亿个权重——与其接受的训练数据的总单词数(或标记数)相当。从某种程度上说,可能令人惊讶的是(尽管在 ChatGPT 的较小类似物中也经验观察到),似乎能够良好运作的“网络规模”与“训练数据规模”如此相近。毕竟,肯定不是因为“inside ChatGPT”,网络和书籍等所有文本都是“直接存储”的。因为实际上,ChatGPT 内部是一堆数字——精度略低于 10 位数——这些数字以某种分布式编码方式表示了所有文本的总体结构。

Put another way, we might ask what the “effective information content” is of human language and what’s typically said with it. There’s the raw corpus of examples of language. And then there’s the representation in the neural net of ChatGPT. That representation is very likely far from the “algorithmically minimal” representation (as we’ll discuss below). But it’s a representation that’s readily usable by the neural net. And in this representation it seems there’s in the end rather little “compression” of the training data; it seems on average to basically take only a bit less than one neural net weight to carry the “information content” of a word of training data.

换句话说,我们可能会问,人类语言及其典型表达的“有效信息内容”是什么。有原始的语言示例语料库,然后还有 ChatGPT 神经网络中的表示。这种表示很可能远非“算法最小”的表示(我们将在下文讨论)。但这是神经网络容易使用的表示。在这种表示中,最终对训练数据的“压缩”似乎相当有限;平均而言,大约每个神经网络权重只携带了训练数据中一个词的“信息内容”。

When we run ChatGPT to generate text, we’re basically having to use each weight once. So if there are n weights, we’ve got of order n computational steps to do—though in practice many of them can typically be done in parallel in GPUs. But if we need about n words of training data to set up those weights, then from what we’ve said above we can conclude that we’ll need about n2 computational steps to do the training of the network—which is why, with current methods, one ends up needing to talk about billion-dollar training efforts.

当我们运行 ChatGPT 生成文本时,我们基本上需要一次性使用每个权重。因此,如果有 n 个权重,我们需要执行 n 个计算步骤,尽管实际上许多计算步骤通常可以在 GPU 中并行执行。但是,如果我们需要大约 n 个训练数据字来设置这些权重,那么根据我们上面的讨论,我们可以得出我们将需要大约 n² 个计算步骤来完成网络的训练——这就是为什么,使用当前方法,我们最终需要谈论十亿美元的训练投入。

11b115baeedf0f3d2a71f3879ae859df.jpeg

“点赞有美意,赞赏是鼓励”

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/842683.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

目标检测与跟踪 (3)- TensorRTYOLO V8性能优化与部署测试

系列文章目录 目标检测与跟踪 (1)- 机器人视觉与YOLO V8_Techblog of HaoWANG的博客-CSDN博客 目标检测与跟踪 (2)- YOLO V8配置与测试_Techblog of HaoWANG的博客-CSDN博客 目录 系列文章目录 前言 YOLO v8 TensorRT 一、…

等保三级中“身份鉴别”要求与2FA双因子认证有何关联?

为了保护信息的安全,我国实行对信息及信息载体按照重要性等级分别进行保护,也就是信息安全等级保护制度。根据信息系统在国家安全、经济建设、社会生活中的重要程度,信息系统遭到破坏后对国家安全、社会秩序、公共利益以及公民、法人和其他组…

c++(类型转换+IO)[30]

类型转换 意义相近的类型------隐式类型转换 意义不想近的类型,值转换后有意义------显示的强制类型转换 static_cast 任何隐式类型的转换,非多态类型的转换(静态转换),意义相近的转换。 用于常见的隐式类型转换&am…

Spring Boot数据访问基础知识与JDBC简单实现

目录 Spring Boot数据访问基础知识 Spring Data ORM JDBC JPA JDBC简单实现 步骤1:新建Maven项目,添加依赖 步骤2:配置数据源—让程序可以访问到 步骤3:配置数据源—让IDEA可以访问到 步骤4:添加数据库和表 …

今天面了一个来字节要求月薪24K,明显感觉他背了很多面试题...

最近有朋友去字节面试,面试前后进行了20天左右,包含4轮电话面试、1轮笔试、1轮主管视频面试、1轮hr视频面试。 据他所说,80%的人都会栽在第一轮面试,要不是他面试前做足准备,估计都坚持不完后面几轮面试。 其实&…

4.DNS和负载均衡

文章目录 coreDNS概念部署croeDNS测试 kubernetes多master集群结构master节点部署 负载均衡配置部署nginx做四层反向代理安装高可用 keepalivednginx监控脚本修改k8s中组件的配置文件 coreDNS 概念 coreDNS是kubernetes的默认DNS实现。可以为集群中的service资源创建一个资源名…

ThinkPHP6企业OA办公系统

有需要请加文章底部Q哦 可远程调试 ThinkPHP6企业OA办公系统 一 介绍 勾股OA基于ThinkPHP6开发,前端Layui,数据库mysql,是一款实用的企业办公系统。可多角色登录,集成了系统设置、人事管理、消息管理、审批管理、日常办公、客户…

构建器/建造者/构建者模式(C++)

定义 将一个复杂对象的构建与其表示相分离,使得同样的构建过程(稳定)可以创建不同的表示(变化)。 应用场景 在软件系统中,有时候面临着“一个复杂对象”的创建工作,其通常由各个部分的子对象用一定的算法构成;由于需求的变化,这个复杂对象…

Homer:一个简单的静态主页

什么是 Homer ? Homer 是一个完全静态的 html/js 仪表板,基于一个简单的 yaml 配置文件。它旨在由 HTTP 服务器提供服务,如果您直接通过 file:// 协议打开 index.html,它将无法工作。 安装 在群晖上以 Docker 方式安装。 在注册表中搜索 h…

RISC-V基础之函数调用(四)非叶函数调用(包含实例)

叶函数是指不调用其他函数,也不改变任何非易失性寄存器的函数2。叶函数通常是一些简单的操作,如数学运算或逻辑判断。叶函数的特点是可以通过模拟返回来展开,即不需要保存或恢复寄存器的状态。 非叶函数是指调用其他函数或改变非易失性寄存器…

百度智能云“千帆大模型平台”升级:大模型最多,Prompt模板最全

🤵‍♂️ 个人主页:艾派森的个人主页 ✍🏻作者简介:Python学习者 🐋 希望大家多多支持,我们一起进步!😄 如果文章对你有帮助的话, 欢迎评论 💬点赞&#x1f4…

Rust 原生支持龙架构指令集

导读近日,Rust 开源社区发布 1.71.0 版本,实现对龙架构(LoongArch)指令集的原生支持。 龙架构操作系统发行版和开发者可基于上游社区源代码构建或直接下载 Rust 开源社区发布的龙架构二进制版本。Rust 开发者将在龙架构平台上获得…

【Vue】Parsing error: No Babel config file detected for ... vue

报错 Parsing error: No Babel config file detected for E:\Study\Vue网站\实现防篡改的水印\demo02\src\App.vue. Either disable config file checking with requireConfigFile: false, or configure Babel so that it can find the config files.             …

23年电赛D题-信号调制方式识别与参数估计装置

红叶何时落水 题目 题目分析 该题目的是制作一个信号检测以及解调装置 主要的任务有三个 1.六种信号的识别 2.信号相关参数的测量 3.信号解调 任务一 识别信号有很多思路,最简单的方式便是通过对信号进行FFT分析,分析其中的各个谐波的特征值。 …

自动化测试CSS元素定位

目录 1.1 CSS定位 1.1.1 绝对路径定位 1.1.2 相对路径定位 1.1.3 类名定位 1.1.4 属性定位 1.1.4.1 ID属性定位 1.1.4.2 其他属性定位 1.1.4.3 模糊属性定位 1.1.5 子页面元素查找 1.1.6 伪类定位 1.1 CSS伪类 1.1 CSS定位 1.1.1 绝对路径定位 目标 查找第一个文…

CS 144 Lab Seven -- putting it all together

CS 144 Lab Seven -- putting it all together 引言测试lab7.ccUDPSocketNetworkInterfaceAdapterTCPSocketLab7main方法子线程 小结 对应课程视频: 【计算机网络】 斯坦福大学CS144课程 Lab Six 对应的PDF: Checkpoint 6: putting it all together 引言 本实验无需进行任何编…

HubSpot网页设计神器,你想要的Landing Page都在这里!

在当今数字化时代,Landing Page(落地页)已成为营销策略中不可或缺的一环。它是与潜在客户首次接触的窗口,能够直接影响转化率和销售结果。而作为一款领先的营销自动化工具,HubSpot为企业提供了打造引人注目的Landing P…

uniapp微信小程序 401时重复弹出登录弹框问题

APP.vue 登陆成功后,保存登陆信息 if (res.code 200) {uni.setStorageSync(loginResult, res)uni.setStorageSync(token, res.token);uni.setStorageSync(login,false);uni.navigateTo({url: "/pages/learning/learning"}) }退出登录 toLogout: func…

Spring Cloud 的版本和SpringBoot的版本

Spring Cloud 的版本选择 Spring Cloud 和SpringBoot的版本存在对应关系 Spring Cloud 的版本和SpringBoot的版本,存在对应关系。最新的SpringCloud版本(发布文章时为2022.0.3),需要SpringBoot(3.0.9) 的…

爬虫获取电影数据----以沈腾参演电影为例

数据可视化&分析实战 1.1 沈腾参演电影数据获取 文章目录 数据可视化&分析实战前言1. 网页分析2. 构建数据获取函数2.1 网页数据获取函数2.2 网页照片获取函数 3. 获取参演影视作品基本数据4. 电影详细数据获取4.1 导演、演员、描述、类型、投票人数、评分信息、电影海…