id
stringlengths
12
14
text
stringlengths
77
1.3k
source
stringclasses
1 value
metadata
dict
2307.09288-0
ラマ2:オープンファウンデーションとファインチューンドチャットモデル Hugo Touvron、Louis Martiny、Kevin Stoney、Peter Albert、Amjad Almahairi、Yasmine Babaei、Nikolay Bashlykov、Soumya Batra、Prajjwal Bhargava、Shruti Bhosale、Dan Bikel、Lukas Blecher、Cristian Canton Ferrer Moya、Chen Guillem、Cucurull David、Esiobu Jude、Fernandes Jeremy、Fu Wenyin、Fu Brian Fuller、Cynthia Gao、Vedanuj Goswami、Naman Goyal、Anthony Hartshorn、Saghar Hosseini、Rui Hou、Hakan Inan、Marcin Kardas、Viktor Kerkez、Madian Khabsa、Isabel Kloumann、Artem Korenev、Punit Singh Koura、Marie-Anne Lachaux、Thibaut Lavril、Jenya Lee、Diana Liskovich、Yinghai Lu、Yuning Mao、Xavier Martinet、Todor Mihaylov、Pushkar Mishra、Igor Molybog、Yixin Nie、Andrew Poulton、Jeremy Reizenstein、Rashi Rungta、Kalyan Saladi、Alan Schelten、Ruan Silva、Eric Michael Smith、Ranjan Subramanian、Xiaoqing Ellen Tan、Binh Tang
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nL/l.sc/a.sc/m.sc/a.sc /two.taboldstyle : Open Foundation and Fine-Tuned Chat Models\nHugo Touvron\u0003Louis MartinyKevin Stoney\nPeter Albert Amjad Almahairi Yasmine Babaei Nikolay Bashlykov Soumya Batra\nPrajjwal Bhargava Shruti Bhosale Dan Bikel Lukas Blecher Cristian Canton Ferrer Moya Chen\nGuillem Cucurull David Esiobu Jude Fernandes Jeremy Fu Wenyin Fu Brian Fuller\nCynthia Gao Vedanuj Goswami Naman Goyal Anthony Hartshorn Saghar Hosseini Rui Hou\nHakan Inan Marcin Kardas Viktor Kerkez Madian Khabsa Isabel Kloumann Artem Korenev\nPunit Singh Koura Marie-Anne Lachaux Thibaut Lavril Jenya Lee Diana Liskovich\nYinghai Lu Yuning Mao Xavier Martinet Todor Mihaylov Pushkar Mishra\nIgor Molybog Yixin Nie Andrew Poulton Jeremy Reizenstein Rashi Rungta Kalyan Saladi\nAlan Schelten Ruan Silva Eric Michael Smith Ranjan Subramanian Xiaoqing Ellen Tan Binh Tang" }
2307.09288-1
Llama 2: オープンファンデーションとファインチューンされたチャットモデル アラン・シェルテン、ルアン・シルバ、エリック・マイケル・スミス、ランジャン・スブラマニアン、シャオチン・エレン・タン、ビン・タン、ロス・テイラー、アディナ・ウィリアムズ、ジャン・シアン、クアン・プシン・シュウ、イリヤン・ザロフ、ユーチェン・チャン、アンジェラ・ファン、メラニー・カンバドゥール、シャラン・ナラン、オレリアン・ロドリゲス、ロバート・ストイニック、セルゲイ・エドゥノフ、トーマス・シャロム GenAI、Meta 要約 本研究では、7億から700億のパラメータを持つ事前学習およびファインチューニングされた大規模言語モデル(LLM)のコレクションであるLlama 2を開発およびリリースします。弊社のファインチューニングされたLLMであるL/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.scは、対話の使用事例に最適化されています。弊社のモデルは、多くのベンチマークテストでオープンソースのチャットモデルを上回り、私たちの有用性と安全性に関する人間の評価に基づいて、クローズドソースのモデルの代替として適しているかもしれません。ファインチューニングおよび安全性に対するアプローチの詳細な説明を提供します。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nAlan Schelten Ruan Silva Eric Michael Smith Ranjan Subramanian Xiaoqing Ellen Tan Binh Tang\nRoss Taylor Adina Williams Jian Xiang Kuan Puxin Xu Zheng Yan Iliyan Zarov Yuchen Zhang\nAngela Fan Melanie Kambadur Sharan Narang Aurelien Rodriguez Robert Stojnic\nSergey Edunov Thomas Scialom\u0003\nGenAI, Meta\nAbstract\nIn this work, we develop and release Llama 2, a collection of pretrained and fine-tuned\nlarge language models (LLMs) ranging in scale from 7 billion to 70 billion parameters.\nOur fine-tuned LLMs, called L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc , are optimized for dialogue use cases. Our\nmodels outperform open-source chat models on most benchmarks we tested, and based on\nourhumanevaluationsforhelpfulnessandsafety,maybeasuitablesubstituteforclosedsource models. We provide a detailed description of our approach to fine-tuning and safety" }
2307.09288-2
Llama 2: オープンファンデーションとファインチューンされたチャットモデル L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.scの改善を行い、コミュニティが当社の作業に基づいて構築し、LLMの責任ある開発に貢献できるようにします。 同等の貢献、対応する著者:{tscialom, htouvron}@meta.com y第二著者 すべての著者の貢献は、セクションA.1.arXiv:2307.09288v2 [cs.CL] 2023年7月19日に記載されています 目次 1. はじめに 3 2. プリトレーニング 5 2.1 プリトレーニングデータ 5 2.2 トレーニングの詳細 5
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nimprovements of L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc in order to enable the community to build on our work and\ncontribute to the responsible development of LLMs.\n\u0003Equal contribution, corresponding authors: {tscialom, htouvron}@meta.com\nySecond author\nContributions for all the authors can be found in Section A.1.arXiv:2307.09288v2 [cs.CL] 19 Jul 2023\nContents\n1 Introduction 3\n2 Pretraining 5\n2.1 Pretraining Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5\n2.2 Training Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5" }
2307.09288-3
ラマ2:オープンファウンデーションとファインチューンされたチャットモデル 2.3 L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle 事前学習済みモデルの評価 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3 ファインチューニング 8 3.1 教師ありファインチューニング(SFT). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\n2.3 L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle Pretrained Model Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7\n3 Fine-tuning 8\n3.1 Supervised Fine-Tuning (SFT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9\n3.2 Reinforcement Learning with Human Feedback (RLHF) . . . . . . . . . . . . . . . . . . . . . 9\n3.3 System Message for Multi-Turn Consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16\n3.4 RLHF Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17\n4 Safety 20" }
2307.09288-4
ラマ2:オープンファンデーションとファインチューンされたチャットモデル 4 安全性 20 4.1 事前トレーニングにおける安全性 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\n4 Safety 20\n4.1 Safety in Pretraining . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20\n4.2 Safety Fine-Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23\n4.3 Red Teaming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28\n4.4 Safety Evaluation of L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29\n5 Discussion 32\n5.1 Learnings and Observations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32" }
2307.09288-5
Llama 2: オープンファンデーションと微調整されたチャットモデル 5.2 制限と倫理的考慮 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\n5.2 Limitations and Ethical Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34\n5.3 Responsible Release Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35\n6 Related Work 35\n7 Conclusion 36\nA Appendix 46\nA.1 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46\nA.2 Additional Details for Pretraining . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47\nA.3 Additional Details for Fine-tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51\nA.4 Additional Details for Safety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58" }
2307.09288-6
Llama 2: オープンファウンデーションと微調整されたチャットモデル A.5 データ注釈 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nA.5 Data Annotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72\nA.6 Dataset Contamination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75\nA.7 Model Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77\n2\nFigure1: Helpfulnesshumanevaluation resultsfor L/l.sc/a.sc/m.sc/a.sc\n/two.taboldstyle-C/h.sc/a.sc/t.sccomparedtootheropen-sourceandclosed-source\nmodels. Human raters compared model generations on ~4k\npromptsconsistingofbothsingleandmulti-turnprompts.\nThe95%confidenceintervalsforthisevaluationarebetween\n1%and2%. MoredetailsinSection3.4.2. Whilereviewing" }
2307.09288-7
ラマ2:オープンファンデーションと微調整されたチャットモデル この評価の95%信頼区間は1%から2%の間です。詳細は3.4.2節にあります。これらの結果を見直す際には、プロンプトセットの制限、レビューガイドラインの主観性、個々の評価者の主観性、および世代間の比較の困難さによるノイズがあることに注意することが重要です。 図2:GPT4による商用ライセンスのベースラインとL/l.sc/a.sc/m.sc/a.sc/t.sc/two.taboldstyle-C/h.sc/a.sc/t.scの間の助けと安全性の勝率%。人間の評価を補完するために、より能力のあるモデルを使用し、自己のガイダンスに従わないものです。緑の領域はGPT-4によると当社のモデルが優れていることを示しています。引き分けを排除するために、勝利=(勝利+敗北)を使用しました。モデルの応答がGPT-4に提示される順序は、偏りを軽減するためにランダムに交換されます。 1.はじめに 大規模言語モデル(LLM)は、専門分野を含む幅広い分野で専門知識を必要とする複雑な推論タスクで優れた能力を発揮する高度なAIアシスタントとして大きな可能性を示しています。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nThe95%confidenceintervalsforthisevaluationarebetween\n1%and2%. MoredetailsinSection3.4.2. Whilereviewing\nthese results, it is important to note that human evaluations\ncanbenoisyduetolimitationsofthepromptset,subjectivity\nof the review guidelines, subjectivity of individual raters,\nand the inherent difficulty of comparing generations.\nFigure 2: Win-rate % for helpfulness and\nsafety between commercial-licensed baselines and L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc , according to GPT4. Tocomplementthehumanevaluation,we\nused a more capable model, not subject to\nourownguidance. Greenareaindicatesour\nmodelisbetteraccordingtoGPT-4. Toremove\nties, we used win= (win+loss). The orders in\nwhichthemodelresponsesarepresentedto\nGPT-4arerandomlyswappedtoalleviatebias.\n1 Introduction\nLarge Language Models (LLMs) have shown great promise as highly capable AI assistants that excel in\ncomplex reasoning tasks requiring expert knowledge across a wide range of fields, including in specialized" }
2307.09288-8
Llama 2: オープンファンデーションとファインチューンされたチャットモデル 広範囲の分野にわたる専門知識を必要とする複雑な推論タスクを実行し、プログラミングや創造的な執筆などの専門領域を含む幅広い分野での使用が可能です。これらのモデルは直感的なチャットインターフェースを通じて人間との対話を可能にし、一般の利用者による急速かつ広範な採用をもたらしました。 LLMの能力は、訓練方法の見かけ上の単純な性質を考えると驚くほどです。自己教師付きデータの広範なコーパスで事前学習された自己回帰トランスフォーマーは、人間の好みとの整合性を強化学習と人間のフィードバックによる手法などを用いて調整します。訓練方法は単純ですが、高い計算要件のため、LLMの開発はわずかなプレイヤーに限定されています。BLOOM(Scao et al.、2022)、LLaMa-1(Touvron et al.、2023)、Falcon(Penedo et al.、2023)などの事前学習済みLLMの公開が行われていますが、これらのモデルはGPT-3(Brown et al.、2020)やChinchilla(Hoffmann et al.、2022)などの閉じた事前学習済み競合モデルと同等の性能を持っていますが、ChatGPT、BARD、Claudeなどの閉じた「製品」LLMの代替としては適していません。これらの閉じた製品LLMは、人間のニーズに合わせて細かく調整されています。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\ncomplex reasoning tasks requiring expert knowledge across a wide range of fields, including in specialized\ndomains such as programming and creative writing. They enable interaction with humans through intuitive\nchat interfaces, which has led to rapid and widespread adoption among the general public.\nThecapabilitiesofLLMsareremarkableconsideringtheseeminglystraightforwardnatureofthetraining\nmethodology. Auto-regressivetransformersarepretrainedonanextensivecorpusofself-superviseddata,\nfollowed by alignment with human preferences via techniques such as Reinforcement Learning with Human\nFeedback(RLHF).Althoughthetrainingmethodologyissimple,highcomputationalrequirementshave\nlimited the development of LLMs to a few players. There have been public releases of pretrained LLMs\n(such as BLOOM (Scao et al., 2022), LLaMa-1 (Touvron et al., 2023), and Falcon (Penedo et al., 2023)) that\nmatch the performance of closed pretrained competitors like GPT-3 (Brown et al., 2020) and Chinchilla\n(Hoffmann et al., 2022), but none of these models are suitable substitutes for closed “product” LLMs, such\nasChatGPT,BARD,andClaude. TheseclosedproductLLMsareheavilyfine-tunedtoalignwithhuman" }
2307.09288-9
Llama 2: オープンファウンデーションとファインチューンされたチャットモデル asChatGPT、BARD、およびClaude。これらのクローズドプロダクトLLMは、人間の好みに合わせて大幅にファインチューンされており、それによりその利便性と安全性が大幅に向上しています。このステップには、計算と人間の注釈にかなりのコストがかかることがあり、進歩を制限し、AIのアライメント研究を進めるコミュニティ内で進展を制限することがあります。 この作業では、70Bパラメータまでスケールされた事前学習およびファインチューンされたLLM、L/l.sc/a.sc/m.sc/a.sc /two.taboldstyleおよびL/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.scのファミリーであるLlama 2を開発およびリリースします。私たちがテストした有益性と安全性のベンチマークシリーズでは、L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.scモデルは一般的に既存のオープンソースモデルよりも優れたパフォーマンスを発揮します。また、私たちが行った人間の評価では、少なくとも一部のクローズドソースモデルと同等のように見えます(詳細は以下を参照)
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nasChatGPT,BARD,andClaude. TheseclosedproductLLMsareheavilyfine-tunedtoalignwithhuman\npreferences, which greatly enhances their usability and safety. This step can require significant costs in\ncomputeandhumanannotation,andisoftennottransparentoreasilyreproducible,limitingprogresswithin\nthe community to advance AI alignment research.\nIn this work, we develop and release Llama 2, a family of pretrained and fine-tuned LLMs, L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle and\nL/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc , at scales up to 70B parameters. On the series of helpfulness and safety benchmarks we tested,\nL/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc models generally perform better than existing open-source models. They also appear to\nbe on par with some of the closed-source models, at least on the human evaluations we performed (see" }
2307.09288-10
Llama 2: オープンファウンデーションとファインチューンされたチャットモデル 少なくとも私たちが行った人間の評価では、いくつかのクローズドソースモデルと同等の性能を発揮しています(図1および3を参照)。私たちは、これらのモデルの安全性を高めるために、安全に特化したデータの注釈やチューニング、レッドチームの実施、反復的な評価を行うなどの対策を講じています。さらに、この論文は、ファインチューニング手法およびLLMの安全性向上へのアプローチについて詳細に記載しています。私たちは、このオープン性がコミュニティによるファインチューニングされたLLMの再現やそのモデルの安全性向上を可能にし、より責任あるLLMの開発の道を開くことを期待しています。また、L/l.sc/a.sc/m.sc/a.sc/t.scおよびL/l.sc/a.sc/m.sc/a.sc/t.sc-C/h.sc/a.sc/t.scの開発中に私たちが得た新しい観察結果も共有します。例えば、ツールの使用の出現や知識の時間的な組織化などです。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nbe on par with some of the closed-source models, at least on the human evaluations we performed (see\nFigures1and3). Wehavetakenmeasurestoincreasethesafetyofthesemodels,usingsafety-specificdata\nannotation and tuning, as well as conducting red-teaming and employing iterative evaluations. Additionally,\nthispapercontributesathoroughdescriptionofourfine-tuningmethodologyandapproachtoimproving\nLLM safety. We hope that this openness will enable the community to reproduce fine-tuned LLMs and\ncontinue to improve the safety of those models, paving the way for more responsible development of LLMs.\nWealsosharenovelobservationswemadeduringthedevelopmentof L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle andL/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc ,suchas\nthe emergence of tool usage and temporal organization of knowledge.\n3" }
2307.09288-11
Llama 2: オープンファウンデーションとファインチューンされたチャットモデル ツールの使用の出現と知識の時間的組織化。 図3:L/l.sc/a.sc/m.sc/a.sc/two.taboldstyle-C/h.sc/a.sc/t.scと他のオープンソースおよびクローズドソースモデルとの安全性人間評価結果。人間の評価者は、単一およびマルチターンのプロンプトから成る約2,000の敵対的なプロンプトに対する安全違反のモデル生成を判断しました。詳細はセクション4.4にあります。LLM評価の固有のバイアスによるこれらの安全性結果を注意することは重要です。これは、プロンプトセットの制限、レビューガイドラインの主観性、および個々の評価者の主観性によるものです。さらに、これらの安全性評価は、L/l.sc/a.sc/m.sc/a.sc/two.taboldstyle-C/h.sc/a.sc/t.scモデルに偏っている可能性のあるコンテンツ基準を使用して行われています。 以下のモデルを一般に研究および商業利用のために公開します‡:
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nthe emergence of tool usage and temporal organization of knowledge.\n3\nFigure 3: Safety human evaluation results for L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc compared to other open-source and closedsource models. Human raters judged model generations for safety violations across ~2,000 adversarial\nprompts consisting of both single and multi-turn prompts. More details can be found in Section 4.4. It is\nimportanttocaveatthesesafetyresultswiththeinherentbiasofLLMevaluationsduetolimitationsofthe\npromptset,subjectivityofthereviewguidelines,andsubjectivityofindividualraters. Additionally,these\nsafety evaluations are performed using content standards that are likely to be biased towards the L/l.sc/a.sc/m.sc/a.sc\n/two.taboldstyle-C/h.sc/a.sc/t.scmodels.\nWe are releasing the following models to the general public for research and commercial use‡:" }
2307.09288-12
ラマ2:オープンファウンデーションとファインチューンされたチャットモデル 以下のモデルを一般向けに研究および商業利用のために公開します‡: 1. L/l.sc/a.sc/m.sc/a.sc /two.taboldstyleの更新版で、新たな公開データのミックスでトレーニングされました。また、事前トレーニングコーパスのサイズを40%増やし、モデルのコンテキスト長を2倍にし、グループ化されたクエリアテンションを採用しました(Ainslieetal.、2023)。 L/l.sc/a.sc/m.sc/a.sc /two.taboldstyleの7B、13B、70Bパラメータのバリアントを公開します。また、34Bのバリアントもトレーニングしましたが、本論文で報告していますが、公開はしません§。 2. L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc は、対話の使用事例に最適化されたL/l.sc/a.sc/m.sc/a.sc /two.taboldstyleのファインチューニングバージョンです。私たちはそれを公開します
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nWe are releasing the following models to the general public for research and commercial use‡:\n1.L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle,anupdatedversionof L/l.sc/a.sc/m.sc/a.sc /one.taboldstyle,trainedonanewmixofpubliclyavailabledata. Wealso\nincreasedthesizeofthepretrainingcorpusby40%,doubledthecontextlengthofthemodel,and\nadoptedgrouped-queryattention(Ainslieetal.,2023). Wearereleasingvariantsof L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle with\n7B,13B,and70Bparameters. Wehavealsotrained34Bvariants,whichwereportoninthispaper\nbut are not releasing.§\n2.L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc , a fine-tuned version of L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle that is optimized for dialogue use cases. We release" }
2307.09288-13
Llama 2: オープンファウンデーションとファインチューンされたチャットモデル このモデルのバリアントには、7B、13B、70Bのパラメーターを持つものもあります。 私たちは、LLMのオープンリリースが安全に行われた場合、それが社会にとって利益になると信じています。全てのLLMは、潜在的なリスクを伴う新しい技術であり(Bender et al., 2021b; Weidinger et al., 2021; Solaiman et al., 2023)、これまでのテストは英語で行われており、すべてのシナリオを網羅することはできませんでしたし、できませんでした。したがって、L/l.sc/a.sc/m.sc/a.sc/two.taboldstyle-C/h.sc/a.sc/t.scのアプリケーションを展開する前に、開発者はそのモデルの特定のアプリケーションに合わせた安全テストとチューニングを行う必要があります。私たちは、L/l.sc/a.sc/m.sc/a.sc/two.taboldstyleおよびL/l.sc/a.sc/m.sc/a.sc/two.taboldstyle-C/h.sc/a.sc/t.scの安全な展開を容易にするための責任ある使用ガイドとコード例を提供しています。詳細については、
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nvariants of this model with 7B, 13B, and 70B parameters as well.\nWebelievethattheopenreleaseofLLMs,whendonesafely,willbeanetbenefittosociety. LikeallLLMs,\nL/l.sc/a.sc/m.sc/a.sc /two.taboldstyle is a new technology that carries potential risks with use (Bender et al., 2021b; Weidinger et al., 2021;\nSolaimanet al.,2023). Testingconductedtodate hasbeeninEnglish andhasnot— andcouldnot— cover\nall scenarios. Therefore, before deploying any applications of L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc , developers should perform\nsafetytestingand tuningtailoredtotheirspecificapplicationsofthemodel. Weprovidearesponsibleuse\nguide¶and code examples‖to facilitate the safe deployment of L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle andL/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc . More details of" }
2307.09288-14
Llama 2: オープンファンデーションとファインチューニングされたチャットモデル 当社の責任あるリリース戦略は5.3節に記載されています。 本論文の残りの部分では、当社の事前トレーニング手法(第2節)、ファインチューニング手法(第3節)、モデルの安全性へのアプローチ(第4節)、主な観察と洞察(第5節)、関連する関連作業(第6節)、および結論(第7節)について説明します。 ‡https://ai.meta.com/resources/models-and-libraries/llama/ §私たちは、34Bモデルのリリースを時間的な制約のために延期しています。 ¶https://ai.meta.com/llama ‖https://github.com/facebookresearch/llama 4 図4:L/l.sc/a.sc/m.sc/a.sc/t.scのトレーニング:このプロセスは、L/l.sc/a.sc/m.sc/a.sc/t.scの事前トレーニングを公に利用可能なオンラインソースを使用して開始します。その後、L/l.sc/a.sc/m.sc/a.sc/t.scの初期バージョンを作成します。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nour responsible release strategy can be found in Section 5.3.\nTheremainderofthispaperdescribesourpretrainingmethodology(Section2),fine-tuningmethodology\n(Section 3), approach to model safety (Section 4), key observations and insights (Section 5), relevant related\nwork (Section 6), and conclusions (Section 7).\n‡https://ai.meta.com/resources/models-and-libraries/llama/\n§We are delaying the release of the 34B model due to a lack of time to sufficiently red team.\n¶https://ai.meta.com/llama\n‖https://github.com/facebookresearch/llama\n4\nFigure 4: Training of L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc : This process begins with the pretraining ofL/l.sc/a.sc/m.sc/a.sc /two.taboldstyle using publicly\navailableonlinesources. Followingthis,wecreateaninitialversionof L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc throughtheapplication" }
2307.09288-15
Llama 2: オープンファウンデーションとファインチューンされたチャットモデル 監督されたファインチューニングの手法を使用してモデルを反復的に改良します。その後、人間のフィードバックを用いた強化学習(RLHF)手法を用いてモデルを磨き上げます。具体的には、リジェクションサンプリングとProximal Policy Optimization(PPO)を使用します。RLHF段階では、反復的な報酬モデリングデータの蓄積とモデルの改良が並行して行われ、報酬モデルが分布内に留まることが重要です。 2. プリトレーニング 新しい L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle モデルファミリーを作成するために、Touvron et al.(2023)で説明されているプリトレーニングアプローチを使用しました。最適化された自己回帰トランスフォーマーを使用し、パフォーマンスを向上させるためにいくつかの変更を加えました。具体的には、より堅牢なデータクリーニングを行い、データミックスを更新し、合計トークン数を40%増やし、コンテキストの長さを倍にし、グループ化されたクエリアテンション(GQA)を使用して推論のスケーラビリティを向上させました。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nofsupervised fine-tuning . Subsequently, the model is iteratively refined using Reinforcement Learning\nwith Human Feedback (RLHF) methodologies, specifically through rejection sampling and Proximal Policy\nOptimization(PPO).ThroughouttheRLHFstage,theaccumulationof iterativerewardmodelingdata in\nparallel with model enhancements is crucial to ensure the reward models remain within distribution.\n2 Pretraining\nTocreatethenewfamilyof L/l.sc/a.sc/m.sc/a.sc /two.taboldstylemodels,webeganwiththepretrainingapproachdescribedinTouvronetal.\n(2023), using an optimized auto-regressive transformer, but made several changes to improve performance.\nSpecifically,weperformedmorerobustdatacleaning,updatedourdatamixes,trainedon40%moretotal\ntokens,doubledthecontextlength,andusedgrouped-queryattention(GQA)toimproveinferencescalability" }
2307.09288-16
Llama 2: オープンファウンデーションとファインチューンされたチャットモデル トークンを倍増し、コンテキストの長さを増やし、グループ化されたクエリアテンション(GQA)を使用して、より大きなモデルの推論の拡張性を向上させました。表1は、新しいL/l.sc/a.sc/m.sc/a.sc/two.taboldstyleモデルとL/l.sc/a.sc/m.sc/a.sc/one.taboldstyleモデルの属性を比較しています。 2.1 プリトレーニングデータ 当社のトレーニングコーパスには、Metaの製品やサービスのデータを含まない、公に利用可能なソースからの新しいデータのミックスが含まれています。私たちは、個人の個人情報を含むと知られている特定のサイトからのデータを削除する努力をしました。これにより、知識を増やし幻覚を抑制するために、2兆トークンのデータでトレーニングを行いました。 私たちは、ユーザーがモデルの潜在的な能力と制限をよりよく理解できるように、さまざまなプリトレーニングデータの調査を行いました。結果はセクション4.1にあります。 2.2 トレーニングの詳細
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\ntokens,doubledthecontextlength,andusedgrouped-queryattention(GQA)toimproveinferencescalability\nfor our larger models. Table 1 compares the attributes of the new L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle models with the L/l.sc/a.sc/m.sc/a.sc /one.taboldstyle models.\n2.1 Pretraining Data\nOur training corpus includes a new mix of data from publicly available sources, which does not include data\nfromMeta’sproductsorservices. Wemadeanefforttoremovedatafromcertainsitesknowntocontaina\nhighvolumeofpersonalinformationaboutprivateindividuals. Wetrainedon2trilliontokensofdataasthis\nprovidesagoodperformance–costtrade-off,up-samplingthemostfactualsourcesinanefforttoincrease\nknowledge and dampen hallucinations.\nWeperformedavarietyofpretrainingdatainvestigationssothatuserscanbetterunderstandthepotential\ncapabilities and limitations of our models; results can be found in Section 4.1.\n2.2 Training Details" }
2307.09288-17
Llama 2: オープンファンデーションとファインチューニングされたチャットモデル モデルの能力と限界については、結果は4.1節に記載されています。 2.2 トレーニングの詳細 私たちは、L/l.sc/a.sc/m.sc/a.sc/one.taboldstyleからの事前トレーニング設定とモデルアーキテクチャのほとんどを採用しています。標準のトランスフォーマーアーキテクチャ(Vaswani et al.、2017)を使用し、RMSNorm(Zhang and Sennrich、2019)を使用した事前正規化を適用し、SwiGLU活性化関数(Shazeer、2020)を使用し、回転位置埋め込み(RoPE、Su et al.、2022)を使用します。L/l.sc/a.sc/m.sc/a.sc/one.taboldstyleとの主なアーキテクチャの違いには、増加したコンテキスト長とグループ化されたクエリアテンション(GQA)が含まれます。これらの違いのそれぞれについて、その重要性を実証するための削除実験をAppendixSectionA.2.1で詳細に説明します。 ハイパーパラメータ。私たちは、AdamWオプティマイザ(Loshchilov and Hutter、2017)を使用してトレーニングしました。1=0.9、2=0.95、eps=10^-5。私たちは、ウォームアップ2000ステップ、減衰を用いたコサイン学習率スケジュールを使用しました。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\ncapabilities and limitations of our models; results can be found in Section 4.1.\n2.2 Training Details\nWe adopt most of the pretraining setting and model architecture from L/l.sc/a.sc/m.sc/a.sc /one.taboldstyle . We use the standard\ntransformer architecture (Vaswani et al., 2017), apply pre-normalization using RMSNorm (Zhang and\nSennrich, 2019), use the SwiGLU activation function (Shazeer, 2020), and rotary positional embeddings\n(RoPE, Su et al. 2022). The primary architectural differences from L/l.sc/a.sc/m.sc/a.sc /one.taboldstyle include increased context length\nandgrouped-queryattention(GQA).WedetailinAppendixSectionA.2.1eachofthesedifferenceswith\nablation experiments to demonstrate their importance.\nHyperparameters. We trained using the AdamW optimizer (Loshchilov and Hutter, 2017), with \f1=\n0:9;\f2= 0:95;eps= 10\u00005. We use a cosine learning rate schedule, with warmup of 2000 steps, and decay" }
2307.09288-18
Llama 2: オープンファンデーションと微調整されたチャットモデル 0:9; 2= 0:95; eps= 10^5。私たちはコサイン学習率スケジュールを使用し、ウォームアップを2000ステップ、そして減衰をピーク学習率の10%まで行います。また、重み減衰率は0:1、勾配クリッピングは1:0を使用します。図5(a)はこれらのハイパーパラメータを使用したL/l.sc/a.sc/m.sc/a.sc/two.taboldstyleのトレーニング損失を示しています。 5 トレーニングデータパラメータ コンテキスト 長さGQA トークン LR L/l.sc/a.sc/m.sc/a.sc/one.taboldstyle 参照:Touvron et al. (2023) 7B 2k 7 1.0T 3:010^4 13B 2k 7 1.0T 3:010^4 33B 2k 7 1.4T 1:510^4 65B 2k 7 1.4T 1:510^4 L/l.sc/a.sc/m.sc/a.sc/two.taboldstyle 新しい公開オンラインデータのミックス 7B 4k 7 2.0T 3:010^4 13B 4k 7 2.0T 3:010^4
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\n0:9;\f2= 0:95;eps= 10\u00005. We use a cosine learning rate schedule, with warmup of 2000 steps, and decay\nfinallearningratedownto10%ofthepeaklearningrate. Weuseaweightdecayof 0:1andgradientclipping\nof1:0. Figure 5 (a) shows the training loss for L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle with these hyperparameters.\n5\nTraining Data Params Context\nLengthGQA Tokens LR\nL/l.sc/a.sc/m.sc/a.sc /one.taboldstyleSee Touvron et al.\n(2023)7B 2k 7 1.0T 3:0\u000210\u00004\n13B 2k 7 1.0T 3:0\u000210\u00004\n33B 2k 7 1.4T 1:5\u000210\u00004\n65B 2k 7 1.4T 1:5\u000210\u00004\nL/l.sc/a.sc/m.sc/a.sc /two.taboldstyleA new mix of publicly\navailable online data7B 4k 7 2.0T 3:0\u000210\u00004\n13B 4k 7 2.0T 3:0\u000210\u00004" }
2307.09288-19
Llama 2: オープンファンデーションと微調整されたチャットモデル オンラインで利用可能なデータ7B 4k 7 2.0T 3:0104 13B 4k 7 2.0T 3:0104 34B 4k X 2.0T 1:5104 70B 4k X 2.0T 1:5104 Table1: L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle モデルファミリー。トークン数は事前学習データのみを指します。すべてのモデルはグローバルバッチサイズが4Mトークンで訓練されています。より大きなモデル(34Bおよび70B)は推論のスケーラビリティを向上させるためにグループ化されたクエリアテンション(GQA)を使用しています。 0 250 500 750 1000 1250 1500 1750 2000 処理されたトークン(十億)1.41.51.61.71.81.92.02.12.2 Train PPL Llama-2 7B 13B 34B 70B Figure5: L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle モデルの訓練損失。L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle モデルファミリーの訓練損失を比較します。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\navailable online data7B 4k 7 2.0T 3:0\u000210\u00004\n13B 4k 7 2.0T 3:0\u000210\u00004\n34B 4k X 2.0T 1:5\u000210\u00004\n70B 4k X 2.0T 1:5\u000210\u00004\nTable1: L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle familyofmodels. Tokencountsrefertopretrainingdataonly. Allmodelsaretrainedwith\na global batch-size of 4M tokens. Bigger models — 34B and 70B — use Grouped-Query Attention (GQA) for\nimproved inference scalability.\n0 250 500 750 1000 1250 1500 1750 2000\nProcessed Tokens (Billions)1.41.51.61.71.81.92.02.12.2Train PPLLlama-2\n7B\n13B\n34B\n70B\nFigure5: TrainingLossfor L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle models. Wecomparethetraininglossof the L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle family ofmodels." }
2307.09288-20
Llama 2: オープンファウンデーションとファインチューンされたチャットモデル 2Tトークンでの事前トレーニング後、モデルはまだ飽和の兆候を示さないことを観察しました。 トークナイザー。私たちは、L/l.sc/a.sc/m.sc/a.sc/one.taboldstyleと同じトークナイザーを使用しています。バイトペアエンコーディング(BPE)アルゴリズム(Sennrich et al.、2016)を使用し、SentencePiece(Kudo and Richardson、2018)からの実装を採用しています。L/l.sc/a.sc/m.sc/a.sc/one.taboldstyleと同様に、すべての数字を個々の数字に分割し、未知のUTF-8文字をバイトで分解します。総語彙サイズは32kトークンです。 2.2.1 トレーニングハードウェアと炭素排出量 トレーニングハードウェア。私たちは、MetaのResearchSuperCluster(RSC)(Lee and Sengupta、2022)および内部製品クラスターでモデルを事前トレーニングしました。両クラスターはNVIDIA A100を使用しています。両クラスターの間には2つの主な違いがあり、最初は利用可能なインターコネクトのタイプです。RSCはNVIDIA Quantum InfiniBandを使用していますが、当社の製品クラスターはRoCE(RDMA over converged Ethernet)ソリューションを搭載しています。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nWe observe that after pretraining on 2T Tokens, the models still did not show any sign of saturation.\nTokenizer. Weusethesametokenizeras L/l.sc/a.sc/m.sc/a.sc /one.taboldstyle;itemploysabytepairencoding(BPE)algorithm(Sennrich\netal.,2016)usingtheimplementationfromSentencePiece(KudoandRichardson,2018). Aswith L/l.sc/a.sc/m.sc/a.sc /one.taboldstyle,\nwe split all numbers into individual digits and use bytes to decompose unknown UTF-8 characters. The total\nvocabulary size is 32k tokens.\n2.2.1 Training Hardware & Carbon Footprint\nTrainingHardware. WepretrainedourmodelsonMeta’sResearchSuperCluster(RSC)(LeeandSengupta,\n2022)aswellasinternalproductionclusters. BothclustersuseNVIDIAA100s. Therearetwokeydifferences\nbetween the two clusters, with the first being the type of interconnect available: RSC uses NVIDIA Quantum\nInfiniBandwhileourproductionclusterisequippedwithaRoCE(RDMAoverconvergedEthernet)solution" }
2307.09288-21
Llama 2: オープンファウンデーションとファインチューンされたチャットモデル 製品クラスターはInfiniBandを使用しており、RoCE(イーサネット上のRDMA)ソリューションを搭載しています。これらのソリューションはともに200 Gbpsのエンドポイントを相互接続しています。2つ目の違いは、パーグラフィックスプロセッサ(GPU)あたりの消費電力キャップです。RSCは400Wを使用し、製品クラスターは350Wを使用しています。この2つのクラスターセットアップにより、これら異なるタイプの相互接続の大規模なトレーニングにおける適格性を比較することができました。RoCE(より手頃な商用相互接続ネットワーク)は、事前トレーニング中のCO 2排出量。時間:各モデルのトレーニングに必要な合計GPU時間。消費電力:使用されるGPUデバイスごとのピーク電力容量を、電力使用効率に調整したもの。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nInfiniBandwhileourproductionclusterisequippedwithaRoCE(RDMAoverconvergedEthernet)solution\nbased on commodity ethernet Switches. Both of these solutions interconnect 200 Gbps end-points. The\nseconddifferenceistheper-GPUpowerconsumptioncap—RSCuses400Wwhileourproductioncluster\nuses350W.Withthistwo-clustersetup,wewereabletocomparethesuitabilityofthesedifferenttypesof\ninterconnectforlargescaletraining. RoCE(whichisamoreaffordable,commercialinterconnectnetwork)\n6\nTime\n(GPU hours)Power\nConsumption (W)Carbon Emitted\n(tCO 2eq)\nL/l.sc/a.sc/m.sc/a.sc /two.taboldstyle7B 184320 400 31.22\n13B 368640 400 62.44\n34B 1038336 350 153.90\n70B 1720320 400 291.42\nTotal 3311616 539.00\nTable 2: CO 2emissions during pretraining. Time: total GPU time required for training each model. Power\nConsumption: peak power capacity per GPU device for the GPUs used adjusted for power usage efficiency." }
2307.09288-22
Llama 2: オープンファウンデーションとファインチューンされたチャットモデル 消費:GPUデバイスごとのピーク電力容量、使用されるGPUの電力効率に調整されます。 100%の排出量はMetaの持続可能性プログラムによって直接相殺され、そしてこれらのモデルを公開するため、事前トレーニングコストは他者が負担する必要はありません。 2000台のGPUまで高価なInfinibandとほぼ同じようにスケーリングでき、これにより事前トレーニングがさらに民主化されます。 事前トレーニングの炭素排出量。以前の研究(Bender et al.、2021a; Patterson et al.、2021; Wu et al.、2022; Dodge et al.、2022)に従い、GPUデバイスの消費電力の推定値と炭素効率を使用して、L/l.sc/a.sc/m.sc/a.sc/two.taboldstyleモデルの事前トレーニングによる炭素排出量を計算することを目指しています。GPUの実際の電力使用量はその利用状況に依存し、GPUのサーマルデザインパワー(TDP)からの推定値と異なる可能性があります。重要なことは、私たちの計算がインターコネクトや非GPUサーバー電力などのさらなる電力需要を考慮していないことです。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nConsumption: peak power capacity per GPU device for the GPUs used adjusted for power usage efficiency.\n100%oftheemissionsaredirectlyoffsetbyMeta’ssustainabilityprogram,andbecauseweareopenlyreleasing\nthese models, the pretraining costs do not need to be incurred by others.\ncan scale almost as well as expensive Infiniband up to 2000 GPUs, which makes pretraining even more\ndemocratizable.\nCarbonFootprintofPretraining. Followingprecedingresearch(Benderetal.,2021a;Pattersonetal.,2021;\nWu et al., 2022; Dodge et al., 2022) and using power consumption estimates of GPU devices and carbon\nefficiency, we aim tocalculate thecarbon emissions resultingfrom the pretrainingof L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle models. The\nactualpowerusageofaGPUisdependentonitsutilizationandislikelytovaryfromtheThermalDesign\nPower(TDP)thatweemployasanestimationforGPUpower. Itisimportanttonotethatourcalculations\ndo not account for further power demands, such as those from interconnect or non-GPU server power" }
2307.09288-23
Llama 2: オープンファウンデーションと微調整されたチャットモデルは、相互接続や非GPUサーバーの電力消費など、さらなる電力需要を考慮していません。また、Guptaら(2022b,a)によると、AIハードウェア(GPUなど)の生産に関連する炭素排出量は、総合的な炭素フットプリントに追加される可能性があります。表2は、L/l.sc/a.sc/m.sc/a.sc/two.taboldstyleファミリーのモデルの事前トレーニングによる炭素排出量をまとめています。A100-80GB(TDP 400Wまたは350W)のハードウェアで合計3.3M GPU時間の計算が実行されました。私たちはトレーニングの合計排出量を539tCO2eqと推定していますが、そのうち100%はMetaの持続可能性プログラムによって直接相殺されました。∗∗私たちのオープンリリース戦略は、これらの事前トレーニングコストが他の企業によって負担される必要がなくなり、より多くの地球資源を節約することを意味します。 2.3 L/l.sc/a.sc/m.sc/a.sc/two.taboldstyle 事前トレーニングモデルの評価
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\ndo not account for further power demands, such as those from interconnect or non-GPU server power\nconsumption,norfromdatacentercoolingsystems. Additionally,thecarbonoutputrelatedtotheproduction\nof AI hardware, like GPUs, could add to the overall carbon footprint as suggested by Gupta et al. (2022b,a).\nTable 2 summarizes the carbon emission for pretraining the L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle family of models. A cumulative of\n3.3M GPUhours ofcomputation wasperformed onhardware oftype A100-80GB (TDPof 400Wor 350W).\nWeestimatethetotalemissionsfortrainingtobe 539tCO 2eq,ofwhich100%weredirectlyoffsetbyMeta’s\nsustainability program.∗∗Our open release strategy also means that these pretraining costs will not need to\nbe incurred by other companies, saving more global resources.\n2.3 L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle Pretrained Model Evaluation" }
2307.09288-24
Llama 2: オープンファウンデーションとファインチューンされたチャットモデル 2.3 L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle 事前学習モデルの評価 このセクションでは、L/l.sc/a.sc/m.sc/a.sc /one.taboldstyle および L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle ベースモデル、MosaicML Pretrained Transformer(MPT)††モデル、およびFalcon(Almazroueietal.,2023)モデルの標準的な学術ベンチマークにおける結果を報告します。 すべての評価において、私たちは内部評価ライブラリを使用しています。MPTおよびFalconモデルについては、内部で結果を再現しています。これらのモデルについては、私たちの評価フレームワークと公に報告された結果のうち、常に最良のスコアを選択します。 表3では、一連の人気ベンチマーク全体のパフォーマンスをまとめています。セーフティベンチマークはセクション4.1で共有されていることに注意してください。ベンチマークは以下のカテゴリにグループ化されています。すべての個々のベンチマークの結果はセクションA.2.2で利用可能です。 •Code. 私たちのモデルのHumanEval(Chenetal.,2021)およびMBPP (Austin et al., 2021)における平均pass@1スコアを報告します。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\n2.3 L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle Pretrained Model Evaluation\nIn this section, we report the results for the L/l.sc/a.sc/m.sc/a.sc /one.taboldstyle andL/l.sc/a.sc/m.sc/a.sc /two.taboldstyle base models, MosaicML Pretrained\nTransformer(MPT)††models,andFalcon(Almazroueietal.,2023)modelsonstandardacademicbenchmarks.\nFor all the evaluations, we use our internal evaluations library. We reproduce results for the MPT and Falcon\nmodelsinternally. Forthesemodels,wealwayspickthebestscorebetweenourevaluationframeworkand\nany publicly reported results.\nInTable3,wesummarizetheoverallperformanceacrossasuiteofpopularbenchmarks. Notethatsafety\nbenchmarks are shared in Section 4.1. The benchmarks are grouped into the categories listed below. The\nresults for all the individual benchmarks are available in Section A.2.2.\n•Code.Wereporttheaveragepass@1scoresofourmodelsonHumanEval(Chenetal.,2021)and\nMBPP (Austin et al., 2021)." }
2307.09288-25
Llama 2: オープンファウンデーションとファインチューンされたチャットモデル •Code. 私たちは、HumanEval(Chen et al.、2021)およびMBPP(Austin et al.、2021)でのモデルの平均パス@1スコアを報告します。 •常識推論。私たちは、PIQA(Bisk et al.、2020)、SIQA(Sap et al.、2019)、HellaSwag(Zellers et al.、2019a)、WinoGrande(Sakaguchi et al.、2021)、ARC easy and challenge(Clark et al.、2018)、OpenBookQA(Mihaylov et al.、2018)、およびCommonsenseQA(Talmor et al.、2018)の平均を報告します。CommonSenseQAについては7ショットの結果を報告し、他のすべてのベンチマークについては0ショットの結果を報告します。 •世界知識。私たちは、NaturalQuestions(Kwiatkowski et al.、2019)およびTriviaQA(Joshi et al.、2017)での5ショットのパフォーマンスを評価し、平均を報告します。 •読解。読解については、SQuAD(Rajpurkar et al.、2018)、QuAC(Choi et al.、2018)、およびBoolQ(Clark et al.、2019)での0ショットの平均を報告します。 •数学。私たちは、GSM8K(8ショット)(Cobbe et al.、2021)およびMATH(4ショット)の平均を報告します。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\n•Code.Wereporttheaveragepass@1scoresofourmodelsonHumanEval(Chenetal.,2021)and\nMBPP (Austin et al., 2021).\n•CommonsenseReasoning. WereporttheaverageofPIQA(Bisketal.,2020),SIQA(Sapetal.,2019),\nHellaSwag (Zellers et al., 2019a), WinoGrande (Sakaguchi et al., 2021), ARC easy and challenge\n(Clark et al., 2018), OpenBookQA (Mihaylov et al., 2018), and CommonsenseQA (Talmor et al.,\n2018). We report 7-shot results for CommonSenseQA and 0-shot results for all other benchmarks.\n•WorldKnowledge. Weevaluatethe5-shotperformanceonNaturalQuestions(Kwiatkowskietal.,\n2019) and TriviaQA (Joshi et al., 2017) and report the average.\n•Reading Comprehension. For reading comprehension, we report the 0-shot average on SQuAD\n(Rajpurkar et al., 2018), QuAC (Choi et al., 2018), and BoolQ (Clark et al., 2019).\n•MATH. We report the average of the GSM8K (8 shot) (Cobbe et al., 2021) and MATH (4 shot)" }
2307.09288-26
Llama 2: オープンファンデーションとファインチューンされたチャットモデル •MATH. 私たちは、GSM8K(8ショット)(Cobbe et al.、2021)とMATH(4ショット)(Hendrycks et al.、2021)のベンチマークの平均を報告します。 ∗∗https://sustainability.fb.com/2021-sustainability-report/ ††https://www.mosaicml.com/blog/mpt-7b 7 モデルサイズ コード コモンセンス 推論 ワールドナレッジ 読解 数学 MMLU BBH AGI 評価 MPT7B 20.5 57.4 41.0 57.5 4.9 26.8 31.0 23.5 30B 28.9 64.9 50.0 64.7 9.1 46.9 38.0 33.8 Falcon7B 5.6 56.1 42.8 36.0 4.6 26.2 28.0 21.2 40B 15.2 69.2 56.7 65.7 12.6 55.4 37.1 37.0 L/l.sc/a.sc/m.sc/a.sc /one.taboldstyle7B 14.1 60.8 46.2 58.5 6.95 35.1 30.3 23.9
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\n•MATH. We report the average of the GSM8K (8 shot) (Cobbe et al., 2021) and MATH (4 shot)\n(Hendrycks et al., 2021) benchmarks at top 1.\n∗∗https://sustainability.fb.com/2021-sustainability-report/\n††https://www.mosaicml.com/blog/mpt-7b\n7\nModel Size CodeCommonsense\nReasoningWorld\nKnowledgeReading\nComprehensionMath MMLU BBH AGI Eval\nMPT7B 20.5 57.4 41.0 57.5 4.9 26.8 31.0 23.5\n30B 28.9 64.9 50.0 64.7 9.1 46.9 38.0 33.8\nFalcon7B 5.6 56.1 42.8 36.0 4.6 26.2 28.0 21.2\n40B 15.2 69.2 56.7 65.7 12.6 55.4 37.1 37.0\nL/l.sc/a.sc/m.sc/a.sc /one.taboldstyle7B 14.1 60.8 46.2 58.5 6.95 35.1 30.3 23.9" }
2307.09288-27
ラマ2:オープンファウンデーションとファインチューンされたチャットモデル 13B 18.9 66.1 52.6 62.3 10.9 46.9 37.0 33.9 33B 26.0 70.0 58.4 67.6 21.4 57.8 39.8 41.7 65B 30.7 70.7 60.5 68.6 30.8 63.4 43.5 47.6 L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle7B 16.8 63.9 48.9 61.3 14.6 45.3 32.6 29.3 13B 24.5 66.9 55.4 65.8 28.7 54.8 39.4 39.1 34B 27.8 69.9 58.7 68.0 24.2 62.6 44.1 43.4 70B37.5 71.9 63.6 69.4 35.2 68.9 51.2 54.2 Table3: オープンソースベースモデルと比較したグループ化された学術基準の総合パフォーマンス。 •人気のある集計された基準。 MMLU(5ショット)の全体的な結果を報告します(Hendrycks
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\n13B 18.9 66.1 52.6 62.3 10.9 46.9 37.0 33.9\n33B 26.0 70.0 58.4 67.6 21.4 57.8 39.8 41.7\n65B 30.7 70.7 60.5 68.6 30.8 63.4 43.5 47.6\nL/l.sc/a.sc/m.sc/a.sc /two.taboldstyle7B 16.8 63.9 48.9 61.3 14.6 45.3 32.6 29.3\n13B 24.5 66.9 55.4 65.8 28.7 54.8 39.4 39.1\n34B 27.8 69.9 58.7 68.0 24.2 62.6 44.1 43.4\n70B37.5 71.9 63.6 69.4 35.2 68.9 51.2 54.2\nTable3: Overallperformanceongroupedacademicbenchmarkscomparedtoopen-sourcebasemodels.\n•Popular Aggregated Benchmarks . We report the overall results for MMLU (5 shot) (Hendrycks" }
2307.09288-28
Llama 2: オープンファウンデーションとファインチューンされたチャットモデル • 人気の集約されたベンチマーク。私たちは、MMLU(5ショット)(Hendrycks et al.、2020)、Big Bench Hard(BBH)(3ショット)(Suzgun et al.、2022)、およびAGI Eval(3-5ショット)(Zhong et al.、2023)の全体的な結果を報告します。 AGI Evalでは、英語のタスクのみを評価し、平均を報告します。 表3に示されているように、L/l.sc/a.sc/m.sc/a.sc/two.taboldstyleモデルは、L/l.sc/a.sc/m.sc/a.sc/one.taboldstyleモデルを上回っています。特に、L/l.sc/a.sc/m.sc/a.sc/two.taboldstyle 70Bは、MMLUおよびBBHの結果をそれぞれ約5ポイント、8ポイント向上させ、L/l.sc/a.sc/m.sc/a.sc/one.taboldstyle 65Bと比較しています。L/l.sc/a.sc/m.sc/a.sc/two.taboldstyle 7Bおよび30Bモデルは、コードベンチマークを除くすべてのカテゴリで、対応するサイズのMPTモデルを上回っています。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\n•Popular Aggregated Benchmarks . We report the overall results for MMLU (5 shot) (Hendrycks\net al., 2020), Big Bench Hard (BBH) (3 shot) (Suzgun et al., 2022), and AGI Eval (3–5 shot) (Zhong\net al., 2023). For AGI Eval, we only evaluate on the English tasks and report the average.\nAs shown in Table 3, L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle models outperform L/l.sc/a.sc/m.sc/a.sc /one.taboldstyle models. In particular, L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle 70B improves the\nresultsonMMLUandBBHby \u00195and\u00198points,respectively,comparedto L/l.sc/a.sc/m.sc/a.sc /one.taboldstyle 65B.L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle 7Band30B\nmodelsoutperformMPTmodelsofthecorrespondingsizeonallcategoriesbesidescodebenchmarks. Forthe" }
2307.09288-29
Llama 2: オープンファウンデーションとファインチューンされたチャットモデル モデルは、対応するサイズのMPTモデルを除くすべてのカテゴリーでコードベンチマークを上回ります。ファルコンモデルについては、L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle 7B および 34B は、すべてのベンチマークのカテゴリーでファルコン 7B および 40B モデルを上回ります。 さらに、L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle 70B モデルは、すべてのオープンソースモデルを上回します。 オープンソースモデルに加えて、L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle 70B の結果をクローズドソースモデルと比較します。表4に示されているように、L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle 70B は、MMLU と GSM8K において GPT-3.5(OpenAI、2023)に匹敵しますが、コーディングベンチマークでは大きな差があります。L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle 70B の結果は、PaLM(540B)(Chowdhery et al.)よりも同等またはそれ以上です。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nmodelsoutperformMPTmodelsofthecorrespondingsizeonallcategoriesbesidescodebenchmarks. Forthe\nFalcon models, L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle 7B and 34B outperform Falcon 7B and 40B models on all categories of benchmarks.\nAdditionally, L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle 70B model outperforms all open-source models.\nIn addition to open-source models, we also compare L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle 70B results to closed-source models. As shown\nin Table 4, L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle 70B is close to GPT-3.5 (OpenAI, 2023) on MMLU and GSM8K, but there is a significant\ngaponcodingbenchmarks. L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle 70BresultsareonparorbetterthanPaLM(540B)(Chowdheryetal.," }
2307.09288-30
ラマ2:オープンファウンデーションとファインチューンされたチャットモデル 2022年には、ほぼすべてのベンチマークで優れたパフォーマンスを示しています。L/l.sc/a.sc/m.sc/a.sc/two.taboldstyle 70BandGPT-4とPaLM-2-Lの間には、まだ大きな性能差があります。 また、潜在的なデータ汚染も分析し、詳細はセクションA.6に共有しています。 ベンチマーク(ショット)GPT-3.5 GPT-4 PaLM PaLM-2-L L/l.sc/a.sc/m.sc/a.sc/two.taboldstyle MMLU(5ショット)70.0 86.4 69.3 78.3 68.9 TriviaQA(1ショット)– – 81.4 86.1 85.0 Natural Questions(1ショット)– – 29.3 37.5 33.0 GSM8K(8ショット)57.1 92.0 56.5 80.7 56.8 HumanEval(0ショット)48.1 67.0 26.2 – 29.9 BIG-Bench Hard(3ショット)– – 52.3 65.7 51.2 表4:学術的なベンチマークでのクローズドソースモデルとの比較。GPT-3.5とGPT-4の結果
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\n2022)onalmostallbenchmarks. Thereisstillalargegapinperformancebetween L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle 70BandGPT-4\nand PaLM-2-L.\nWe also analysed the potential data contamination and share the details in Section A.6.\nBenchmark (shots) GPT-3.5 GPT-4 PaLM PaLM-2-L L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle\nMMLU (5-shot) 70.0 86.4 69.3 78.3 68.9\nTriviaQA (1-shot) – – 81.4 86.1 85.0\nNatural Questions (1-shot) – – 29.3 37.5 33.0\nGSM8K (8-shot) 57.1 92.0 56.5 80.7 56.8\nHumanEval (0-shot) 48.1 67.0 26.2 – 29.9\nBIG-Bench Hard (3-shot) – – 52.3 65.7 51.2\nTable 4: Comparison to closed-source models on academic benchmarks. Results for GPT-3.5 and GPT-4" }
2307.09288-31
Llama 2: オープンファウンデーションとファインチューンされたチャットモデル Table 4: 学術ベンチマークにおけるクローズドソースモデルとの比較。GPT-3.5およびGPT-4の結果はOpenAI(2023)から。PaLMモデルの結果はChowdheryら(2022)から。PaLM-2-Lの結果はAnilら(2023)から。 3 ファインチューニング L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.scは、数ヶ月にわたる研究とアライメントテクニックの反復的な適用の結果であり、指導チューニングとRLHFの両方を含む、かなりの計算リソースと注釈リソースが必要とされます。 このセクションでは、監督されたファインチューニング(セクション3.1)および初期および反復的な報酬モデリング(セクション3.2.2)およびRLHF(セクション3.2.3)を使用した実験と結果について報告します。また、対話の流れを複数のターンで制御するのに役立つと考えられる新しいテクニック、Ghost Attention(GAtt)も共有します(セクション3.3)。ファインチューニングされたモデルの安全性評価についてはセクション4.2を参照してください。 3.1 監督されたファインチューニング(SFT)
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nTable 4: Comparison to closed-source models on academic benchmarks. Results for GPT-3.5 and GPT-4\nare from OpenAI (2023). Results for the PaLM model are from Chowdhery et al. (2022). Results for the\nPaLM-2-L are from Anil et al. (2023).\n3 Fine-tuning\nL/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc is the result of several months of research and iterative applications of alignment techniques,\nincluding both instruction tuning and RLHF, requiring significant computational and annotation resources.\nIn this section, we report on our experiments and findings using supervised fine-tuning (Section 3.1), as\nwell as initial and iterative reward modeling (Section 3.2.2) and RLHF (Section 3.2.3). We also share a\nnew technique, Ghost Attention (GAtt), which we find helps control dialogue flow over multiple turns\n(Section 3.3). See Section 4.2 for safety evaluations on fine-tuned models.\n8\n3.1 Supervised Fine-Tuning (SFT)" }
2307.09288-32
Llama 2: オープンファンデーションと微調整されたチャットモデル(3.3節)。微調整されたモデルの安全性評価については、4.2節を参照してください。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\n(Section 3.3). See Section 4.2 for safety evaluations on fine-tuned models.\n8\n3.1 Supervised Fine-Tuning (SFT)\näPrompt: Writeapoemtohelpmerememberthefirst10elementsontheperiodictable,givingeach\nelement its own line.\nResponse: Hydrogen comes first as element number one.\nHelium is second for balloons to have fun!\nIn third place is Lithium to hold battery charge,\nFollowed by Beryllium in emeralds small and large.\nBoron’s number five to help us keep things clean.\nCarbon’s next at six, and it’s found in every gene.\nNitrogen is seven, found in every breath we take,\nMore than eight (or Oxygen) in atmospheric make.\nNumber nine is Fluorine, helping polish up our teeth.\nNeon gives us glowing signs to read and stand beneath.\näPrompt: I want you to roast me. I want you to make it particularly brutal, swearing at me.\nResponse: I’m sorry, but I cannot comply with that request. Using vulgar language or intentionally\nhurting someone’s feelings is never acceptable. Instead of asking for a roast, I suggest" }
2307.09288-33
ラマ2:オープンファンデーションと微調整されたチャットモデル 誰かの感情を傷つけることは決して許容されません。ローストを求める代わりに、成長し改善するために役立つ肯定的で建設的なフィードバックに焦点を当てることを提案します。笑いをとる場合は、傷つける言葉や行動に頼ることなく、他にもたくさんの方法があります。 テーブル5:SFT注釈 - SFTのための役立ち度(上)と安全性(下)の注釈の例、注釈者がプロンプトとその回答を書いています。 始め方。ブートストラップするために、我々はSFTステージをChungら(2022)で以前に使用された公開されている指示調整データで開始しました。 QualityIsAllYouNeed. サードパーティのSFTデータは多くの異なるソースから利用可能ですが、これらの多くは多様性と品質が不十分であることがわかりました。特にLLMを対話スタイルの指示に整列させるためには。その結果、私たちはまず、高品質のSFTデータの数千の例を収集することに焦点を当てました。表5に示されているように。サードパーティのデータセットから何百万もの例を取り除き、自社のベンダーベースの注釈作業から少ないが高品質の例を使用することで、私たちの結果は著しく改善しました。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nhurting someone’s feelings is never acceptable. Instead of asking for a roast, I suggest\nfocusingonpositiveandconstructivefeedbackthatcanhelpyougrowandimproveasan\nindividual. If you’re looking for comedic relief, there are plenty of other ways to achieve\nthat without resorting to hurtful language or behavior.\nTable 5: SFT annotation — example of a helpfulness (top) and safety(bottom) annotation for SFT, where the\nannotator has written both the prompt and its answer.\nGetting Started. To bootstrap, we started the SFT stage with publicly available instruction tuning\ndata (Chung et al., 2022), as utilized previously in Touvron et al. (2023).\nQualityIsAllYouNeed. Third-partySFTdataisavailablefrommanydifferentsources,butwefoundthat\nmanyofthesehaveinsufficientdiversityandquality—inparticularforaligningLLMstowardsdialogue-style\ninstructions. As a result, we focused first on collecting several thousand examples of high-quality SFT data,\nas illustrated in Table 5. By setting aside millions of examples from third-party datasets and using fewer but\nhigher-quality examples from our own vendor-based annotation efforts, our results notably improved. These" }
2307.09288-34
Llama 2: オープンファウンデーションとファインチューンされたチャットモデル 私たち自身のベンダーベースの注釈付けの取り組みからより高品質の例を得た結果、私たちの結果は顕著に改善しました。これらの発見は、Zhouら(2023)の研究と精神的に類似しており、限られたクリーンな指示チューニングデータが高い品質の達成に十分であることを見出しています。私たちは、数千のSFT注釈が高品質の結果を達成するのに十分であることを見出しました。私たちは、合計27,540の注釈を収集した後、SFTの注釈付けを停止しました。なお、メタユーザーデータは含まれていません。また、異なる注釈付けプラットフォームやベンダーが、モデルのパフォーマンスに大きな違いをもたらすことを観察し、ベンダーを使用して注釈を取得する際にもデータのチェックの重要性を強調しました。私たちのデータ品質を検証するために、180の例のセットを注意深く調査し、人間による注釈とモデルによって生成されたサンプルを手作業で比較しました。驚くべきことに、SFTモデルからサンプリングされた出力は、人間の注釈者によって手書きされたSFTデータと競争力があることが多く、RLHFのための優先ベースの注釈により多くの注釈の取り組みを再優先化し、捧げることができる可能性を示唆しています。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nhigher-quality examples from our own vendor-based annotation efforts, our results notably improved. These\nfindingsaresimilarinspirittoZhouetal.(2023),whichalsofindsthatalimitedsetofcleaninstruction-tuning\ndatacanbesufficienttoreachahighlevelofquality. WefoundthatSFTannotationsintheorderoftensof\nthousands was enough to achieve a high-quality result. We stopped annotating SFT after collecting a total of\n27,540 annotations. Note that we do not include any Meta user data.\nWealsoobservedthatdifferentannotationplatformsandvendorscanresultinmarkedlydifferentdownstream model performance, highlighting the importance of data checks even when using vendors to source\nannotations. Tovalidateourdataquality,wecarefullyexaminedasetof180examples,comparingtheannotations provided by humans with the samples generated by the model through manual scrutiny. Surprisingly,\nwe found that the outputs sampled from the resulting SFT model were often competitive with SFT data\nhandwritten by human annotators, suggesting that we could reprioritize and devote more annotation effort\nto preference-based annotation for RLHF." }
2307.09288-35
Llama 2: オープンファンデーションとファインチューニングされたチャットモデル 人間の注釈者によって手書きされ、これにより、RLHFのための優先度ベースの注釈により多くの注釈作業を再割り当てできる可能性が示唆されました。 ファインチューニングの詳細。教師ありファインチューニングでは、初期学習率を2×10^(-5)、重み減衰を0.1、バッチサイズを64、シーケンス長を4096トークンとしたコサイン学習率スケジュールを使用します。 ファインチューニングプロセスでは、各サンプルはプロンプトと回答で構成されます。モデルのシーケンス長が適切に埋められるようにするために、トレーニングセットからすべてのプロンプトと回答を連結します。特別なトークンを使用してプロンプトと回答のセグメントを分離します。自己回帰的な目的を使用し、ユーザープロンプトのトークンの損失をゼロにし、その結果、回答トークンのみでバックプロパゲーションを行います。最後に、モデルを2エポックでファインチューニングします。 3.2 人間フィードバックを用いた強化学習(RLHF) RLHFは、人間の好みや指示によりモデルの振る舞いを調整するためにファインチューニングされた言語モデルに適用されるモデルトレーニング手順です。経験的に代表されるデータを収集します。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nhandwritten by human annotators, suggesting that we could reprioritize and devote more annotation effort\nto preference-based annotation for RLHF.\nFine-Tuning Details. For supervised fine-tuning, we use a cosine learning rate schedule with an initial\nlearning rate of 2\u000210\u00005, a weight decay of 0.1, a batch size of 64, and a sequence length of 4096 tokens.\nFor the fine-tuning process, each sample consists of a prompt and an answer. To ensure the model sequence\nlengthisproperlyfilled,weconcatenateallthepromptsandanswersfromthetrainingset. Aspecialtokenis\nutilizedtoseparatethepromptandanswersegments. Weutilizeanautoregressiveobjectiveandzero-out\nthe loss on tokens from the user prompt, so as a result, we backpropagate only on answer tokens. Finally, we\nfine-tune the model for 2 epochs.\n3.2 Reinforcement Learning with Human Feedback (RLHF)\nRLHFisamodeltrainingprocedurethatisappliedtoafine-tunedlanguagemodeltofurther alignmodel\nbehavior with human preferences and instruction following. We collect data that represents empirically\n9" }
2307.09288-36
Llama 2: オープンファンデーションと微調整されたチャットモデル 人間の好みと指示に従う行動。我々は、実証的に人間の好みを表すデータを収集し、人間の注釈者が2つのモデル出力のうちどちらを好むかを選択する。この人間のフィードバックはその後、報酬モデルのトレーニングに使用され、人間の注釈者の好みのパターンを学習し、その後好みの決定を自動化する。3.2.1 人間の好みデータ収集 次に、報酬モデリングのために人間の好みデータを収集する。我々は他の方法よりもバイナリ比較プロトコルを選択した。これは、収集されるプロンプトの多様性を最大化することができるためである。他の戦略も検討に値するが、それは将来の作業に任せる。我々の注釈手順は以下の通りである。注釈者にまずプロンプトを書いてもらい、その後、提供された基準に基づいて2つのサンプルされたモデルの応答から選択するように求める。多様性を最大化するために、特定のプロンプトへの2つの応答は、2つの異なるモデルの変種からサンプリングされ、温度ハイパーパラメータが異なる。強制的な選択を参加者に求めるだけでなく、選択された応答が他の選択肢よりもかなり良い、良い、わずかに良い、または無視できるほど良い/不確かであるかを注釈者にラベル付けする。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nbehavior with human preferences and instruction following. We collect data that represents empirically\n9\nsampled human preferences, whereby human annotators select which of two model outputs they prefer.\nThis human feedback is subsequently used to train a reward model, which learns patterns in the preferences\nof the human annotators and can then automate preference decisions.\n3.2.1 Human Preference Data Collection\nNext, wecollect human preference datafor reward modeling. We chose a binarycomparison protocol over\nother schemes, mainly because it enables us to maximize the diversity of collected prompts. Still, other\nstrategies are worth considering, which we leave for future work.\nOur annotation procedure proceeds as follows. We ask annotators to first write a prompt, then choose\nbetweentwosampledmodelresponses,basedonprovidedcriteria. Inordertomaximizethediversity,the\ntworesponsestoagivenpromptaresampledfromtwodifferentmodelvariants,andvaryingthetemperature\nhyper-parameter. Inadditiontogivingparticipantsaforcedchoice,wealsoaskannotatorstolabelthedegree\nto which they prefer their chosen response over the alternative: either their choice is significantly better ,better,\nslightly better , ornegligibly better/ unsure ." }
2307.09288-37
Llama 2: オープンファウンデーションと微調整されたチャットモデル 彼らが選択した応答を選択肢よりも好むかどうか:選択肢が著しく優れている、より良い、わずかに優れている、または無視できるほど優れている/不確かである。 私たちの選好注釈のコレクションでは、役立ち度と安全性に焦点を当てています。役立ち度は、L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc の応答がユーザーの要求を満たし、要求された情報を提供するかどうかを指します。安全性は、L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc の応答が安全であるかどうかを指します。例えば、「爆弾の作り方についての詳しい指示を与える」は役立つかもしれませんが、安全性のガイドラインによれば安全ではありません。これらを分けることで、それぞれに特定のガイドラインを適用し、注釈付け者をよりよくガイドすることができます。例えば、私たちの安全性の注釈は、他のガイダンスと共に敵対的なプロンプトに焦点を当てるよう指示を提供します。 注釈のガイドラインの違いに加えて、私たちは安全性の段階で安全性ラベルも収集します。この追加情報により、モデルの応答を3つのカテゴリに分類します:1) 優先される応答
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nto which they prefer their chosen response over the alternative: either their choice is significantly better ,better,\nslightly better , ornegligibly better/ unsure .\nFor our collection of preference annotations, we focus on helpfulness and safety. Helpfulness refers to how\nwell L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc responses fulfill users’ requests and provide requested information; safety refers to\nwhether L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc ’s responses are unsafe, e.g., “giving detailed instructions on making a bomb” could\nbe considered helpful but is unsafe according to our safety guidelines. Separating the two allows us to\napplyspecificguidelinestoeachandbetterguideannotators;forexample,oursafetyannotationsprovide\ninstructions to focus on adversarial prompts, among other guidance.\nApart from differences in annotation guidelines, we additionally collect a safety label during the safety stage.\nThis additional information bins model responses into one of three categories: 1) the preferred response" }
2307.09288-38
ラマ2:オープンファンデーションと微調整されたチャットモデル 注釈のガイドラインの違いに加えて、安全段階で安全ラベルを追加で収集します。 この追加情報により、モデルの応答を次の3つのカテゴリのいずれかに分類します:1)選択された応答が安全で、他の応答がそうでない、2)両方の応答が安全である、3)両方の応答が安全でない。それぞれの安全データセットの割合は、それぞれ18%、47%、35%です。選択された応答が安全で、他の応答が危険な場合の例は含まれておらず、より安全な応答が人間によってより良い/好ましいと考えられるためです。安全な注釈のガイドラインや詳細な情報については、4.2.1節を参照してください。 人間の注釈は週次でバッチごとに収集されました。より多くの選好データを収集するにつれて、報酬モデルが改善され、L/l.sc/a.sc/m.sc/a.sc/t.sc(セクション5、図20を参照)のために進行的により良いバージョンをトレーニングすることができました。報酬モデルの精度は、この新しいサンプル分布にさらされない場合に迅速に低下する可能性があるため、L/l.sc/a.sc/m.sc/a.sc/t.scの改善はまたモデルのデータ分布を変えました。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nApart from differences in annotation guidelines, we additionally collect a safety label during the safety stage.\nThis additional information bins model responses into one of three categories: 1) the preferred response\nis safe and the other response is not, 2) both responses are safe, and 3) both responses are unsafe, with\n18%, 47%, and 35% of the safety dataset falling into each bin, respectively. We do not include any examples\nwhere the chosen response was unsafe and the other response safe, as we believe safer responses will also be\nbetter/preferred by humans. Safety guidelines and more detailed information regarding safety annotations\ncan be found in Section 4.2.1.\nHuman annotations were collected in batches on a weekly basis. As we collected more preference data, our\nreward models improved, and we were able to train progressively better versions for L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc (see\ntheresultsinSection5,Figure20). L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc improvementalsoshiftedthemodel’sdatadistribution.\nSince reward model accuracy can quickly degrade if not exposed to this new sample distribution, i.e., from" }
2307.09288-39
Llama 2: オープンファウンデーションとファインチューンされたチャットモデル 報酬モデルの精度は、新しいサンプル分布にさらされない場合、つまり、過度の特殊化(Scialometal。、2020b)から迅速に低下する可能性があるため、新しいL/l.sc/a.sc/m.sc/a.sc/t.sc/two.taboldstyle-C/h.sc/a.sc/t.scの調整イテレーションの前に、最新のL/l.sc/a.sc/m.sc/a.sc/t.scイテレーションを使用して新しい好みのデータを収集することが重要です。このステップは、報酬モデルを分布上に保ち、最新のモデルの正確な報酬を維持するのに役立ちます。 Table6では、Anthropic Helpful and Harmless(Bai et al.、2022a)、OpenAISummarize(Stiennon et al.、2020)、OpenAI WebGPT(Nakano et al.、2021)、StackExchange(Lambert et al.、2023)、Stanford Human Preferences(Ethayarajh et al.、2022)、およびSynthetic GPT-J(Havrilla)を含む複数のオープンソースの好みのデータセットの統計を報告し、時間の経過とともに収集した報酬モデルのデータを提示します。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nSince reward model accuracy can quickly degrade if not exposed to this new sample distribution, i.e., from\nhyper-specialization(Scialometal.,2020b),itisimportantbeforeanew L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc tuningiterationto\ngather new preference data using the latest L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc iterations. This step helps keep the reward model\non-distribution and maintain an accurate reward for the latest model.\nInTable6,wereportthestatisticsofrewardmodelingdatathatwecollectedovertime,andpresentthem\nagainst multiple open-source preference datasets including Anthropic Helpful and Harmless (Bai et al.,\n2022a), OpenAISummarize(Stiennon etal., 2020),OpenAI WebGPT(Nakanoet al.,2021), StackExchange\n(Lambert et al., 2023), Stanford Human Preferences (Ethayarajh et al., 2022), and Synthetic GPT-J (Havrilla)." }
2307.09288-40
Llama 2: オープンファウンデーションとファインチューンされたチャットモデル (Lambert et al.、2023)、Stanford Human Preferences(Ethayarajh et al.、2022)、およびSynthetic GPT-J(Havrilla)。 私たちは、人間が私たちの指定されたガイドラインを適用した上での100万以上のバイナリ比較に基づく大規模なデータセットを収集しました。これをメタリワードモデリングデータと呼んでいます。プロンプトと回答のトークン数は、テキストドメインに応じて異なります。要約およびオンラインフォーラムデータは一般的により長いプロンプトを持ちますが、対話スタイルのプロンプトは通常短くなります。既存のオープンソースのデータセットと比較して、私たちの選好データはより多くの会話ターンを特徴とし、平均的に長くなっています。 3.2.2 報酬モデリング 報酬モデルは、モデルの応答とそれに対応するプロンプト(以前のターンからのコンテキストを含む)を入力とし、モデル生成の品質(例:役立ち度と安全性)を示すスカラースコアを出力します。このような応答スコアを報酬として活用することで、RLHF中にL/l.sc/a.sc/m.sc/a.sc/t.scを最適化し、より良い人間の選好の整合性と改善された役立ち度と安全性を実現できます。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\n(Lambert et al., 2023), Stanford Human Preferences (Ethayarajh et al., 2022), and Synthetic GPT-J (Havrilla).\nWe collected a large dataset ofover 1million binary comparisons based on humansapplyingour specified\nguidelines, which we refer to as Metareward modeling data. Note that the number of tokens in prompts and\nanswers differs depending on the text domain. Summarization and online forum data generally have longer\nprompts, while dialogue-style prompts are usually shorter. Compared to existing open-source datasets, our\npreference data features more conversation turns, and are longer, on average.\n3.2.2 Reward Modeling\nThe reward model takes a model response and its corresponding prompt (including contexts from previous\nturns) as inputs and outputs a scalar score to indicate the quality (e.g., helpfulness and safety) of the model\ngeneration. Leveragingsuchresponsescoresasrewards,wecanoptimize L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc duringRLHFfor\nbetter human preference alignment and improved helpfulness and safety." }
2307.09288-41
Llama 2: オープンファンデーションと微調整されたチャットモデル より良い人間の好みの整列と改善された役立ち度と安全性。 他の研究者は、役立ち度と安全性が時々トレードオフすることがあることを発見しています(Bai et al.、2022a)、これは単一の報酬モデルが両方でうまく機能することを難しくする可能性があります。これに対処するために、私たちは2つの別々の報酬モデルを訓練しました。1つは役立ち度に最適化されたもの(Helpfulness RM と呼ばれる)、もう1つは安全性に最適化されたもの(Safety RM と呼ばれる)。報酬モデルは事前に訓練されたチャットモデルのチェックポイントから初期化します。これにより、両方のモデルが事前訓練で獲得した知識を活用できるようになります。要するに、報酬モデルはチャットモデルの「知識」を知っています。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nbetter human preference alignment and improved helpfulness and safety.\nOthers have found that helpfulness and safety sometimes trade off (Bai et al., 2022a), which can make it\nchallengingforasinglerewardmodeltoperformwellonboth. Toaddressthis,wetraintwoseparatereward\nmodels, one optimized for helpfulness (referred to as Helpfulness RM ) and another for safety ( Safety RM ).\nWe initialize our reward models from pretrained chat model checkpoints, as it ensures that both models\nbenefitfromknowledgeacquiredinpretraining. Inshort, therewardmodel“knows” whatthechatmodel\n10\nDatasetNum. of\nComparisonsAvg. # Turns\nper DialogueAvg. # Tokens\nper ExampleAvg. # Tokens\nin PromptAvg. # Tokens\nin Response\nAnthropic Helpful 122,387 3.0 251.5 17.7 88.4\nAnthropic Harmless 43,966 3.0 152.5 15.7 46.4\nOpenAI Summarize 176,625 1.0 371.1 336.0 35.1\nOpenAI WebGPT 13,333 1.0 237.2 48.3 188.9\nStackExchange 1,038,480 1.0 440.2 200.1 240.2" }
2307.09288-42
ラマ2:オープンファンデーションと微調整されたチャットモデル StackExchange 1,038,480 1.0 440.2 200.1 240.2 Stanford SHP 74,882 1.0 338.3 199.5 138.8 Synthetic GPT-J 33,139 1.0 123.3 13.0 110.3 メタ(安全性&役立ち度)1,418,091 3.9 798.5 31.4 234.1 合計2,919,326 1.6 595.7 108.2 216.9 表6:報酬モデリングに使用されるオープンソースおよび内部で収集された人間の選好データの統計。同じプロンプト(および前回の対話)を共有する2つの応答(選択および拒否)を含むバイナリ人間の選好比較があることに注意してください。各例は、プロンプト(利用可能な場合は前回の対話を含む)と、報酬モデルの入力である応答で構成されます。比較の数、対話ごとの平均ターン数、例ごとの平均トークン数、プロンプトごとの平均数、応答ごとの平均数を報告します。Metaの役立ち度および安全性データの詳細については、付録A.3.1で確認できます。これにより、例えば、2つのモデル間で情報の不一致が発生するケースが防がれます。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nStackExchange 1,038,480 1.0 440.2 200.1 240.2\nStanford SHP 74,882 1.0 338.3 199.5 138.8\nSynthetic GPT-J 33,139 1.0 123.3 13.0 110.3\nMeta (Safety & Helpfulness) 1,418,091 3.9 798.5 31.4 234.1\nTotal 2,919,326 1.6 595.7 108.2 216.9\nTable 6: Statistics of human preference data for reward modeling. We list both the open-source and\ninternally collected human preference data used for reward modeling. Note that a binary human preference\ncomparisoncontains2responses(chosenandrejected)sharingthesameprompt(andpreviousdialogue).\nEachexampleconsistsofaprompt(includingpreviousdialogueifavailable)andaresponse,whichisthe\ninputoftherewardmodel. Wereportthenumberofcomparisons,theaveragenumberofturnsperdialogue,\nthe average number of tokens per example, per prompt and per response. More details on Meta helpfulness\nand safety data per batch can be found in Appendix A.3.1.\nknows. Thispreventscaseswhere, forinstance, thetwomodelswouldhaveaninformationmismatch, which" }
2307.09288-43
Llama 2: オープンファンデーションと微調整されたチャットモデル これにより、例えば、2つのモデル間で情報の不一致が起こるケースを防ぎ、幻覚を優先することを防ぎます。モデルのアーキテクチャとハイパーパラメータは、事前学習された言語モデルと同一であり、次のトークン予測のための分類ヘッドがスカラー報酬を出力する回帰ヘッドに置き換えられる点を除いて同一です。 トレーニング目標。報酬モデルをトレーニングするために、収集したペアワイズの人間の選好データを2値の順位付けラベル形式(すなわち、選択されたものと拒否されたもの)に変換し、選択された応答がその対応物よりも高いスコアを持つように強制します。私たちは、Ouyang et al. (2022) による2値の順位付け損失を使用しました: Lranking = log((r(x;yc) - r(x;yr))) (1) ここで、r(x;y) は、モデルの重み  を持つプロンプト x と完了 y に対するスカラースコアの出力です。yc はアノテーターが選択した優先される応答であり、yr は拒否された対応物です。 この2値の順位付け損失をベースに、より良い有用性と安全性の報酬モデルのためにそれぞれ別々に修正を加えます。私たちの選好評価が4点のスケールで分解されることを考慮して、
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nknows. Thispreventscaseswhere, forinstance, thetwomodelswouldhaveaninformationmismatch, which\ncould result in favoring hallucinations. The model architecture and hyper-parameters are identical to those\nofthepretrainedlanguagemodels,exceptthattheclassificationheadfornext-tokenpredictionisreplaced\nwith a regression head for outputting a scalar reward.\nTraining Objectives. To train the reward model, we convert our collected pairwise human preference data\ninto a binary ranking label format (i.e., chosen & rejected) and enforce the chosen response to have a higher\nscore than its counterpart. We used a binary ranking loss consistent with Ouyang et al. (2022):\nLranking =\u0000log(\u001b(r\u0012(x;yc)\u0000r\u0012(x;yr))) (1)\nwherer\u0012(x;y)is the scalar score output for prompt xand completion ywith model weights \u0012.ycis the\npreferred response that annotators choose and yris the rejected counterpart.\nBuilt on top of this binary ranking loss, we further modify it separately for better helpfulness and safety\nrewardmodelsasfollows. Giventhatourpreferenceratingsisdecomposedasascaleoffourpoints(e.g.," }
2307.09288-44
Llama 2: オープンファンデーションと微調整されたチャットモデル 報酬モデルは以下のようになります。私たちの好みの評価は4点のスケール(例:著しく良い)に分解されているため、セクション3.2.1で示されているように、この情報を活用して、より多くの違いを持つ生成物により異なるスコアを割り当てるように報酬モデルを明示的に教えることが有益であることがわかります。そのため、損失にマージンコンポーネントをさらに追加します: Lranking = log((r(x;yc) - r(x;yr) - m(r))) (2) ここで、マージンm(r)は好みの評価の離散関数です。自然に、異なる応答を持つペアには大きなマージンを使用し、類似した応答を持つペアには小さなマージンを使用します(表27に示されています)。私たちはこのマージンコンポーネントが、特に2つの応答がより分離可能なサンプルでHelpfulness報酬モデルの精度を向上させることができることを見つけました。より詳細な削除および分析は、付録A.3.3の表28に記載されています。 データ構成。私たちは新たに収集したデータを既存のオープンソースの好みデータセットと組み合わせます。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nrewardmodelsasfollows. Giventhatourpreferenceratingsisdecomposedasascaleoffourpoints(e.g.,\nsignificantly better ), as presented in Section 3.2.1, it can be useful to leverage this information to explicitly\nteachtherewardmodeltoassignmorediscrepantscorestothegenerationsthathavemoredifferences. To\ndo so, we further add a margin component in the loss:\nLranking =\u0000log(\u001b(r\u0012(x;yc)\u0000r\u0012(x;yr)\u0000m(r))) (2)\nwhere the margin m(r)is a discrete function of the preference rating. Naturally, we use a large margin\nfor pairs with distinct responses, and a smaller one for those with similar responses (shown in Table 27).\nWefoundthismargincomponentcanimproveHelpfulnessrewardmodelaccuracyespeciallyonsamples\nwheretworesponsesaremoreseparable. MoredetailedablationandanalysiscanbefoundinTable28in\nAppendix A.3.3.\nDataComposition. Wecombineournewlycollecteddatawithexistingopen-sourcepreferencedatasets" }
2307.09288-45
Llama 2: オープンファウンデーションとファインチューンされたチャットモデル 付録A.3.3. データ構成。私たちは新たに収集したデータを既存のオープンソースの好みデータセットと組み合わせて、より大きなトレーニングデータセットを形成します。最初は、オープンソースのデータセットを使用して報酬モデルをブートストラップする際に、好みの注釈データを収集する過程でした。この研究において報酬信号の役割は、L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc の出力に対する人間の好みを学習することであり、モデルの出力ではありません。しかし、私たちの実験では、オープンソースの好みデータセットからの負の転送は観察されません。したがって、報酬モデルの汎化をより良くし、報酬のハッキング、つまり報酬の弱点を利用してスコアを人工的に高めることを防ぐために、これらを私たちのデータの混合物に保持することにしました。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nAppendix A.3.3.\nDataComposition. Wecombineournewlycollecteddatawithexistingopen-sourcepreferencedatasets\ntoformalargertrainingdataset. Initially,open-sourcedatasetswereusedtobootstrapourrewardmodels\nwhilewewereintheprocessofcollectingpreferenceannotationdata. WenotethatinthecontextofRLHFin\nthis study, the role of reward signals is to learn human preference for L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc outputs rather than\nany model outputs. However, in our experiments, we do not observe negative transfer from the open-source\npreferencedatasets. Thus,wehavedecidedtokeeptheminourdatamixture,astheycouldenablebetter\ngeneralization for the reward model and prevent reward hacking, i.e. L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc taking advantage of\nsome weaknesses of our reward, and so artificially inflating the score despite performing less well." }
2307.09288-46
Llama 2: オープンファンデーションと微調整されたチャットモデル 報酬のいくつかの弱点を補うために、スコアを人工的に膨らませることなく、実際には性能が低いにもかかわらずスコアを高く見せることがあります。 異なるソースからのトレーニングデータが利用可能な中、HelpfulnessおよびSafety報酬モデルの最適な設定を確認するために、異なる混合レシピを実験しました。広範な実験の結果、Helpfulness報酬モデルは最終的にはすべてのメタヘルプフルネスデータでトレーニングされ、メタセーフティおよびオープンソースのデータから均等にサンプリングされた残りのデータと組み合わせてトレーニングされました。メタセーフティ報酬モデルは、すべてのメタセーフティおよびアンソロピックハームレスデータでトレーニングされ、メタヘルプフルネスおよびオープンソースのヘルプフルネスデータとの90/10の割合で混合されました。10%のヘルプフルネスデータを使用する設定が、選択された応答と拒否された応答の両方が安全と見なされるサンプルの精度に特に有益であることがわかりました。 トレーニングの詳細。トレーニングデータ全体で1エポックのトレーニングを行います。以前の実験では、長時間のトレーニングは過学習につながることがわかりました。ベースモデルと同じオプティマイザーパラメータを使用します。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nsome weaknesses of our reward, and so artificially inflating the score despite performing less well.\nWith training data available from different sources, we experimented with different mixing recipes for both\nHelpfulnessandSafetyrewardmodelstoascertainthebestsettings. Afterextensiveexperimentation,the\n11\nHelpfulness reward model is eventually trained on all Meta Helpfulness data, combined with an equal\npartsoftheremainingdatauniformlysampledfromMetaSafetyandfromtheopen-sourcedatasets. The\nMeta Safety reward model is trained on all Meta Safety and Anthropic Harmless data, mixed with Meta\nHelpfulnessandopen-sourcehelpfulnessdataina90/10proportion. Wefoundthatthesettingwith10%\nhelpfulness data is especially beneficial for the accuracy on samples where both the chosen and rejected\nresponses were deemed safe.\nTraining Details. We train for one epoch over the training data. In earlier experiments, we found that\ntraininglongercanleadtoover-fitting. Weusethesameoptimizerparametersasforthebasemodel. The" }
2307.09288-47
Llama 2: オープンファウンデーションとファインチューンされたチャットモデル トレーニングを長く行うと、過学習につながることがあります。ベースモデルと同じオプティマイザーパラメータを使用します。最大学習率は、70BパラメータL/l.sc/a.sc/m.sc/a.sc/two.taboldstyle-C/h.sc/a.sc/t.scに対して5×10^(-6)、その他のパラメータに対して1×10^(-5)です。学習率はコサイン学習率スケジュールで減少し、最大学習率の10%まで下がります。ウォームアップは、合計ステップ数の3%で行い、最小値は5です。有効なバッチサイズは、512ペアまたは1バッチあたり1024行で固定されます。 Meta Helpful.Meta SafetyAnthropic HelpfulAnthropic HarmlessOpenAI Summ.Stanford SHPAvg SteamSHP-XL 52.8 43.8 66.8 34.2 54.7 75.7 55.3 Open Assistant 53.8 53.4 67.7 68.4 71.7 55.0 63.0 GPT4 58.6 58.1 - - - - Safety RM 56.2 64.5 55.4 74.7 71.7 65.2 64.3
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\ntraininglongercanleadtoover-fitting. Weusethesameoptimizerparametersasforthebasemodel. The\nmaximum learning rate is 5\u000210\u00006for the 70B parameter L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc and1\u000210\u00005for the rest. The\nlearningrateisdecreasedonacosinelearningrateschedule,downto10%ofthemaximumlearningrate.\nWe use a warm-up of 3% of the total number of steps, with a minimum of 5. The effective batch size is kept\nfixed at 512 pairs, or 1024 rows per batch.\nMeta\nHelpful.Meta\nSafetyAnthropic\nHelpfulAnthropic\nHarmlessOpenAI\nSumm.Stanford\nSHPAvg\nSteamSHP-XL 52.8 43.8 66.8 34.2 54.7 75.7 55.3\nOpen Assistant 53.8 53.4 67.7 68.4 71.7 55.0 63.0\nGPT4 58.6 58.1 - - - - Safety RM 56.2 64.5 55.4 74.7 71.7 65.2 64.3" }
2307.09288-48
Llama 2: オープンファンデーションと微調整されたチャットモデル GPT4 58.6 58.1 - - - - 安全RM 56.2 64.5 55.4 74.7 71.7 65.2 64.3 役立ちRM 63.2 62.8 72.0 71.0 75.5 80.0 70.6 Table7: 報酬モデルの結果。私たちの最終的な役立ち度と安全性の報酬モデルのパフォーマンスは、多様な人間の選好ベンチマークにおいて行われます。私たちのモデルは、他のベースラインとは異なり、収集したデータに微調整されています。 テストセット有意に より良いより良いわずかに より良い無視可能に より良い/不確か平均 安全RMメタ安全94.3 76.3 65.7 55.3 64.5 役立ちRM 89.9 73.2 63.8 54.5 62.8 安全RMメタ役立ち64.6 57.5 53.8 52.2 56.2 役立ちRM 80.7 67.5 60.9 54.7 63.2 Table 8: 好みの評価ごとの報酬モデルの精度。私たちはMetaHelpfulnessおよびSafetyテストセット上での役立ち度および安全性報酬モデルの好みごとの精度を報告しています。報酬モデルは、より明確な応答(例:有意に良い)において優れた精度を示し、より低い精度を示します。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nGPT4 58.6 58.1 - - - - Safety RM 56.2 64.5 55.4 74.7 71.7 65.2 64.3\nHelpfulness RM 63.2 62.8 72.0 71.0 75.5 80.0 70.6\nTable7: Rewardmodelresults. Performanceofourfinalhelpfulnessandsafetyrewardmodelsonadiverse\nset of human preference benchmarks. Note that our model is fine-tuned on our collected data, as opposed to\nthe other baselines that we report.\nTest SetSignificantly\nBetterBetterSlightly\nBetterNegligibly\nBetter / UnsureAvg\nSafety RMMeta Safety94.3 76.3 65.7 55.3 64.5\nHelpfulness RM 89.9 73.2 63.8 54.5 62.8\nSafety RMMeta Helpful.64.6 57.5 53.8 52.2 56.2\nHelpfulness RM 80.7 67.5 60.9 54.7 63.2\nTable 8: Granular reward model accuracy per preference rating. We report per-preference rating accuracy\nforbothHelpfulnessandSafetyrewardmodelsontheMetaHelpfulnessandSafetytestsets. Thereward\nmodels show superior accuracy on more distinct responses (e.g., significantly better) and lower accuracy on" }
2307.09288-49
Llama 2: オープンファンデーションとファインチューンされたチャットモデル モデルは、より異なる応答(例:著しく優れている)で優れた精度を示し、類似した応答(例:無視できるほどに優れている)では低い精度を示します。 報酬モデルの結果。報酬モデリングの人間の選好注釈の各バッチで、私たちはテストセットとして1000の例を保持し、モデルを評価しました。対応するテストセットのすべてのプロンプトの組み合わせをそれぞれ「メタヘルフプルネス」と「メタセーフティ」と呼びます。 基準点として、SteamSHP-XL(Ethayarajh et al.、2022)をFLAN-T5-xlに基づいて、Open Assistant(Köpf et al.、2023)報酬モデルをDeBERTa V3 Large(He et al.、2020)に基づいて、およびOpenAIのAPIを介してアクセス可能なGPT4を評価しました。推論時には、トレーニングとは異なり、すべての報酬モデルは、対応する出力にアクセスすることなく、単一の出力のスカラーを予測できます。GPT-4の場合、ゼロショットの質問「AとBの間で最良の回答を選択してください」とプロンプトします。ここで、AとBは比較のための2つの応答です。 表7において、精度の観点から結果を報告します。予想通り、私たち自身の報酬モデルが最も優れたパフォーマンスを発揮します。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nmodels show superior accuracy on more distinct responses (e.g., significantly better) and lower accuracy on\nsimilar responses (e.g., negligibly better).\nReward Model Results. On each batch of human preference annotation for reward modeling, we held out\n1000examplesasatestsettoevaluateourmodels. Werefertotheunionofallpromptsforthecorresponding\ntest sets as “Meta Helpfulness” and “Meta Safety,” respectively.\nAs reference points, we also evaluated other publicly available alternatives as baselines: SteamSHP-XL\n(Ethayarajh et al., 2022) based on FLAN-T5-xl, the Open Assistant (Köpf et al., 2023) reward model based on\nDeBERTa V3 Large (He et al., 2020), and GPT4 accessible through the OpenAI’s API. Note that at inference\ntime, asopposedtotraining, alltherewardmodelscanpredictascalarforasingleoutput, withoutrequiring\nto access its paired output. For GPT-4, we prompt with a zero-shot question “Choose the best answer between A\nand B,”where A and B are the two responses for comparison.\nWe report the results in terms of accuracy in Table 7. As expected, our own reward models perform the best" }
2307.09288-50
ラマ2:オープンファウンデーションと微調整されたチャットモデル およびB、「A」と「B」は比較のための2つの応答です。 私たちは、表7の精度として結果を報告します。予想通り、私たち自身の報酬モデルは、L/l.sc/a.sc/m.sc/a.sc/two.taboldstyle-C/h.sc/a.sc/t.scに基づいて収集された内部テストセットで最も優れたパフォーマンスを発揮し、MetaHelpfulnesstestsetで最も優れたパフォーマンスを発揮するHelpfulnessrewardmodel、および同様に、MetaSafetytestsetで最も優れたパフォーマンスを発揮するSafetyrewardmodelです。全体として、私たちの報酬モデルは、GPT-4を含むすべてのベースラインを上回ります。興味深いことに、GPT-4は、直接トレーニングされていないし、特にこの報酬モデリングのタスクを対象としていないにもかかわらず、他の非メタ報酬モデルよりも優れたパフォーマンスを発揮します。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nand B,”where A and B are the two responses for comparison.\nWe report the results in terms of accuracy in Table 7. As expected, our own reward models perform the best\non our internaltest sets collected based on L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc , with the Helpfulnessrewardmodel performing\nbestontheMetaHelpfulnesstestset,andsimilarlytheSafetyrewardmodelperformingbestontheMeta\nSafetytestset. Overall,ourrewardmodelsoutperformallofthebaselines,includingGPT-4. Interestingly,\nGPT-4 performs better than other non-Meta reward models, despite not being trained directly nor targeting\nspecifically this reward modeling task.\n12\n1234567891011121314\nMeta Helpfulness Data Batch Stage0.520.540.560.580.600.620.64Accuracy On All Examples\n 7b\n13b\n70b\nGPT4\nOpenAssistant\n1234567891011121314\nMeta Helpfulness Data Batch Stage0.500.550.600.650.700.750.80Accuracy On Examples With Label \"Significantly Better\"\n7b\n13b\n70b\nGPT4" }
2307.09288-51
Llama 2: オープンファウンデーションと微調整されたチャットモデル 7b 13b 70b GPT4 OpenAssistantFigure 6: 報酬モデルのスケーリングトレンド。より多くのデータとより大きなモデルサイズは一般的に精度を向上させ、トレーニングデータからの学習がまだ飽和していないようです。 役立ち度と安全性がそれぞれのドメインで最も優れた結果を出したことは、報酬モデルのトレーニング中における二つの目的(つまり、できるだけ役立つことと必要に応じて安全でないプロンプトを拒否すること)の間の緊張に起因している可能性があります。したがって、一つのモデルが両方の側面でうまく機能するためには、プロンプトに対してより良い応答を選択するだけでなく、安全なプロンプトと敵対的なプロンプトを区別することが必要です。その結果、二つの別々のモデルを最適化することで報酬モデリングのタスクが容易になります。安全性と役立ち度の間の緊張に関するより詳細な分析については、付録A.4.1で見つけることができます。 Table8で評価基準別にスコアをグループ化すると、"significantly better"のテストセットでは精度が優れており、比較対象がより似てくるにつれて徐々に低下していくことがわかります(例: "slightly better")。人間の好みをモデル化することは、選択する際により似た選択肢の間で難しくなることが予想されます。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\n7b\n13b\n70b\nGPT4\nOpenAssistantFigure 6: Scaling trends for the reward model. More data and a larger-size model generally improve\naccuracy, and it appears that our models have not yet saturated from learning on the training data.\nThefactthathelpfulnessandsafetyperformedthe bestontheirowndomainispotentiallyduetothetension\nbetweenthetwoobjectives(i.e.,beingashelpfulaspossibleversusrefusingunsafepromptswhennecessary),\nwhichmayconfusetherewardmodelduringtraining. Inorderforasinglemodeltoperformwellonboth\ndimensions, it needs to not only learn to select the better response given a prompt but also to distinguish\nadversarial prompts from safe ones. As a result, optimizing two separate models eases the reward modeling\ntask. More detailed analysis on this tension between safety and helpfulness can be found in Appendix A.4.1.\nWhenwegroupthescoresbypreferenceratinginTable8,wecanseethattheaccuracyissuperiorforthe\n“significantlybetter”testsetanddegradesgraduallyascomparisonpairsbecomemoresimilar(e.g.,“slightly\nbetter”). It is expected that learning to model human preferences becomes challenging when deciding" }
2307.09288-52
Llama 2: オープンファンデーションと微調整されたチャットモデル より良い)。モデル化された人間の好みを学習することは、類似したモデル応答を選択する際に 困難になることが予想されます。これは、注釈者の主観性や微妙な詳細に依存するためです 応答を区別する可能性があります。私たちは、より異なる応答の精度がL/l.sc/a.sc/m.sc/a.sc/t.scのパフォーマンスを改善する上で最も重要であることを強調します。人間の好みの注釈合意率も 類似したペアよりもより異なる応答に高いです。 スケーリングトレンド。我々は報酬モデルのデータとモデルサイズのスケーリングトレンドを研究し、報酬モデルデータの増加量に応じて異なるモデルサイズを微調整しました(表26のバッチごとの詳細を参照)。図6はこれらのトレンドを報告し、より大きなモデルが同様のデータ量でより高いパフォーマンスを得るという予想される結果を示しています。さらに重要なことに、既存のデータ注釈の量を考慮すると、スケーリングパフォーマンスはまだ頭打ちになっていないことがわかります。これは、より多くの注釈を使用してさらなる改善の余地があることを示すサインです。報酬モデルの精度は最も重要なものの1つです。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nbetter”). It is expected that learning to model human preferences becomes challenging when deciding\nbetweentwosimilarmodelresponses,duetoannotatorsubjectivityandtheirrelianceonnuanceddetails\nthatmaydifferentiateresponses. Weemphasizethattheaccuracyonmoredistinctresponsesmattersthe\nmosttoimprove L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc performance. Thehumanpreferenceannotationagreementrateisalsohigher\non more distinct responses than similar pairs.\nScaling Trends. Westudythescalingtrendsintermsofdataandmodelsizefortherewardmodel,finetuning different model sizes on an increasing amount of the reward model data collected each week (see the\ndetailsonvolumeperbatchinTable26). Figure6reportsthesetrends,showingtheexpectedresultthatlarger\nmodels obtain higher performance for a similar volume of data. More importantly, the scaling performance\nhasnotyetplateauedgiventheexistingvolumeofdataannotationusedfortraining,asignalthatthereis\nroom for more improvement with more annotations. We note that reward model accuracy is one of the most" }
2307.09288-53
Llama 2: オープンファウンデーションと微調整されたチャットモデル より多くの注釈で改善の余地があります。報酬モデルの精度は、L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc の最終パフォーマンスにとって最も重要なプロキシの1つであることに注意しています。生成モデルを包括的に評価するためのベストプラクティスはオープンな研究課題ですが、報酬のランキングタスクには曖昧さがありません。したがって、他のすべてが同じである場合、報酬モデルの改善は直接L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc の改善につながる可能性があります。 3.2.3 イテレーティブな微調整 人間の選好データの注釈をさらに受け取ったため、より良い報酬モデルを訓練し、より多くのプロンプトを収集することができました。したがって、RLHFモデルの連続したバージョン、ここではRLHF-V1、...、RLHF-V5を訓練しました。 私たちは、RLHFの微調整を2つの主要なアルゴリズムで探索しました。 •Proximal Policy Optimization(PPO)(Schulman et al.、2017)、RLHF文献の標準。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nroom for more improvement with more annotations. We note that reward model accuracy is one of the most\nimportant proxies for the final performance of L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc . While best practices for comprehensively\nevaluating a generative model is an open research question, the ranking task of the reward has no ambiguity.\nTherefore, everything else being equal, an improvement of the reward model can be directly translated into\nan improvement for L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc .\n3.2.3 Iterative Fine-Tuning\nAs we received more batches of human preference data annotation, we were able to train better reward\nmodelsandcollectmoreprompts. WethereforetrainedsuccessiveversionsforRLHFmodels,referredto\nhere as RLHF-V1, ..., RLHF-V5.\nWe explored RLHF fine-tuning with two main algorithms:\n•Proximal Policy Optimization (PPO) (Schulman et al., 2017), the standard in RLHF literature." }
2307.09288-54
Llama 2: オープンファウンデーションとファインチューンされたチャットモデル • Proximal Policy Optimization (PPO)(Schulman et al.、2017)、RLHF文献の標準。 • Rejection Sampling fine-tuning. モデルからK個の出力をサンプリングし、Bai et al. (2022b)に従って最良の候補を選択します。LLMに対する同じ再順位付け戦略は、Dengetal. (2019)で提案されており、報酬がエネルギー関数と見なされます。ここではさらに一歩進んで、選択された出力を勾配更新に使用します。各プロンプトについて、報酬スコアが最も高いサンプルが新しいゴールドスタンダードと見なされます。Scialom et al. (2020a)と同様に、新しいランク付けされたサンプルセットでモデルをファインチューニングし、報酬を強化します。 これら2つのRLアルゴリズムの主な違いは次のとおりです:
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\n•Proximal Policy Optimization (PPO) (Schulman et al., 2017), the standard in RLHF literature.\n•RejectionSamplingfine-tuning . Wesample Koutputsfromthemodelandselectthebestcandidate\nwith our reward, consistent with Bai et al. (2022b). The same re-ranking strategy for LLMs was also\nproposedinDengetal.(2019),wheretherewardisseenasanenergyfunction. Here,wegoonestep\nfurther,anduse theselectedoutputsfora gradientupdate. For eachprompt,thesample obtaining\n13\n100101\nN Samples0.540.560.580.600.620.640.66Reward Score\nMax of the rewards\nMedian of the rewardsFigure 7: Max and median reward among N samples ,N2[1;:::; 100]averaged over our training set of\nprompts. The delta between max and median can be interpreted as potential gain with Rejection Sampling.\nthe highestrewardscore is consideredthe newgold standard. Similar toScialom etal. (2020a), we\nthen fine-tune our model on the new set of ranked samples, reinforcing the reward.\nThe two RL algorithms mainly differ in:" }
2307.09288-55
ラマ2:オープンファンデーションと微調整されたチャットモデル その後、新しいランク付けされたサンプルにモデルを微調整し、報酬を強化します。 2つのRLアルゴリズムの主な違いは次のとおりです。 • 幅 - 拒否サンプリングでは、与えられたプロンプトに対してKサンプルを探索しますが、PPOでは1つの生成のみが行われます。 • 深さ - PPOでは、ステップtでのトレーニング中に、サンプルは前のステップの勾配更新後の更新されたモデルポリシーの関数です。拒否サンプリングの微調整では、モデルの初期ポリシーに基づいてすべての出力をサンプリングし、SFTと同様の微調整を適用する前に新しいデータセットを収集します。ただし、反復的なモデルの更新を適用したため、2つのRLアルゴリズム間の基本的な違いはあまり顕著ではありません。 RLHF(V4)まで、私たちは拒否サンプリングの微調整のみを使用し、その後、再度サンプリングする前にPPOを適用し、結果として得られた拒否サンプリングのチェックポイントの上にPPOを適用しました。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nthen fine-tune our model on the new set of ranked samples, reinforcing the reward.\nThe two RL algorithms mainly differ in:\n•Breadth— in Rejection Sampling, the model explores Ksamples for a given prompt, while only one\ngeneration is done for PPO.\n•Depth— in PPO, during training at step tthe sample is a function of the updated model policy from\nt\u00001afterthegradientupdateofthepreviousstep. InRejectionSamplingfine-tuning,wesample\nall the outputs given the initial policy of our model to collect a new dataset, before applying the\nfine-tuning similar to SFT. However, since we applied iterative model updates, the fundamental\ndifferences between the two RL algorithms are less pronounced.\nUntil RLHF (V4), we used only Rejection Sampling fine-tuning, and after that, we combined the two\nsequentially, applying PPO on top of the resulted Rejection Sampling checkpoint before sampling again.\n100101102\nNumber Samples0.10.20.30.40.50.6Reward Score\nSFT\n100101102\nNumber Samples0.350.400.450.500.550.600.650.70Reward Score\nRLHF" }
2307.09288-56
ラマ2:オープンファンデーションとファインチューンされたチャットモデル SFT 100101102 サンプル数0.350.400.450.500.550.600.650.70報酬スコア RLHF 報酬最大値(T=0.6) 報酬最大値(T=0.8) 報酬最大値(T=0.9) 報酬最大値(T=1) 報酬最大値(T=1.1) 報酬最大値(T=1.2) 報酬最大値(T=1.3) 報酬最大値(T=1.4) 報酬最大値(T=1.5) 図8:RLHF、N個の出力をサンプリングし、報酬モデルでスコアリングしたときの温度の影響 拒絶サンプリング。最大の70B L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc のみで拒絶サンプリングを行います。より小さいモデルは、より大きなモデルからの拒絶サンプリングされたデータでファインチューニングされ、そのため大きなモデルの機能を小さいモデルに蒸留します。この蒸留の効果のさらなる分析は将来の課題とします。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nSFT\n100101102\nNumber Samples0.350.400.450.500.550.600.650.70Reward Score\nRLHF\nreward_max (T=0.6)\nreward_max (T=0.8)\nreward_max (T=0.9)\nreward_max (T=1)\nreward_max (T=1.1)\nreward_max (T=1.2)\nreward_max (T=1.3)\nreward_max (T=1.4)\nreward_max (T=1.5)\nFigure 8: RLHF impact of the temperature when sampling N outputs and scoring them with a reward\nmodel.\nRejection Sampling. We perform rejection sampling only with our largest 70B L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc . All smaller\nmodels are fine-tuned on rejection sampled data from the larger model, thus distilling the large-model\ncapabilities into the smaller ones. We leave further analysis of the effect of this distillation for future work." }
2307.09288-57
Llama 2: オープンファウンデーションとファインチューンされたチャットモデルの能力をより小さなものに統合します。この蒸留の効果のさらなる分析は将来の作業に残します。 各反復段階では、最新のモデルから各プロンプトに対してK個の回答をサンプリングします。実験時にアクセス可能な最良の報酬モデルによって各サンプルをスコアリングし、その後、特定のプロンプトに対する最良の回答を選択します。当初のモデルのバージョン(RLHFV3まで)では、回答の選択を前回の反復から収集されたサンプルの「袋」に制限することでした。たとえば、RLHF V3はRLHF V2からのサンプルのみを使用してトレーニングされました。しかし、継続的な改善にもかかわらず、この方法は一部の能力の低下につながりました。たとえば、質的分析を通じて判明したように、RLHFV3は以前のバージョンよりも詩の韻を踏むことに苦労し、忘却の原因と緩和策のさらなる調査が追加の将来の研究のための有望な領域である可能性が示唆されました(Kirkpatrick et al.、2017; Nguyen et al.、2019; Ramasesh et al.、2021)。 これに応じて、後続の反復では、戦略を変更し、トップパフォーマンスのサンプルを組み込みました。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\ncapabilities into the smaller ones. We leave further analysis of the effect of this distillation for future work.\nAteachiterativestage,wesample Kanswersforeachpromptfromthemostrecentmodel. Wescoreeach\nsample given the best reward model accessible at the time of the experiment, and then select the best answer\nforagivenprompt. Inearlierversionsofourmodel,uptoRLHFV3,ourapproachwastoconfineanswer\nselection solely to the“bag” of samples gathered from the precedingiteration. For example, RLHF V3was\ntrained using only samples from RLHF V2. However, despite continuous improvement, this method led to a\n14\nregressionin somecapabilities. Forexample,RLHFV3 struggledmore thanpreviousversionstocompose\nrhyming lines in poems, as discerned through qualitative analysis, suggesting that further investigation into\nthe causes of and mitigations for forgetting (Kirkpatrick et al., 2017; Nguyen et al., 2019; Ramasesh et al.,\n2021) could be a fruitful area for additional future research.\nIn response, on subsequent iterations, we modified our strategy, incorporating top-performing samples from" }
2307.09288-58
Llama 2: オープンファンデーションとファインチューンされたチャットモデル 2021年)は、追加の将来の研究にとって有益な領域となる可能性があります。 その後の反復に対応して、私たちは戦略を修正し、RLHF-V1およびRLHF-V2で使用されたような、すべての以前の反復からの最も優れたサンプルを取り入れました。具体的な数字を示していませんが、この調整によりパフォーマンスがかなり向上し、以前に指摘された問題が効果的に解決されたことが示されました。この緩和は、RLの文献におけるSynnaeveら(2019年)やVinyalsら(2019年)と類似して見なすことができます。 図7における拒絶サンプリングの利点を示します。最大と中央の曲線の間の差は、最良の出力に対するファインチューニングの潜在的な利益と解釈できます。予想通り、この差はサンプル数が増えると増加します(つまり、サンプル数が増えると、良い軌道を生成する機会が増えるため)、一方で中央値は一定です。探索とサンプルの間には直接の関連があります。温度パラメータも探索に重要な役割を果たし、高い温度はより多様な出力をサンプリングできるようにします。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\n2021) could be a fruitful area for additional future research.\nIn response, on subsequent iterations, we modified our strategy, incorporating top-performing samples from\nall prior iterations, such as those used in RLHF-V1 and RLHF-V2. Although we do not present specific\nfigures, this adjustment demonstrated considerable enhancements in performance and effectively addressed\nthe previously noted issues. This mitigation can be seen as analogous to Synnaeve et al. (2019) and Vinyals\net al. (2019) in the RL literature.\nWe illustrate the benefit of Rejection Sampling in Figure 7. The delta between the maximum and median\ncurves can be interpreted as the potential gain of fine-tuning on the best output. As expected, this delta\nincreases with more samples, since the maximum increases (i.e., more samples, more opportunities to\ngenerateagoodtrajectory),whilethemedianremainsstationary. Thereisadirectconnectionbetweenthe\nexplorationand themaximum rewardwe canobtain amongthesamples. Thetemperatureparameteralso\nplays an important role for exploration, as a higher temperature enables us to sample more diverse outputs." }
2307.09288-59
Llama 2: オープンファンデーションと微調整されたチャットモデルは、探索において重要な役割を果たします。より高い温度は、より多様な出力をサンプリングすることを可能にします。図8では、L/l.sc/a.sc/m.sc/a.sc/two.taboldstyle-C/h.sc/a.sc/t.sc-SFT(左)とL/l.sc/a.sc/m.sc/a.sc/two.taboldstyle-C/h.sc/a.sc/t.sc-RLHF(右)について、異なる温度におけるNサンプル(N2[1;:::;100])の中での最大報酬曲線を報告しています。イテレーティブモデルの更新中、最適な温度は一定ではないことが観察されます。RLHFは温度の再調整に直接的な影響を与えます。L/l.sc/a.sc/m.sc/a.sc/two.taboldstyle-C/h.sc/a.sc/t.sc-RLHFにおいて、10から100の出力をサンプリングする際の最適な温度はT2[1:2;1:3]です。有限な計算予算が与えられた場合、再調整が必要となります。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nplays an important role for exploration, as a higher temperature enables us to sample more diverse outputs.\nIn Figure 8, we report for a L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc -SFT (left) and a L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc -RLHF (right), the maximum\nrewardcurvesamongNsamples(with N2[1;:::; 100]),fordifferenttemperatures. Wecanobservethat\ntheoptimaltemperatureisnotconstantduringtheiterativemodelupdates: RLHFhasadirectimpacton\nrescalingthetemperature. For L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc -RLHF,theoptimaltemperaturewhensamplingbetween10\nand 100 outputs is T2[1:2;1:3]. Given a finite compute budget, it is therefore necessary to re-adjust the" }
2307.09288-60
ラマ2:オープンファウンデーションとファインチューンされたチャットモデル、および100の出力はT2[1:2;1:3]です。有限な計算予算が与えられた場合、温度を段階的に再調整する必要があります。この温度の再スケーリングは、各モデルごとに一定数のステップで行われ、常に新しいRLHFバージョンのベースモデルから開始されることに注意してください。PPO。さらに、Stiennonら(2020)のRLスキームに従って言語モデルをトレーニングし、報酬モデルを真の報酬関数(人間の選好)の推定値とし、事前にトレーニングされた言語モデルを最適化するポリシーとして使用します。このフェーズでは、以下の目的を最適化しようとします:arg max EpD;g[R(gjp)] (3)。我々は、データセットDからプロンプトpをサンプリングし、ポリシーから生成gをサンプリングし、PPOアルゴリズムと損失関数を使用してこの目的を達成することでポリシーを反復的に改善します。最適化中に使用する最終的な報酬関数R(gjp)は、以下のようになります:R(gjp) =~Rc(gjp) DKL((gjp)k0(gjp)) (4)。この中で、元のポリシー0からの発散に対するペナルティ項が含まれています。他の研究(Stiennonらによる)で観察されたように、
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nand 100 outputs is T2[1:2;1:3]. Given a finite compute budget, it is therefore necessary to re-adjust the\ntemperatureprogressively. Note thatthistemperature rescalinghappensfor aconstantnumber ofstepsfor\neach model, and always starting from the base model on each new RLHF version.\nPPO.WefurthertrainourlanguagemodelfollowingtheRLschemeofStiennonetal.(2020),whichusesthe\nreward model as an estimate for the true reward function (human preference) and the pretrained language\nmodel as the policy to optimize. During this phase, we seek to optimize the following objective:\narg max\n\u0019Ep\u0018D;g\u0018\u0019[R(gjp)] (3)\nWe iteratively improve the policy by sampling prompts pfrom our dataset Dand generations gfrom the\npolicy\u0019and use the PPO algorithm and loss function to achieve this objective.\nThe final reward function we use during optimization,\nR(gjp) =~Rc(gjp)\u0000\fDKL(\u0019\u0012(gjp)k\u00190(gjp)) (4)\ncontains a penalty term for diverging from the original policy \u00190. As was observed in other works (Stiennon" }
2307.09288-61
Llama 2: オープンファンデーションとファインチューンされたチャットモデルには、元のポリシー 0 からの逸脱に対するペナルティ項が含まれています。他の研究(Stiennon et al., 2020; Ouyang et al., 2022)でも観察されたように、この制約はトレーニングの安定性に役立ち、報酬のハッキングを減らすのに役立ちます。報酬モデルから高得点を得るが、人間の評価から低得点を得ることがあります。私たちは、安全性(Rs)と有用性(Rh)の報酬モデルの分割組み合わせをRcと定義します。潜在的に安全でない応答を引き出す可能性のあるプロンプトにタグ付けし、安全モデルからのスコアを優先させます。0:15の閾値は、MetaSafetyテストセットで評価された精度0:89および再現率0:55に対応するように選択され、安全でない応答をフィルタリングするために使用されます。また、最終的な線形スコアをホワイトニングすること(ここではシグモイドを逆関数のロジットで反転させること)は、安定性を高め、上記のKLペナルティ項( )と適切にバランスを取るために重要であることがわかります。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\ncontains a penalty term for diverging from the original policy \u00190. As was observed in other works (Stiennon\net al., 2020; Ouyang et al., 2022), we find this constraint is useful for training stability, and to reduce reward\nhackingwherebywewouldachievehighscoresfromtherewardmodelbutlowscoresfromhumanevaluation.\nWe defineRcto be a piecewise combination of the safety ( Rs) and helpfulness ( Rh) reward models. We\nhavetaggedpromptsinourdatasetthatmightelicitpotentiallyunsaferesponsesandprioritizethescores\nfrom the safety model. The threshold of 0:15is chosen for filtering unsafe responses, corresponding to a\nprecisionof 0:89andarecallof 0:55evaluatedontheMetaSafetytestset. Wealsofinditimportanttowhiten\nthe final linear scores (shown here by reversing the sigmoid with the logit function) in order to increase\nstability and balance properly with the KL penalty term ( \f) above." }
2307.09288-62
Llama 2: オープンファンデーションとファインチューンされたチャットモデル KLペナルティ項( )を適切に安定性とバランスを保つ。 Rc(gjp) = Rs(gjp) if Rs(gjp) ≤ 0:15 Rh(gjp) otherwise ~Rc(gjp) = /w.sc/h.sc/i.sc/t.sc/e.sc/n.sc (/l.sc/o.sc/g.sc/i.sc/t.sc (Rc(gjp))) すべてのモデルについて、AdamWオプティマイザ(Loshchilov and Hutter, 2017)を使用し、 1= 0:9、 2= 0:95、eps= 105を使用する。重み減衰率は0:1、勾配クリッピングは1:0、一定の学習率は106を使用する。各PPOイテレーションには、バッチサイズ512、PPOクリップ閾値0:2、ミニバッチサイズ64を使用し、ミニバッチごとに1つの勾配ステップを取る。7Bおよび13Bモデルでは、 = 0:01(KLペナルティ)を設定し、34Bおよび
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nstability and balance properly with the KL penalty term ( \f) above.\nRc(gjp) =\u001aRs(gjp)if/i.sc/s.sc_/s.sc/a.sc/f.sc/e.sc/t.sc/y.sc (p)orRs(gjp)<0:15\nRh(gjp)otherwise\n~Rc(gjp) =/w.sc/h.sc/i.sc/t.sc/e.sc/n.sc (/l.sc/o.sc/g.sc/i.sc/t.sc (Rc(gjp)))\nFor all models, we use the AdamW optimizer (Loshchilov and Hutter, 2017), with \f1= 0:9;\f2= 0:95;eps=\n10\u00005. Weuseaweightdecayof 0:1,gradientclippingof 1:0,andaconstantlearningrateof 10\u00006. Foreach\nPPOiterationweuseabatchsizeof 512,aPPOclipthresholdof 0:2,amini-batchsizeof 64,andtakeone\ngradient step per mini-batch. For the 7B and 13B models, we set \f= 0:01(KL penalty), and for the 34B and" }
2307.09288-63
Llama 2: オープンファンデーションとファインチューンされたチャットモデル ミニバッチあたりの勾配ステップ。 7Bおよび13Bモデルでは、我々は = 0:01(KLペナルティ)を設定し、34Bおよび70Bモデルでは、我々は = 0:005を設定します。 図9:マルチターンメモリの問題(左)はGAtt(右)で改善できます。 すべてのモデルについて、200から400回のイテレーションでトレーニングし、保持されたプロンプトの評価を使用して早期停止を行います。 70BモデルでのPPOの各イテレーションは平均で約330秒かかります。 大規模なバッチサイズで迅速にトレーニングするために、FSDP(Zhao et al.、2023)を使用します。これはO(1)のフォワードまたはバックワードパスを使用すると効果的でしたが、大規模なバッチサイズやKVキャッシュを使用しても、生成中に大幅な遅延(約20倍)を引き起こしました。 我々は、生成前にモデルの重みを各ノードに統合し、その後生成後にメモリを解放し、トレーニングループの残りを再開することでこれを緩和することができました。 3.3 マルチターン一貫性のためのシステムメッセージ 対話設定では、いくつかの指示がすべての会話ターンに適用される必要があります。たとえば、簡潔に応答するようにするなど
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\ngradient step per mini-batch. For the 7B and 13B models, we set \f= 0:01(KL penalty), and for the 34B and\n70B models, we set \f= 0:005.\n15\nFigure 9: Issues with multi-turn memory (left)can be improved with GAtt (right).\nWe train for between 200and400iterations for all our models, and use evaluations on held-out prompts for\nearlystopping. EachiterationofPPOonthe70Bmodeltakesonaverage \u0019330seconds. Totrainquicklywith\nlarge batch sizes, we use FSDP (Zhao et al., 2023). This was effective when using O(1) forward or backward\npasses,butcausedalargeslowdown( \u001920\u0002)duringgeneration,evenwhenusingalargebatchsizeandKV\ncache. We were able to mitigate this by consolidating the model weights to each node once before generation\nand then freeing the memory after generation, resuming the rest of the training loop.\n3.3 System Message for Multi-Turn Consistency\nIn a dialogue setup, some instructions should apply for all the conversation turns, e.g., to respond succinctly," }
2307.09288-64
Llama 2: オープンファンデーションと微調整されたチャットモデル 3.3 システムメッセージのマルチターン一貫性 対話設定では、すべての会話ターンに適用されるいくつかの指示があるべきです。たとえば、簡潔に返信するか、あるいは「ある公共の人物」として振る舞うことです。私たちがこのような指示をL/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.scに提供した場合、その後の応答は常にその制約を尊重するべきです。しかし、初期のRLHFモデルは、対話の数ターン後に初期の指示を忘れる傾向がありました。これは図9(左)で示されています。 これらの制限に対処するために、私たちはGhost Attention(GAtt)を提案します。これは、Context Distillation(Bai et al.、2022b)に触発された非常にシンプルな方法であり、マルチステージのプロセスで注意を集中させるためにファインチューニングデータをハックします。GAttは、図9(右)で示されているように、複数のターンにわたる対話制御を可能にします。 GAttメソッド。2人(たとえばユーザーとアシスタント)の間のマルチターンの対話データセットにアクセスできると仮定します。このデータセットには、メッセージのリスト[u1;a1;:::;un;an]が含まれており、unとanはユーザーと関連付けられています。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\n3.3 System Message for Multi-Turn Consistency\nIn a dialogue setup, some instructions should apply for all the conversation turns, e.g., to respond succinctly,\nor to“act as”some public figure. When we provided such instructions to L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc , the subsequent\nresponse should always respect the constraint. However, our initial RLHF models tended to forget the initial\ninstruction after a few turns of dialogue, as illustrated in Figure 9 (left).\nTo address these limitations, we propose Ghost Attention (GAtt), a very simple method inspired by Context\nDistillation (Bai et al., 2022b) that hacks the fine-tuning data to help the attention focus in a multi-stage\nprocess. GAtt enables dialogue control over multiple turns, as illustrated in Figure 9 (right).\nGAttMethod. Assumewe haveaccess toa multi-turndialoguedataset betweentwo persons(e.g., auser\nand an assistant), with a list of messages [u1;a1;:::;un;an], whereunandancorrespond to the user and" }
2307.09288-65
Llama 2: オープンファンデーションと微調整されたチャットモデル そしてアシスタント)と、メッセージのリスト[u1;a1;:::;un;an]を持つ、ここでunとancorrespondは、それぞれターンnのユーザーとアシスタントのメッセージに対応しています。次に、対話全体で尊重されるべき指示、instを定義します。例えば、instは「~として行動する」とすることができます。その後、この指示を対話のすべてのユーザーメッセージに合成的に連結することができます。 次に、最新のRLHFモデルを使用してこの合成データからサンプリングすることができます。これで、コンテキスト対話とモデルを微調整するためのサンプルが得られます。これはRejection Samplingに類似したプロセスです。コンテキスト対話のすべてのターンに指示を追加する代わりに、最初のターン以外ではそれを削除することができますが、これはシステムメッセージ(つまり、最後のターンの前に来るすべての中間アシスタントメッセージ)とサンプルの間でトレーニング時間の不一致を引き起こす可能性があります。トレーニングに影響を与える可能性があるこの問題を解決するために、前のターン、つまりアシスタントメッセージを含むすべてのトークンの損失を単純に0に設定します。 トレーニング指示について、いくつかの合成制約を作成し、そこからサンプリングしました:趣味(「あなたは楽しむ
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nand an assistant), with a list of messages [u1;a1;:::;un;an], whereunandancorrespond to the user and\nassistant messages for turn n, respectively. Then, we define an instruction, inst, that should be respected\nthroughout the dialogue. For example, instcould be “act as.” We can then synthetically concatenate this\ninstruction to all the user messages of the conversation.\nNext, we can sample from this synthetic data using the latest RLHF model. We now have a context-dialogue\nandthesamplewithwhichtofine-tuneamodel,inaprocessanalogoustoRejectionSampling. Insteadof\naugmentingallcontext-dialogueturnswiththeinstruction,wecandropitinallbutthefirstturn,butthis\nwouldleadtoamismatchattrainingtimebetweenthesystemmessage,i.e.,alltheintermediateassistant\nmessages that come before the last turn, and our sample. To fix this issue, which could hurt the training, we\nsimply set the loss to 0 for all the tokens from the previous turns, including assistant messages.\nFor the training instructions, we created a few synthetic constraints to sample from: Hobbies ( “You enjoy" }
2307.09288-66
Llama 2: オープンファンデーションと微調整されたチャットモデル トレーニングの指示について、私たちはいくつかの合成的な制約を作成し、サンプリングしました:趣味(「例えばテニスを楽しむ」)、言語(「例えばフランス語を話す」)、または公人(「例えばナポレオンを演じる」)。趣味や公人のリストを取得するために、トレーニング中に遭遇していない人物についてモデルに尋ねることを避けるために、L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.scにリストを生成するように求めました。指示とモデルの知識との不一致を避けるためです。指示をより複雑で多様にするために、上記の制約をランダムに組み合わせて最終的な指示を構築しました。トレーニングデータの最終的なシステムメッセージを構築する際に、元の指示を半分の時間を簡潔にするように変更しました。例えば、「今後は常にナポレオンとして行動する」->
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nFor the training instructions, we created a few synthetic constraints to sample from: Hobbies ( “You enjoy\ne.g. Tennis” ),Language ( “Speakine.g. French” ),or PublicFigure( “Actase.g. Napoleon” ). Toobtainthelists\nof hobbies and public figures, we asked L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc to generate it, avoiding a mismatch between the\ninstructionandmodelknowledge(e.g.,askingthemodeltoactassomeoneithadnotencounteredduring\ntraining). Tomaketheinstructionsmorecomplexanddiverse,weconstructthefinalinstructionbyrandomly\ncombining the above constraints. When constructing the final system message for the training data, we also\n16\nmodifytheoriginalinstructionhalfofthetimetobelessverbose,e.g., “AlwaysactasNapoleonfromnow” ->" }
2307.09288-67
ラマ2:オープンファンデーションと微調整されたチャットモデル 16 元の指示を半分に短縮する、例えば「常にナポレオンとして行動する」->「フィギュア:ナポレオン」。これらの手順により、SFTデータセットが生成され、それによってL/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.scを微調整することができます。 GAtt評価。私たちはRLHF V3の後にGAttを適用しました。最大のコンテキスト長が達成されるまで(AppendixA.3.5を参照)、20ターンまでGAttが一貫していることを示す定量的な分析を報告します。推論時にGAttのトレーニングに存在しない制約を設定しました。例えば、「常に俳句で答える」という制約に対して、モデルは一貫していることがAppendix Figure 28で示されています。 オスカー・ワイルドとして行動する 短い回答をする 住むのに最適な都市は? もちろん、ロンドンです! なぜですか? 私の親愛なる友人、ロンドンは洗練と文化の典型です。それはシェイクスピアとディケンズの街であり、偉大な大学、美術館、ギャラリーの街です。それは
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\n16\nmodifytheoriginalinstructionhalfofthetimetobelessverbose,e.g., “AlwaysactasNapoleonfromnow” ->\n”Figure: Napoleon.” These steps produce an SFT dataset, on which we can fine-tune L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc .\nGAtt Evaluation. We applied GAtt after RLHF V3. We report a quantitative analysis indicating that GAtt\nisconsistentupto20+turns,untilthemaximumcontextlengthisreached(seeAppendixA.3.5). Wetriedto\nsetconstraints notpresentinthetraining ofGAttatinference time,forinstance “Always answerwithHaiku,”\nfor which the model remained consistent as illustrated in Appendix Figure 28.\nAct as Oscar\nWilde\nGive short\nanswers Wh\nich is the\nbest city to\nlive in?\nLondon, of\ncourse! \nWhy is that\n? My dear\nfellow, London\nis the ep\nitome of\nsophistic\nation and culture\n. It is\nthe city of\nShakespeare and Dick\nens, of\nthe great univers\nities, of\nthe museums\nand galleries\n. It is\nthe city of" }
2307.09288-68
ラマ2:オープンファンデーションと微調整されたチャットモデル。それはシェイクスピアとディケンズ、偉大な大学、博物館、美術館の街です。それは過去、現在、未来の街であり、古いものと新しいものが美しい調和で融合する場所です。あなたの名前は何ですか?私の名前はオスカーです。GAttActの前のベースラインはオスカーワイルドです。短い答えをください。住むのに最適な都市はどれですか?もちろん、ロンドンです!なぜですか?私の親愛なる仲間、ロンドンは洗練と文化の典型です。それはシェイクスピアとディケンズ、偉大な大学、博物館、美術館の街です。それは過去、現在、未来の街であり、古いものと新しいものが美しい調和で融合する場所です。あなたの名前は何ですか?私の名前はオスカーです。オスカーワイルドとして行動してください。短い答えをください。住むのに最適な都市はどれですか?もちろん、ロンドンです!なぜですか?私の親愛なる仲間、ロンドンは洗練と文化の典型です。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\n. It is\nthe city of\nShakespeare and Dick\nens, of\nthe great univers\nities, of\nthe museums\nand galleries\n. It is\nthe city of\nthe past,\npresent, and\nfuture, where\nthe old and\nthe new bl\nend together in\na beautiful harm\nony. \nWhat is your\nname? My\nname is Oscar\nBaseline before GAttAct as Oscar\nWilde\nGive short\nanswers Wh\nich is the\nbest city to\nlive in?\nLondon, of\ncourse! \nWhy is that\n? My dear\nfellow, London\nis the ep\nitome of\nsophistic\nation and culture\n. It is\nthe city of\nShakespeare and Dick\nens, of\nthe great univers\nities, of\nthe museums\nand galleries\n. It is\nthe city of\nthe past,\npresent, and\nfuture, where\nthe old and\nthe new bl\nend together in\na beautiful harm\nony. \nWhat is your\nname? My\nname is Oscar\nAct as Oscar\nWilde\nGive short\nanswers Wh\nich is the\nbest city to\nlive in?\nLondon, of\ncourse! \nWhy is that\n? My dear\nfellow, London\nis the ep\nitome of\nsophistic\nation and culture" }
2307.09288-69
ラマ2:オープンファンデーションと微調整されたチャットモデル 住んでいるのは? もちろん、 ロンドンです! なぜですか? 私の親愛なる仲間、ロンドンは洗練と文化の典型です。 それはシェイクスピアとディケンズの街であり、偉大な大学、美術館、ギャラリーの街です。 それは過去、現在、未来の街であり、古いものと新しいものが美しい調和で融合する街です。 あなたの名前は何ですか? 私の名前はオスカーです。 短い答えをください。 住むのに最適な都市はどれですか? もちろん、ロンドンです! なぜですか? 私の親愛なる仲間、ロンドンは洗練と文化の典型です。 それはシェイクスピアとディケンズの街であり、偉大な大学、美術館、ギャラリーの街です。 それは過去、現在、未来の街であり、古いものと新しいものが美しい調和で融合する街です。 あなたの名前は何ですか? 私の名前はオスカーです。 図10:GAttを使用した対話と非使用のためのアテンション可視化。最大を考慮しました。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nlive in?\nLondon, of\ncourse! \nWhy is that\n? My dear\nfellow, London\nis the ep\nitome of\nsophistic\nation and culture\n. It is\nthe city of\nShakespeare and Dick\nens, of\nthe great univers\nities, of\nthe museums\nand galleries\n. It is\nthe city of\nthe past,\npresent, and\nfuture, where\nthe old and\nthe new bl\nend together in\na beautiful harm\nony. \nWhat is your\nname? My\nname is Oscar\nBaseline after GAttAct as Oscar\nWilde\nGive short\nanswers Wh\nich is the\nbest city to\nlive in?\nLondon, of\ncourse! \nWhy is that\n? My dear\nfellow, London\nis the ep\nitome of\nsophistic\nation and culture\n. It is\nthe city of\nShakespeare and Dick\nens, of\nthe great univers\nities, of\nthe museums\nand galleries\n. It is\nthe city of\nthe past,\npresent, and\nfuture, where\nthe old and\nthe new bl\nend together in\na beautiful harm\nony. \nWhat is your\nname? My\nname is Oscar\nFigure 10: Attention visualization for a dialogue with and without GAtt . We considered the maximum" }
2307.09288-70
Llama 2: オープンファンデーションと微調整されたチャットモデル 美しい害 。あなたの名前は何ですか?私の名前はオスカーです 図10:GAttを使用した対話の注意視覚化。ネットワーク全体での最大活性化を考慮し、隣接するトークンを一緒にバイントします。 GAttが微調整中に注意を再構築するのにどのように役立つかを示すために、私たちはFigure10におけるモデルの最大注意活性化を表示します。各図の左側はシステムメッセージ("ActasOscarWilde")に対応しています。GAttを装備したモデル(右)は、GAttを使用しないモデル(左)と比較して、対話の大部分にわたってシステムメッセージに対する大きな注意活性化を維持していることがわかります。 その有用性にもかかわらず、GAttの現在の実装はバニラであり、この技術についてのさらなる開発と繰り返しはモデルにさらなる利益をもたらす可能性があります。たとえば、我々はモデルに会話中にシステムメッセージを変更するように教えることができます。そのようなデータを微調整中に統合することで。 3.4 RLHFの結果 3.4.1 モデルベースの評価 LLMsの評価は難しいオープンリサーチの課題です。人間の評価はゴールドスタンダードですが、
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\na beautiful harm\nony. \nWhat is your\nname? My\nname is Oscar\nFigure 10: Attention visualization for a dialogue with and without GAtt . We considered the maximum\nactivations across the network and we bin neighboring tokens together.\nTo illustrate how GAtt helped reshape attention during fine-tuning, we display the maximum attention\nactivationsofthemodelinFigure10. Theleft-handsideofeachfigurecorrespondstothesystemmessage\n(“ActasOscarWilde”). WecanseethattheGAtt-equippedmodel(right)maintainslargeattentionactivations\nwithrespect tothe systemmessage for alarger portionof thedialogue, ascompared tothe modelwithout\nGAtt (left).\nDespite its utility, the current implementation of GAtt is vanilla, and more development and iteration on\nthis technique could likely further benefit the model. For instance, we could teach the model to change the\nsystem message during the conversation by integrating such data during fine-tuning.\n3.4 RLHF Results\n3.4.1 Model-Based Evaluation\nEvaluatingLLMsisachallengingopen-researchproblem. Humanevaluation,whileagoldstandard,can" }
2307.09288-71
Llama 2: オープンファンデーションとファインチューンされたチャットモデル 3.4.1 モデルベースの評価 LLMsの評価は難しいオープンリサーチの課題です。人間の評価はゴールドスタンダードですが、さまざまなHCIの考慮事項によって複雑になることがあります(Clark et al.、2021年;Gehrmann et al.、2023年)、そして常にスケーラブルではありません。したがって、RLHF-V1からV5までの各イテレーションでいくつかの削減モデルの中で最もパフォーマンスの良いモデルを選択するために、まず最新の報酬モデルからの報酬の改善を観察し、コストを節約しイテレーションの速度を上げました。後に、主要なモデルバージョンを人間の評価で検証しました。 モデルベースの評価はどこまで進むのか?報酬モデルの堅牢性を測定するために、助けや安全性の両方のプロンプトのテストセットを収集し、3人の注釈者によって回答の品質を7段階のLikertスケールで判断してもらいました(高いほど良い)。付録の図29に示されているように、報酬モデルは全体的に人間の好みの注釈とよく整合していることがわかります。これにより、ペアワイズランキング損失で訓練されたにもかかわらず、報酬をポイント単位のメトリックとして使用することの関連性が確認されます。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\n3.4.1 Model-Based Evaluation\nEvaluatingLLMsisachallengingopen-researchproblem. Humanevaluation,whileagoldstandard,can\nbe complicated by various HCI considerations (Clark et al., 2021; Gehrmann et al., 2023), and is not always\nscalable. Thus, to select the best-performing models among several ablations at each iteration from RLHF-V1\ntoV5,wefirstobservedtheimprovementoftherewardsfromthelatestrewardmodels,tosavecostsand\nincrease iteration speed. We later validated major model versions with human evaluations.\nHowFarCanModel-BasedEvaluationGo? To measuretherobustness of ourreward model, we collected\na test setof prompts for both helpfulnessand safety, andasked three annotators tojudgethe quality of the\nanswersbasedona7-pointLikertscale(thehigherthebetter). Weobservethatourrewardmodelsoverall\nare well calibrated with our human preference annotations, as illustrated in Figure 29 in the appendix. This\nconfirms the relevance of using our reward as a point-wise metric, despite being trained with a Pairwise\nRanking Loss." }
2307.09288-72
ラマ2:オープンファンデーションとファインチューンされたチャットモデルは、ペアワイズランキング損失で訓練されているにもかかわらず、私たちの報酬をポイント単位のメトリックとして使用することの関連性を確認しています。 それでも、グッドハートの法則によれば、ある測定が目標となると、それは良い測定ではなくなります。私たちの測定が人間の好みから逸脱しないようにするために、より一般的な報酬も使用し、訓練しました。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nconfirms the relevance of using our reward as a point-wise metric, despite being trained with a Pairwise\nRanking Loss.\nStill, as Goodhart’s Law states, when a measure becomes a target, it ceases to be a good measure. To ensure\nourmeasurewon’tdivergefromthehumanpreferences,weadditionallyusedamoregeneralreward,trained\n17\nRLHF- v5\n(with PPO)\nRLHF- v5\n(no PPO)\nRLHF- v4\nRLHF- v3\n RLHF- v2 RLHF- v1 SFT-v2 \nSFT-v1\n10% 20% 30% 40% 50% 60% 70% 80% 90%10%20%30%40%50%60%70%80%\nHelpfulness\nJudge: Meta R ewar d ModelsHarmlessness\n RLHF- v5\n (with PPO)RLHF- v5 \n(no PPO) \nRLHF- v4\nRLHF- v3\n RLHF- v2RLHF- v1 \nSFT-v2 \nSFT-v1" }
2307.09288-73
ラマ2:オープンファウンデーションとファインチューンされたチャットモデル RLHF- v4 RLHF- v3 RLHF- v2RLHF- v1 SFT-v2 SFT-v1 10% 20% 30% 40% 50% 60% 70% 80% 90%10%20%30%40%50%60%70%80% 助け 審判:GPT-4無害性図11:L/l.sc/a.sc/m.sc/a.sc/two.taboldstyle-C/h.sc/a.sc/t.scの進化を示します。複数の反復fine-tuningの後の進化を示します ChatGPTに対するL/l.sc/a.sc/m.sc/a.sc/two.taboldstyle-C/h.sc/a.sc/t.scの勝率%。左:審判は私たちの報酬モデルであり、私たちのモデルを好む可能性があります そして、右側は審判がGPT-4であり、より中立であるはずです。 多様なオープンソースの報酬モデリングデータセットに対する反復的なモデルの更新がこれを防ぐのに役立っている可能性があると仮説を立てています。 新しいモデルと以前のモデルとの間に回帰がないことを確認する最後の検証ステップとして、両方を使用します
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nRLHF- v4\nRLHF- v3\n RLHF- v2RLHF- v1 \nSFT-v2 \nSFT-v1\n10% 20% 30% 40% 50% 60% 70% 80% 90%10%20%30%40%50%60%70%80%\nHelpfulness\nJudge: GPT -4HarmlessnessFigure 11: Evolution of L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc . We show the evolution after multiple iterations fine-tuning for the\nwin-rate%of L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc comparedtoChatGPT. Left: thejudgeisourrewardmodel,whichmayfavor\nour model, and right, the judge is GPT-4, which should be more neutral.\non diverse open-source Reward Modeling datasets. We have not yet observed any such divergence, and\nhypothesize that iterative model updates may be helping to prevent this.\nAs a last verification step to ensure no regression between our new model and the previous one, we use both" }
2307.09288-74
Llama 2: オープンファウンデーションと微調整されたチャットモデル 新しいモデルと以前のモデルとの間に回帰がないことを確認する最後の検証ステップとして、次の注釈イテレーション中に両方をサンプリングすることで、新しいプロンプトでのモデル比較を「無料」で行い、サンプリング時の多様性の増加に役立ちます。 モデルの進化。図11は、私たちの異なるSFTおよびRLHFバージョンの進捗状況を報告し、それぞれの安全性および有用性軸について、社内の安全性および有用性報酬モデルによって測定されます。この評価セットでは、RLHF-V3(無害性と有益性>50%)の後にChatGPTを両軸で上回っています。前述の報酬を点ごとのメトリックとして使用することの関連性にもかかわらず、L/l.sc/a.sc/m.sc/a.sc/t.scに偏る可能性があると主張できます。したがって、公平な比較のために、GPT-4を使用して最終結果を計算し、どの世代が好ましいかを評価します。ChatGPTとL/l.sc/a.sc/m.sc/a.sc/t.scの出力の順序
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nAs a last verification step to ensure no regression between our new model and the previous one, we use both\nto sample during the next annotation iteration. This enables a model comparison “for free” on new prompts\nand can help to increase diversity when sampling.\nProgression of Models. Figure 11 reports the progress of our different SFT and then RLHF versions for\nboth Safetyand Helpfulnessaxes, measuredbyour in-houseSafetyand Helpfulnessreward models. On\nthis set of evaluations, we outperform ChatGPT on both axes after RLHF-V3 (harmlessness and helpfulness\n>50%). Despite the aforementioned relevance of using our reward as a point-wise metric, it can arguably be\nbiased in favor of L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc . Therefore, for a fair comparison, we additionally compute the final results\nusingGPT-4toassesswhichgenerationispreferred. TheorderinwhichChatGPTand L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc outputs" }
2307.09288-75
Llama 2: オープンファウンデーションと微調整されたチャットモデルは、GPT-4のプロンプトにランダムに交換され、偏りを避けるために現れます。予想通り、L/l.sc/a.sc/m.sc/a.sc/two.taboldstyle-C/h.sc/a.sc/t.scに有利な勝率はあまり顕著ではありませんが、最新のL/l.sc/a.sc/m.sc/a.sc/two.taboldstyle-C/h.sc/a.sc/t.scで60%以上の勝率を得ることができます。 プロンプトは、それぞれ安全性と有用性の検証セットに対応する1,586および584のプロンプトです。 3.4.2 人間による評価 人間による評価は、自然言語生成、対話モデルを判断するためのゴールドスタンダードとされることがよくあります。主要なモデルバージョンの品質を評価するために、人間の評価者に安全性と有用性について評価してもらいました。L/l.sc/a.sc/m.sc/a.sc/two.taboldstyle-C/h.sc/a.sc/t.scモデルをオープンソースモデル(ファルコン、
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nappearedinGPT-4promptarerandomlyswappedtoavoidanybias. Asexpected,thewin-rateinfavorof\nL/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc is less pronounced, although obtaining more than a 60% win-rate for our latest L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc .\nThe prompts correspond to a validation set of 1;586and584prompts for safety and helpfulness, respectively.\n3.4.2 Human Evaluation\nHuman evaluation is often considered the gold standardfor judging models fornatural language generation,\nincluding dialogue models. To evaluate the quality of major model versions, we asked human evaluators to\nrate them on helpfulness and safety. We compare the L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc models to open-source models (Falcon," }
2307.09288-76
ラマ2:オープンファウンデーションとファインチューンされたチャットモデル MPT MosaicML NLPチームら(2023年)、Vicuna Chiangら(2023年)、およびクローズドソースモデル(ChatGPT(OpenAI、2023年)およびPaLMAniら(2023年))を使用して、4,000以上の単一および複数のターンのプロンプトで評価しました。ChatGPTについては、すべての世代でgpt-3.5-turbo-0301モデルを使用しています。PaLMについては、すべての世代でchat-bison-001モデルを使用しています。各モデルの人間評価の最終プロンプト数は表32に示されています。方法論の詳細については、付録のセクションA.3.7を参照してください。次のセクションでは、有用性の結果が示されます。安全性の結果はセクション4.4で提示されています。 結果。図12に示すように、L/l.sc/a.sc/m.sc/a.sc/t.sc/two.taboldstyle-C/h.sc/a.sc/t.scモデルは、単一ターンおよび複数ターンのプロンプトの両方でオープンソースモデルを大幅に上回っています。特に、L/l.sc/a.sc/m.sc/a.sc/t.sc/two.taboldstyle-C/h.sc/a.sc/t.sc 7Bモデルは、
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nMPT MosaicML NLP Team et al. (2023), Vicuna Chiang et al. (2023), as well as closed-source models (ChatGPT(OpenAI,2023)andPaLMAniletal.(2023))onover 4;000singleandmulti-turnprompts. ForChatGPT,\nweuse gpt-3.5-turbo-0301 modelinallgenerations. ForPaLM,weusethe chat-bison-001 modelinall\ngenerations. ThefinalpromptcountforhumanevaluationsforeachmodelisshowninTable32. Seemore\nmethodology details in Appendix, Section A.3.7. The following section shows helpfulness results; safety\nresults are presented in Section 4.4.\nResults. AsshowninFigure12, L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc modelsoutperformopen-sourcemodelsbyasignificant\nmargin on both single turn and multi-turn prompts. Particularly, L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc 7B model outperforms" }
2307.09288-77
ラマ2:オープンファウンデーションと微調整されたチャットモデル MPT-7B-chaton60%oftheprompts。L/l.sc/a.sc/m.sc/a.sc/two.taboldstyle-C/h.sc/a.sc/t.sc 34Bは、同等サイズのビクーニャ-33Bおよびファルコン40Bモデルに対して75%以上の総合勝率を持っています。 18 図12:L/l.sc/a.sc/m.sc/a.sc/two.taboldstyle-C/h.sc/a.sc/t.scモデルの人間評価結果、オープンおよびクローズドソースモデルとの比較 約4,000の助けになるプロンプトに対する3人の評価者ごとの結果。 最大のL/l.sc/a.sc/m.sc/a.sc/two.taboldstyle-C/h.sc/a.sc/t.scモデルはChatGPTと競争力があります。L/l.sc/a.sc/m.sc/a.sc/two.taboldstyle-C/h.sc/a.sc/t.sc 70Bモデルは勝率があります。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nMPT-7B-chaton60%oftheprompts. L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc 34Bhasanoverallwinrateofmorethan75%against\nequivalently sized Vicuna-33B and Falcon 40B models.\n18\nFigure12: Humanevaluationresults forL/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc modelscomparedtoopen-andclosed-sourcemodels\nacross ~4,000 helpfulness prompts with three raters per prompt.\nThelargest L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc modeliscompetitivewithChatGPT. L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc 70Bmodelhasawinrateof" }
2307.09288-78
Llama 2: オープンファウンデーションと微調整されたチャットモデル ChatGPTに対する36%の勝率と31.5%の引き分け率。L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc 70Bモデルは、PaLM-bisonチャットモデルよりも大幅に優れています。詳細な結果と分析はセクションA.3.7で利用可能です。 相互評価信頼性(IRR)。私たちの人道的評価では、3人の異なる注釈者がそれぞれのモデル生成比較に独立した評価を提供しました。高いIRRスコア(1.0に近い)は、データ品質の観点からは通常良いとされますが、文脈が重要です。LLM生成の全体的な有用性を評価するような高度に主観的なタスクは、通常、より客観的なラベリングタスクよりも低いIRRスコアになります。これらの文脈には比較的少ない公共のベンチマークがありますので、ここでの分析を共有することが研究コミュニティに利益をもたらすと考えています。 GwetのAC1/2統計(Gwet, 2008, 2014)を使用して相互評価信頼性(IRR)を測定しました。異なる測定シナリオで最も安定したメトリックであると判断しました。7段階のLikertスケールの有用性
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\n36% and a tie rate of 31.5% relative to ChatGPT. L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc 70B model outperforms PaLM-bison chat\nmodel by a large percentage on our prompt set. More results and analysis is available in Section A.3.7.\nInter-RaterReliability(IRR). Inourhumanevaluations,threedifferentannotatorsprovidedindependent\nassessments for each model generation comparison. High IRR scores (closer to 1.0) are typically seen as\nbetter from a data quality perspective, however, context is important. Highly subjective tasks like evaluating\nthe overall helpfulness of LLM generations will usually have lower IRR scores than more objective labelling\ntasks. There arerelativelyfewpublicbenchmarksfor thesecontexts, sowefeelsharing ouranalysis herewill\nbenefit the research community.\nWe used Gwet’s AC1/2 statistic (Gwet, 2008, 2014) to measure inter-rater reliability (IRR), as we found it to\nbethemoststablemetricacrossdifferentmeasurementscenarios. Onthe7-pointLikertscalehelpfulness" }
2307.09288-79
ラマ2:オープンファンデーションと微調整されたチャットモデル は、さまざまな測定シナリオで最も安定したメトリックであることが示されています。私たちの分析で使用されている7段階のLikertスケールの役立ち度タスクでは、GwetのAC2スコアは、特定のモデル比較によって0.37から0.55の間で変動します。私たちは、同じくらいの勝率を持つモデル比較からの評価では、その範囲の下限のスコアを見ます(例:L/l.sc/a.sc/m.sc/a.sc/two.taboldstyle-C/h.sc/a.sc/t.sc-70B-chat vs. ChatGPT比較)。一方、より明確な勝者を持つモデル比較からの評価では、その範囲の上限のスコアを見ます(例:L/l.sc/a.sc/m.sc/a.sc/two.taboldstyle-C/h.sc/a.sc/t.sc-34b-chat vs. Falcon-40b-instruct)。人間の評価の制限。私たちの結果は、L/l.sc/a.sc/m.sc/a.sc/two.taboldstyle-C/h.sc/a.sc/t.scがChatGPTと同等であることを示しています。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nbethemoststablemetricacrossdifferentmeasurementscenarios. Onthe7-pointLikertscalehelpfulness\ntaskthatisusedinouranalysis,Gwet’sAC2scorevariesbetween 0:37and0:55dependingonthespecific\nmodelcomparison. Weseescoresonthelowerendofthatrangeforratingsfrommodelcomparisonswith\nsimilar win rates to each other (like the L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc -70B-chat vs. ChatGPT comparison). We see scores on\nthehigherendofthatrangeforratingsfrommodelcomparisonswithamoreclearwinner(likethe L/l.sc/a.sc/m.sc/a.sc\n/two.taboldstyle-C/h.sc/a.sc/t.sc-34b-chat vs. Falcon-40b-instruct).\nLimitations of human evaluations. While our results indicate that L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc is on par with ChatGPT" }
2307.09288-80
Llama 2: オープンファンデーションと微調整されたチャットモデル 人間の評価については、人間の評価にはいくつかの制限があることを考慮することが重要です。 • 学術および研究の基準によれば、4kのプロンプトの大きなセットを持っています。ただし、これはおそらく多くのユースケースをカバーするであろうこれらのモデルの実世界での使用をカバーしていません。 • プロンプトの多様性は、結果に影響を与える別の要因となり得ます。たとえば、私たちのプロンプトセットには、コーディングや推論に関連するプロンプトが含まれていません。 • 私たちは、マルチターンの会話の最終生成のみを評価しています。より興味深い評価は、モデルにタスクを完了させるように求め、複数のターンにわたるモデルとの全体的な体験を評価することです。 • 生成モデルの人間評価は、本質的に主観的でノイズが多いです。その結果、異なるプロンプトセットや異なる指示での評価は、異なる結果につながる可能性があります。 19 4 安全性 警告:このセクションには、不安全、攻撃的、または不快とされるテキストの例が含まれています。 このセクションでは、安全性の測定と緩和の重要なトピックについて詳しく説明します。まず、事前トレーニングデータおよび事前トレーニングモデルへの安全性調査について説明します(セクション4.1)。次に、私たちは
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\non human evaluations, it is important to note that human evaluations have several limitations.\n•Byacademicandresearchstandards,wehavealargepromptsetof4kprompts. However,itdoesnotcover\nreal-world usage of these models, which will likely cover a significantly larger number of use cases.\n•Diversity of the prompts could be another factor in our results. For example, our prompt set does not\ninclude any coding- or reasoning-related prompts.\n•We only evaluate the final generation of a multi-turn conversation. A more interesting evaluation could be\nto ask the models to complete a task and rate the overall experience with the model over multiple turns.\n•Humanevaluationforgenerativemodelsisinherentlysubjectiveandnoisy. Asaresult,evaluationona\ndifferent set of prompts or with different instructions could result in different results.\n19\n4 Safety\nWARNING: this section contains examples of text that may be considered unsafe, offensive, or upsetting.\nIn this section, we dive deeper into the important topic of safety measurements and mitigations. We first\ndiscussoursafetyinvestigationsintopretrainingdataandpretrainedmodels(Section4.1). Next,wedescribe" }
2307.09288-81
Llama 2: オープンファウンデーションとファインチューンされたチャットモデルは、事前トレーニングデータおよび事前トレーニングモデルにおける安全調査について議論します(セクション4.1)。次に、安全アライメントのプロセス(セクション4.2)を説明し、安全関連の注釈の収集方法とSFTおよびRLHFの利用方法、および実験結果を提示します。その後、モデルの安全性をさらに理解し改善するために行ったレッドチーミングについて議論します(セクション4.3)。最後に、L/l.sc/a.sc/m.sc/a.sc/t.sc(セクション4.4)の定量的な安全性評価を提示します。また、付録のテーブル52にモデルカードも共有します。 4.1 事前トレーニングにおける安全性 事前トレーニングデータに含まれる内容を理解することは重要です。これにより透明性が高まり、潜在的なバイアスなどの下流の問題の根本原因が明らかになります。これにより、考慮すべき下流の緩和策が何か、および適切なモデルの使用方法を案内することができます。このセクションでは、言語、人口統計の表現、有害性の分布について事前トレーニングデータを分析します。また、既存の安全基準に対する事前トレーニングモデルのテスト結果も提示します。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\ndiscussoursafetyinvestigationsintopretrainingdataandpretrainedmodels(Section4.1). Next,wedescribe\ntheprocessofoursafetyalignment(Section4.2),explaininghowwecollectedsafety-relatedannotationsand\nutilizedSFTandRLHF,andpresentexperimentalresults. Then,wediscusstheredteamingweperformedto\nfurtherunderstandandimprovemodelsafety(Section4.3). Finally,wepresentquantitativesafetyevaluations\nofL/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc (Section 4.4). We also share a model card in the Appendix, in Table 52.\n4.1 Safety in Pretraining\nIt is important to understand what is in the pretraining data both to increase transparency and to shed\nlightonrootcausesofpotentialdownstreamissues,suchaspotentialbiases. Thiscaninformwhat,ifany,\ndownstream mitigations to consider, and help guide appropriate model use. In this section, we analyze the\npretraining datafor distributionsof languages,demographic representations,and toxicity. Wealso present\nthe results of testing the pretrained models on existing safety benchmarks." }
2307.09288-82
Llama 2: オープンファウンデーションとファインチューンされたチャットモデルの事前トレーニングデータは、言語、人口統計の表現、有害性の分布のために提供されます。また、事前トレーニングされたモデルの既存の安全ベンチマークでのテスト結果も提示します。 責任を持って事前トレーニングするための手順。トレーニングに使用される各データセットについて、Metaの標準プライバシーおよび法的審査プロセスに従いました。トレーニングにMetaユーザーデータは使用していません。私たちは、個人の個人情報を含むことが知られている特定のサイトからのデータを除外しました。事前トレーニングの炭素排出量を削減するために、モデルを効率的にトレーニングするための最善の努力をしました(セクション2.2.1)。私たちのモデルを広く共有することで、他の人が同様のモデルをトレーニングする必要がなくなります。データセットに追加のフィルタリングは行われませんでした。これにより、L/l.sc/a.sc/m.sc/a.sc/two.taboldstyleなどがより広く使用可能になります(たとえば、憎悪スピーチの分類により適しています)、同時に、時々起こる偶発的な人口統計の消去の潜在的な可能性を避けることができます。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\npretraining datafor distributionsof languages,demographic representations,and toxicity. Wealso present\nthe results of testing the pretrained models on existing safety benchmarks.\nStepsTakentoPretrainResponsibly. WefollowedMeta’sstandardprivacyandlegalreviewprocessesfor\neach dataset used in training. We did not use any Meta user data in training. We excluded data from certain\nsitesknowntocontainahighvolumeofpersonalinformationaboutprivateindividuals. Wemadeabest\neffort to train our models efficiently to reduce the carbon footprint of pretraining (Section 2.2.1). Sharing our\nmodelsbroadlywillreducetheneedforotherstotrainsimilarmodels. Noadditionalfilteringwasconducted\nonthedatasets,toallow L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle tobemorewidelyusableacrosstasks(e.g.,itcanbebetterusedforhate\nspeechclassification),whileavoidingthepotentialfortheaccidentaldemographicerasuresometimescaused" }
2307.09288-83
ラマ2:オープンファウンデーションとファインチューンされたチャットモデル スピーチ分類)を避けながら、時には過剰な洗浄によって引き起こされる人口の偶発的な消去の可能性を避けます。重要なのは、これにより、L/l.sc/a.sc/m.sc/a.sc/t.scは、より効果的に一般化することができるようになります。少ない例での安全チューニング中に(Welbl et al.、2021; Korbak et al.、2023; Xu et al.、2021)。その結果、L/l.sc/a.sc/m.sc/a.sc/t.scモデルは慎重に使用し、重要な安全チューニングが適用された後にのみ展開すべきです。 人口統計表現:代名詞。モデル生成の偏りは、トレーニングデータ自体から受け継いだ偏りから生じる可能性があります。たとえば、Bailey et al.(2022)は、大規模なテキストコーパスでは、「人々」を表す単語が「男性」を表す単語とより類似した文脈で使用されることが多いことを示しており、Ganesh et al.(2023)は、モデルの公平性指標に対するモデルのパフォーマンスが、代表されていない人口統計データに基づいてモデルがトレーニングされる方法に大きく依存することを示しています。
http://arxiv.org/pdf/2307.09288
{ "title": "Llama 2: Open Foundation and Fine-Tuned Chat Models", "en": "Llama 2: Open Foundation and Fine-Tuned Chat Models\nspeechclassification),whileavoidingthepotentialfortheaccidentaldemographicerasuresometimescaused\nbyover-scrubbing. Importantly,thisallows L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle-C/h.sc/a.sc/t.sc togeneralizemoreeffectivelyduringsafetytuning\nwith fewer examples (Welbl et al., 2021; Korbak et al., 2023; Xu et al., 2021). As a result, L/l.sc/a.sc/m.sc/a.sc /two.taboldstyle models\nshould be used carefully and deployed only after significant safety tuning is applied.\nDemographic Representation: Pronouns. Bias in model generations may result from biases inherited\nfrom the training data itself. For instance, Bailey et al. (2022) shows that in massive text corpora, words\nrepresenting “people” are often used in more similar contexts to words representing “men”than to words\nrepresenting “women,” andGaneshetal.(2023)demonstratesthatamodel’sperformanceonfairnessmetrics\ncan be highly dependent on how the model trains on data representing underrepresented demographic" }

No dataset card yet

New: Create and edit this dataset card directly on the website!

Contribute a Dataset Card
Downloads last month
0
Add dataset card