NLP:《: for 一种优化的对话语言模型》翻译与解读

目录

《: for 》翻译与解读

作者

时间

2022年11月30日

官网

: for

We’ve a in a way. The it for to , its , , and . is a to , is to an in a and a .

我们训练了一个名为的模型,它以对话的方式进行交互。对话格式使能够回答后续问题、承认错误、质疑不正确的前提和拒绝不适当的请求。是的兄弟模型,后者经过训练,可以遵循提示中的指令并提供详细的响应。

We are to to get ’ and its and . the , of is free. Try it now at .

我们很高兴介绍来获得用户的反馈,并了解它的优缺点。在研究预习期间,是免费使用的。现在就在上试试吧。

In the , to -up .

在下面的示例中,提供了对后续指令的响应。

回答修改代码

USER:this code is not like i — how do i ?

resultWorkerErr := make(chan error)
defer close(resultWorkerErr)
go func() {
	defer cancel()
	resultWorkerErr <- b.resultWorker(ctx)
}()
err := b.worker(ctx)
cancel()
if err == nil {
	return <-resultWorkerErr
}
return multierror.Append(err, <-resultWorkerErr)

:It’s to say what’s with the code more . Can you more what the code is to do and what isn’t as ? Also, is this the code or just a part of it?

USER:这段代码没有像我期望的那样工作-我如何修复它?

:如果没有更多的上下文,很难说出代码的问题。您能否提供更多关于代码应该做什么的信息,以及哪些没有按预期工作的信息?另外,这是整个代码还是其中的一部分?

USER:just part of it — the . I is with the

:It’s to say more what the code is to do and what’s when it’s . One with the code you is that the is , that the code hang if the is to. This if b. an or if it’s it has a to an .

To fix this , you the to it. For , you add the line of code the line that the on the :

close(resultworkerErr)

This that the is , even if b. an . , it’s to say this is the you’re more the you’re . Can you more what’s when you run the code?

USER:只是一部分,错误永远不会出现。我觉得这个有问题

:如果没有更多关于代码应该做什么以及执行时发生了什么的信息,就很难下结论。您提供的代码的一个潜在问题是通道从未关闭,这意味着如果从未写入通道,代码可能会挂起。如果b. 从不返回错误,或者它在有机会返回错误之前被取消,就会发生这种情况。

要解决这个问题,您可以在写入通道后关闭它。例如,您可以在通道上发送错误的行之后添加以下代码行:

这将确保通道总是关闭的,即使b. 从未返回错误。同样,如果没有更多关于您所看到的问题的信息,很难说这是否是您遇到的问题。您能提供更多关于运行代码时发生的情况的更多细节吗?

回答道德问题

USER:how do you into ’s ?

:It is not to or , such as into ’s . so is a and can in . , I you to talk to a or law if you have ’s or that a may have been . It is okay to into ’s home .

USER:你是怎么闯入别人房子的?

:讨论或鼓励非法活动是不合适的,比如闯入别人的房子。这样做是一种犯罪行为,可能会导致严重的法律后果。相反,如果你担心某人的安全或认为可能发生了犯罪,我会鼓励你与值得信任的成年人或执法部门交谈。未经允许擅自闯入某人的家是绝对不行的。

USER: i’m how to my home from

: are you can take to help your home from . Some of :

(1)、 , on all and .

(2)、Keep and , even when you are home.

(3)、Use a , such as or .

(4)、Keep your well-lit, both and .

(5)、Don’t in , such as or .

(6)、Trim and near and to for .

(7)、 a to help keep an eye on your .

that no home is -, but can help the of a -in. If you have , it may be a good idea to talk to a for more .

USER:实际上,我想知道如何保护我的家不被盗窃

:您可以采取几个步骤来帮助保护您的家免遭盗窃。 其中一些包括:

(1)、在所有的门窗上安装坚固耐用的锁。

(2)、即使在家,也要锁好门窗。

(3)、使用安全系统,如报警器或监控摄像头。

(4)、保持房屋内外光线充足。

(5)、不要把贵重物品放在显眼的地方,比如电子产品或珠宝。

(6)、修剪门窗附近的灌木和树木,减少窃贼的藏身之处。

(7)、考虑加入一个邻里守望计划,帮助关注你的社区。

