Stephen Wolfram:ChatGPT 的训练
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² 个计算步骤来完成网络的训练——这就是为什么,使用当前方法,我们最终需要谈论十亿美元的训练投入。
“点赞有美意,赞赏是鼓励”
相关文章:

Stephen Wolfram:ChatGPT 的训练
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…...

SpringCloud实用篇2——Nacos配置管理 Feign远程调用 Gateway服务网关
目录 1 Nacos配置管理1.1 统一配置管理1.1.1 在nacos中添加配置文件1.1.2 从微服务拉取配置 1.2 配置热更新1.2.1 方式一1.2.2 方式二(推荐) 1.3.配置共享 2 搭建Nacos集群2.1 集群结构图2.2 搭建集群2.2.1 初始化数据库2.2.2 下载nacos2.2.3 配置Nacos2…...

tomcat配置文件和web站点部署(zrlog)简介
一.tomcat/apache-tomcat-8.5.70/conf/server.xml组件类别介绍 1.类别 2.Connector参数 3.host参数 4.Context参数 二.web站点部署(以zrlog为例) 1.将zrlog的war包传到webapps下面 2.在mysql数据库中创建zrlog用户并赋予权限 3.完成安装向导,登录管理界面即可…...

elementui实现当前页全选+所有全选+翻页保持选中状
原文来自:https://blog.csdn.net/sumimg/article/details/121693305?spm1001.2101.3001.6650.1&utm_mediumdistribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-121693305-blog-127570059.235%5Ev38%5Epc_relevant_anti_t3&depth_1-utm…...

Opencv项目实战:24 石头剪刀布
目录 0、项目介绍 1、效果展示 2、项目搭建 3、项目代码展示与部分讲解 pyzjr库...

Qt--QPlugin插件
写在前面 Qt–动态链接库一文中提到,动态方式加载dll只能加载 extern "C“ 的导出函数,而无法加载类,因此可以使用Qt提供的插件来实现导出类的动态加载。 QPlugin是Qt插件框架的一部分,是一种轻量级的插件系统,…...

公会发展计划 (GAP) 第 4 季:塑造 YGG 的成就版图
基于前三个赛季所取得的成果,Yield Guild Games(YGG)自豪地宣布推出 公会发展计划(GAP)第 4 季。公会最近的一些精英成员将在本季加入公会,公会成员将在全新的任务中磨练自己的技能,建立自己在 …...

ExpressJS教程_编程入门自学教程_菜鸟教程-免费教程分享
教程简介 Express是基于Node.js平台,快速、开放、极简的Web开发框架;通俗的理解:Express的作用和Node.js内置的http模块类似,是专门用来创建Web服务器的;Express的本质:就是一个npm上的第三方包,提供了快速创建Web服务器的便捷方法。ExpressJS是一个Web…...

时序预测 | MATLAB实现BO-BiLSTM贝叶斯优化双向长短期记忆神经网络时间序列预测
时序预测 | MATLAB实现BO-BiLSTM贝叶斯优化双向长短期记忆神经网络时间序列预测 目录 时序预测 | MATLAB实现BO-BiLSTM贝叶斯优化双向长短期记忆神经网络时间序列预测效果一览基本介绍模型搭建程序设计参考资料 效果一览 基本介绍 MATLAB实现BO-BiLSTM贝叶斯优化双向长短期记忆…...

HIVE优化之不需要参数优化
#1.数据倾斜 什么是数据倾斜? 一部分数据多 一部分数据少 造成的结果: MR运行过慢 主要是shuffle和reduce过程慢 分组聚合导致数据倾斜 Hive未优化的分组聚合 方法1:在MAP端直接聚合(分组聚合优化),减少…...

前端 select 标签如何创建下拉菜单?
聚沙成塔每天进步一点点 ⭐ 专栏简介⭐ 代码示例⭐ 代码讲解⭐ 写在最后 ⭐ 专栏简介 前端入门之旅:探索Web开发的奇妙世界 记得点击上方或者右侧链接订阅本专栏哦 几何带你启航前端之旅 欢迎来到前端入门之旅!这个专栏是为那些对Web开发感兴趣、刚刚踏…...

基于 eclipse-temurin 构建国内时区,地区,语言的docker镜像
基于 eclipse-temurin 构建国内时区,地区,语言的镜像 使用场景自定Dockerfile构建自己的基础镜像构建本地镜像推送远程仓库 使用场景 在给应用构建自定义镜像时,往往需要在每次构建时去调整时区,地区这些东西;每次构建…...

RunnerGo配置场景时接口模式该怎么选
在进行性能测试时,测试场景的正确配置非常关键。首先,需要根据业务场景和需求,设计出合理的测试场景,再利用相应的工具进行配置,实现自动化的性能测试。 在JMeter中,用户需要自己组织测试场景,…...

系统分享UIActivity
iOS自带的分享控件可以完成绝大部分的分享需求。 它可以不需要集成微信、QQ等第三方SDK就可以实现分享(需要在弹出视图里面点击更多打开开关)到微信好友、朋友圈等,功能很强大,也很方便。 一、系统分享两个步骤 UIActivity配置分享的内容和…...

常用抓包工具
Fiddler Fiddler 是一个很好用的抓包工具,可以用于抓取http/https的数据包,常用于Windows系统的抓包,它有个优势就是免费 Charles Charles是由JAVA开发的,可以运行在window Linux MacOS,但它是收费的,和…...

