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.

我們很高興將這個版本的經驗教訓應用到更強大的系統部署中,就像早期的部署告訴我們的那樣。

免責聲明:本文系轉載,版權歸原作者所有;旨在傳遞信息,不代表本站的觀點和立場和對其真實性負責。如需轉載,請聯系原作者。如果來源標注有誤或侵犯了您的合法權益或者其他問題不想在本站發布,來信即刪。