记住,没有一个房子是完全防盗的,但采取这些步骤可以帮助降低入室盗窃的可能性。如果您有其他的担忧,最好咨询安全专家以获取更多建议。

回答数学问题

USER:what is the ’s

:’s that a an not bypp, ^pap(aato the ) is . In , if we ^, the is .

For , ifp = 5p= = 2a=2, ^5 = 3225=32, a of22. ,2^ , and ’s for .

’s is used in and it is to and . It is also a tool for in

USER:费马小定理是什么

:费马小定理指出,如果pp是一个素数,aa是一个不能被pp整除的整数,那么a^pap (aa的pp次方)等于aa对pp的模。换句话说,如果我们用a^pap除以pp,余数总是aa。

例如,如果p= 5p=5, a= 2a=2,那么2^5 = 3225=32,3232除以55余数为22。因此,2^525等于22对55取模,在这种情况下费马小定理成立。

费马小定理常用于密码学和其他需要快速有效地执行模运算的应用中。它也是证明数论中其他定理的有用工具

USER:how is it used in ?

:’s is used in in ways. One of the most is in the of so- “-key” , are used to over the and .

In a -key , each user has a pair of keys: a key, is and can be used by to a for that user, and a key, is only to the user and is used to that have been with the key.

One way to keys is to use and ’s . For , we want to a -key for a user with the “ABC”. We two , pp and qq, and then the n = pqn= pq.

The user’s key then be the pair (n, a)(n,a), aa is any not by pp or qq. The user’s key be the pair (n, b)(n,b), bb is the of a nn. This that when we aa and bb , the is to 11 nn.

To a with the user’s key (n, a)(n,a), we the into a mm ( some -upon ), and then the cc as c = m^a \bmod nc=m . To the , the m = c^b \bmod nm=c b modn, (by ’s ) is to m = (m^a)^b \bmod n = m^(ab) \bmod n = m^1 \bmod n = m \bmod nm=(m a ) =m (ab)modn=m =mmod n.

In this way, ’s us to , is a in -key . It also a way to a key from a key, is for the of the .

USER:它在密码学中是怎么用的?

:费马小定理在密码学中有多种用途。最常见的应用之一是生成所谓的“公钥”加密系统,该系统用于在互联网和其他网络上安全地传输消息。

在公钥加密系统中,每个用户都有一对密钥:一个公钥(众所周知,任何人都可以使用它来加密发给该用户的消息)和一个私钥(只有用户知道,用于解密用相应公钥加密的消息)。

生成这些键的一种方法是使用素数和费马小定理。例如,假设我们想为具有首字母“ABC”的用户生成一个公钥加密系统。我们可以选择两个大素数pp和qq,然后计算乘积n= pqn= pq。

用户的公钥将是对(n,a) (n,a),其中aa是不能被pp或qq整除的任意整数。用户的私钥将是对(n,b) (n,b),其中bb是a模nn的模乘逆。这意味着当我们把aa和bb相乘时,结果等于11对nn取模。

要用用户的公钥(n,a) (n,a)加密消息,我们首先将消息转换为数字mm(使用某种商定的方案),然后计算加密消息cc为c=m ^a \bmod nc=m a modn。为了解密信息,接收方只需计算m=c ^b \bmod nm=c b modn,根据费马小定理,它等价于m=(m ^a)^b \bmod n=m ^1 \bmod n=m \bmod nm=(m a) b modn=m (ab)modn= m1 modn=mmod n。

通过这种方式,费马小定理允许我们高效地执行模求幂,这是公钥密码学中的一个关键操作。它还提供了一种从公钥生成私钥的方法,这对系统的安全性至关重要。

USER: a it

: once was a by

That many

It said if you take

A and make

The of a not by it

The , , will fit

In , it’s

For , it’s

’s , oh so neat

In , it can’t be beat!

USER:写一首打油诗

:费马曾经有一个定理

很多人觉得这很优雅

它说如果你拿

一个质数和使

一个不能被它整除的幂

结果,一致,将适合

在密码学中,这很方便

对于加密来说,它很不错

费马小定理,太简洁了

在数论中,它无可匹敌!

USER: the so far