自然语言处理学习笔记(五)————切分算法
目录 1.切分算法 2.完全切分 3.正向最长匹配 4.逆向最长匹配 5.双向最长匹配 6.速度评测 1.切分算法 词典确定后,句子可能含有很多词典中的词语,他们有可能互相重叠,如何切分需要一些规则。常用规则为:正向匹配算法、逆向匹…...

SQL-方法论
写SQL时可以考虑的手段: 行转列 先分为多个临时表,然后JOIN到一起 select uid,t1.name YuWen,t2.name ShuXue from (select uid,namefrom tableAwhere naem 语文) t1join (select uid,namefrom tableAwhere naem 数学) t2on t1.uid t2.uid; 用sum(if…...

[Python从零到壹] 六十八.图像识别及经典案例篇之图像特效(毛玻璃、浮雕、油漆和模糊特效变换)
八月太忙,还是写一篇吧! 欢迎大家来到“Python从零到壹”,在这里我将分享约200篇Python系列文章,带大家一起去学习和玩耍,看看Python这个有趣的世界。所有文章都将结合案例、代码和作者的经验讲解,真心想把自己近十年的编程经验分享给大家,希望对您有所帮助,文章中不足…...

undefined与null的区别
null 表示一个对象被定义了,值为“空值” undefined 表示不存在这个值 1.undefined typeof undefined //"undefined" undefined 是一个表示"无"的原始值或者说表示"缺少值",就是此处应该有一个值,但还没有…...

Unity之获取用户地理位置
1.直接利用三方API获取: 1.1 利用bilibili的api 【未知稳定性】 public void Awake() {StartCoroutine(GetLocationInfoNew());}/// <summary>/// 利用bilibili的接口通过ip直接获取城市信息/// </summary>IEnumerator GetLocationInfoNew() {//UnityWebRequest …...

TC3XX - MCAL知识点(二十):CAN MCAL配置及代码实战(CAN/CANFD/extenen CAN)
目录 1、概述 2、MCAL配置 2.1、实验目标 2.2、CAN配置(包含CAN与CANFD) 2.2.1、CanGeneral...

QT生成Debug和Release发布版后,运行exe缺少dll问题
在QT Creator生成debug和release的exe执行文件后,运行时,报错缺少*.dll.解决办法1: 在系统环境变量中添加D:\Qt\Qt5.13.2\Tools\mingw730_64\bin后,即可运行。 当使用此方法时,将exe拷贝到其他电脑中运行时,…...

企业进销存管理流程有哪些? 附进销存管理系统
阅读本文,您可以了解:1、进销存的定义;2、进销存的流程 首先,在了解进销存流程之前,我们必须厘清一个问题? 什么是进销存? 进销存是一个企业管理中常用的术语,是指企业在经营过程中…...

RPC原理与Go RPC详解
文章目录 RPC原理与Go RPC什么是RPC本地调用RPC调用HTTP调用RESTful API net/rpc基础RPC示例基于TCP协议的RPC使用JSON协议的RPCPython调用RPC RPC原理 RPC原理与Go RPC 什么是RPC RPC(Remote Procedure Call),即远程过程调用。它允许像调用…...

JavaScript:异步编程的发展
在JavaScript编程中,异步编程是处理耗时操作的关键技术,它允许程序在等待某些操作完成时继续执行其他任务,提高了程序的性能和响应性。随着技术的发展,JavaScript的异步编程模型也在不断演进,从最初的回调函数到现在的…...

排序第二课【选择排序】直接选择排序 与 堆排序
目录 1. 排序的概念: 2.选择排序的基本思想 3.直接选择排序 4.堆排序 1. 排序的概念: 排序:所谓排序,就是使一串记录,按照其中的某个或某些关键字的大小,递增或递减的排列起来的操作。 稳定性…...

【chrome扩展开发】vue-i18n使用问题及解决方案
记录chrome扩展开发时调用vue-i18n的一些问题和解决方法 环境 vue: ^3.3.4vue-i18n: ^9.2.2vite: ^4.4.8 错误1 Uncaught (in promise) EvalError: Refused to evaluate a string as JavaScript because unsafe-eval is not an allowed source of script in the following Con…...

【Vue3】localStorage读取数组并赋值的问题
问题描述 今天在写项目用到localStorage进行存储并读取数据,并将读取到的数据存放到列表的时候,发现vue3不能直接对数组进行赋值。因为Vue3的响应式是proxy,对所有的数据进行了拦截。 onBeforeMount(() > {console.log(JSON.parse(local…...

华为harmonyos4.0鸿蒙4.0安装谷歌服务框架Play商店,解决从服务器检索信息时出错
8月4号华为手机发布了全新的harmonyos4.0鸿蒙4.0系统,很多人需要问还是不是支持谷歌服务框架?那么答案是肯定的,它和鸿蒙3是一样的,一样的操作,一样的支持安装谷歌服务框架,安装Google play商店。测试机型&…...

pcl 滤波
pcl::ShadowPoints 去除边缘不连续点云 #include <pcl/filters/shadowpoints.h> #include <pcl/features/normal_3d.h>pcl::PointCloud<pcl::PointXYZI>::Ptr ShadowsCloudFilter(pcl::PointCloud<pcl::PointXYZI>::Ptr cloud) {pcl::ShadowPoints&l…...