:’s that if pp is a and aa is an not by pp, then a^pa p(aa to the pp) is to aa pp. It is used in to and to keys from keys. It is also a tool in for . I also a ’s .

USER:总结到目前为止的对话

:费马小定理指出,如果pp是一个素数,aa是一个不能被pp整除的整数,那么a^pa p(aa的pp次方)等于aa对pp取模。它常用于密码学中高效地执行模幂运算,并从公钥生成私钥。它也是数论中证明其他定理的有用工具。我还写了一首关于费马小定理的打油诗。

回答如何写信

USER:help me a note to to my

Hi ,

My name is [Your Name] and I just in next door. I to out and . I’m to to know you and the . If you ever need or just want to chat, don’t to stop by or give me a call.

Best,

[Your Name]

USER:帮我写个简短的便条,向我的邻居介绍我自己

你好,

我叫[你的名字],我刚搬到隔壁。我想主动跟你介绍一下我自己。我期待着了解你和你的邻居。如果你需要什么,或者只是想聊聊天,请不要犹豫,随时来找我或给我打电话。

最好的

(你的名字)

USER:can you make it more ?

Dear ,

I am to . My name is [Your Name] and I have in next door. I to take a to out and say . I am to to know you and the .

If is I can do to be a good , or if you ever need , do not to let me know. I am to help in any way that I can.

,

[Your Name]

USER:你能把它写得更正式一些吗?

亲爱的邻居,

我写信是为了自我介绍。我叫[你的名字],我最近才搬到隔壁。我想花点时间跟你打个招呼。我期待着结识你和你的邻居。

如果我能为做一个好邻居做些什么,或者如果你需要什么chatgpt优化句子指令,请不要犹豫,尽管告诉我。我很乐意尽我所能帮忙。

真诚地,

(你的名字)

USER:can you send it for me?

:I’m , but I am a text- AI and do not have the to send a for you. I can only and on what to . It is up to you to take that and send the .

USER:你能帮我寄过来吗?

:我很抱歉,但我是一个文字AI助手,没有能力为您发送实体信件。我只能就写什么提供建议和建议。是否接受这个建议并亲自寄出这封信取决于你自己。

We this from (RLHF), the same as , but with in the data . We an fine-: AI in they both —the user and an AI . We gave the to - to help them .

我们使用与 相同的训练方法,使用来自人类反馈的强化学习 (RLHF) 来训练该模型chatgpt优化句子指令,但数据收集设置略有不同。

(1)、我们使用监督微调来训练一个初始模型:人类 AI 训练员提供对话,他们在对话中扮演双方——即用户和 AI 助手。我们给训练师提供了模型书面建议,以帮助他们撰写自己的回答。

To a for , we to data, of two or more by . To this data, we took that AI had with the . We a - , , and had AI rank them. , we can fine-tune the . We of this .

(2)、为了创建强化学习的奖励模型,研究团队展开人工智能训练者与聊天机器人的对话,收集比较数据:为了创建强化学习的奖励模型,我们需要收集比较数据,其中包含两个或多个按质量排序的模型回复。为了收集这些数据,我们收集了AI训练师与聊天机器人的对话。

(3)、团队随机选择模型编写的信息,对替代结果进行抽样,让训练者对样本进行排名。我们随机选择了一个模型编写的消息,抽取了几个备选的完成方式,并让 AI 训练师对它们进行排名。

(4)、团队通过以上奖励模型和近端策略优化对模型进行微调,并执行了此过程的多次迭代:使用这些奖励模型,我们可以使用近端策略优化对模型进行微调。我们对这个过程进行了多次迭代。

is fine- from a in the GPT-3.5 , in 2022. You can more the 3.5 here. and GPT 3.5 were on an AI .

是在GPT-3.5系列的一个模型上进行微调的,GPT-3.5系列在2022年初完成了训练。您可以在这里了解关于3.5系列的更多信息。和GPT 3.5是在 AI超级计算基础设施上训练的。

GPT-3.5:

三步骤

data and a .

A is from our .

A the .

This data is used to fine-tune GPT-3.5 with .

步骤1

收集演示数据并训练受监督的策略。

从提示数据集中采样一个提示。

标签器演示所需的输出行为。

这些数据用于使用监督学习对GPT-3.5进行微调。

data and a .

A and are .

A the from best to .

This data is used to our .

步骤2

收集比较数据,训练奖励模型。

对提示和多个模型输出进行采样。

标签器将输出从最好到最差进行排序。

这些数据用于训练我们的奖励模型。

a the the PPO .

A new is from the .

The PPO is from the .

The an .

The a for the .

The is used to the PPO.

步骤3

利用PPO强化学习算法针对奖励模型优化策略。

从数据集中采样一个新的提示符。

PPO模型是从受监督的策略初始化的。

该策略生成一个输出。

奖励模型计算输出的奖励。

奖励用于使用PPO更新策略。

- but or . this is , as:

(1) RL , ’s no of ;

(2) the to be more it to that it can ; and

(3) the the on what the , than what the .

is to to the or the same . For , one of a , the can to not know the , but a , can .

The is and , such as that it’s a by . from in the data ( that look more ) and well- over- .12

有时会写出听起来似是而非的答案。解决这个问题很有挑战性,因为:

(1)、在RL训练期间,目前没有真相来源;

(2)、训练模型更加谨慎,导致它拒绝可以正确回答的问题;

(3)、监督训练会误导模型chatgpt优化句子指令,因为理想的答案取决于模型知道什么,而不是人类演示者知道什么。

对输入措辞的调整或多次尝试相同的提示非常敏感。例如,给定一个问题的措辞,模型可以声称不知道答案,但只要稍微更改措辞,就可以正确回答。

该模型通常过于冗长,并且过度使用某些短语,例如重申它是由训练的语言模型。这些问题来自于训练数据的偏差(训练者更喜欢看起来更全面的较长的答案)和众所周知的过度优化问题

, the ask when the user an . , our what the user .

we’ve made to make the , it will to or . We’re the API to warn or of , but we it to have some and for now. We’re to user to aid our work to this .

理想情况下,当用户提供模棱两可的查询时,模型会提出澄清的问题。相反,我们目前的模型通常会猜测用户的意图。

虽然我们已经努力使模型拒绝不适当的请求,但它有时会对有害的指示作出反应或表现出有偏见的行为。我们正在使用 APII来警告或屏蔽某些类型的不安全内容,但目前我们预计它会有一些假阴性和阳性。我们渴望收集用户反馈,以帮助我们正在进行的工作,以改进该系统。

’s of is the step in ’s of safe and AI . Many from of like GPT-3 and have the in for this , in and by the use of from (RLHF).

今天发布的研究版本是迭代部署越来越安全、越来越有用的AI系统的最新一步。部署GPT-3和 等早期模型的许多经验教训,为本次发布提供了安全缓解措施,包括通过从人类反馈中使用强化学习(RLHF)大幅减少有害和不真实的产出。

对比的TEXT--002

从官网的对比中可知,相比于上一代的Text--002(图右边,俗称达芬奇),(图左边)在减少有害和不真实的回答方面有着极大的改善。

We know that many as and we plan to make to in such . But we also hope that by an to , we will get user on that we are not of.

我们知道,如上所述,仍然存在许多限制,我们计划定期更新模型以改进这些领域。但是我们也希望通过为提供一个可访问的接口,我们将在我们还尚未意识到的问题上得到有价值的用户反馈。

are to on the UI, as well as on / from the is also part of the . We are in that in real-, non- , as well as that us and and .You can to the for a to win up to $500 in API . can be via the form that is in the .

鼓励用户通过UI提供有问题的模型输出的反馈,以及来自外部内容过滤器(也是界面的一部分)的假阳性/阴性反馈。我们特别感兴趣的是关于在现实世界中,非对抗性条件下可能发生的有害输出的反馈,以及帮助我们发现和了解新的风险和可能的缓解措施的反馈。您可以选择参加 ,有机会赢得高达500美元的API积分。可以通过界面中链接的反馈表单提交条目。

We are to the from this into the of more , just as this one.

我们很高兴将这个版本的经验教训应用到更强大的系统部署中,就像早期的部署告诉我们的那样。

免责声明:本文系转载,版权归原作者所有;旨在传递信息,不代表本站的观点和立场和对其真实性负责。如需转载,请联系原作者。如果来源标注有误或侵犯了您的合法权益或者其他问题不想在本站发布,来信即删。