見出し画像

Llama 2 論文斜め読み①

Metaの大規模言語モデルLlama2が7月19日にリリースされました!
論文の「Llama 2: Open Foundation and Fine-Tuned Chat Models」を斜め読みしたので、ファインチューニングの章の量が多いので事前学習までとライセンスについて紹介します。

はじめに

目次からですが、45pからのAppendixを抜いて、半分ぐらい安全性について議論されているように思えました。図1は論文の目次のスクショですが、4のSafetyで20pから31pまでの合計12pあり、安全性についての気合いを感じます。

論文内で、データセットについての話も安全性とかかなり出てきます。

図1. 目次

1.イントロダクションから

There have been public releases of pretrained LLMs (such as BLOOM (Scao et al., 2022), LLaMa-1 (Touvron et al., 2023), and Falcon (Penedo et al., 2023)) that match the performance of closed pretrained competitors like GPT-3 (Brown et al., 2020) and Chinchilla (Hoffmann et al., 2022), but none of these models are suitable substitutes for closed “product” LLMs, such as ChatGPT, BARD, and Claude. These closed product LLMs are heavily fine-tuned to align with human preferences, which greatly enhances their usability and safety.

Llama 2: Open Foundation and Fine-Tuned Chat Models

プロダクトのChatGPTなどのLLMに比べ、オープンなFalconなどのLLMは性能的に及ばないことが記載されていました。理由としては、人間の嗜好に会うような微調整がされていないと言及されていました。

図2は論文から他のLLMと性能比較した結果ですが、一番上の行でChatGPTにも性能で勝っていると示しています。

図2. 論文から取得。Llama2と他LLMとの比較。

提供されるモデルはLlama 2とLlama 2-Chatです。パラメータは7B、13B、 70Bのパラメータ数です。Llama 2は以前のLlama 1からバージョンアップしており、事前学習コーパスのサイズを40%増やし、2kから4kのコンテキスト長とグループ化されたクエリーアテンション(GQA)を適用してます。 34Bについては学習したようですが、モデルの公開はされていないです。

2.事前学習から

2.1 事前学習データ

Our training corpus includes a new mix of data from publicly available sources, which does not include data from Meta’s products or services.

Llama 2: Open Foundation and Fine-Tuned Chat Models

事前学習のデータでは、Metaのデータは含まれておらず、パブリックなデータを利用しています。個人データを入れないように学習しようという意思を感じます。

2.3 Llama2 事前学習モデルの評価

図2はLlama 2、Llama 1、MPTやFalconのオープンソースのLLMモデルとの性能比較です。8個の評価指標で比較しています。図から前のLlama 1からかなり性能アップしたことが理解できます。特にLlama 2 70BはLlama 1 65Bと比較して、MMLUとBBHの結果をそれぞれ5ポイント、8ポイント性能向上しています。
Llama内の比較でないモデルでも、Falconでは同サイズのモデルで全てのカテゴリの性能がLlama 2の方が性能が高いです。

図2. 論文から取得。Llama2とオープンソースLLMとの性能比較。


ライセンス

商用利用

気になる方も多いと思うので、Llama 2のライセンスについて紹介します。

A custom commercial license is available at: https://ai.meta.com/research/publications/llama-2-open-foundation-and-fine-tuned-chat-models/

Llama 2: Open Foundation and Fine-Tuned Chat ModelsのA.7 A.7 Model Card

論文中であると、A custom commercial licenseというライセンスで利用可能であると紹介されていました。

リンク先のLlama 2 Community License Agreementを確認します。

2. Additional Commercial Terms. If, on the Llama 2 version release date, the monthly active users of the products or services made available by or for Licensee, or Licensee’s affiliates, is greater than 700 million monthly active users in the preceding calendar month, you must request a license from Meta, which Meta may grant to you in its sole discretion, and you are not authorized to exercise any of the rights under this Agreement unless or until Meta otherwise expressly grants you such rights.

Llama 2 Community License Agreement

製品の月間アクティブユーザーが7億人以上でない限り、商用利用が可能なようです。これについては、自分自身が間違えた認識をしているかもしれないので、詳細についてはAIに強い弁護士などにご相談ください。

出力の利用

Llama 2の出力を利用したLLM開発が可能かどうか確認します。Llama 2 Community License Agreementの1-vに記載があったので紹介します。

v. You will not use the Llama Materials or any output or results of the Llama Materials to improve any other large language model (excluding Llama 2 or derivative works thereof).

Llama 2 Community License Agreement

OpenAIのTerms of useの2-(c)-(iii)箇所と同様に、出力を利用しての基本的なLLMの開発はできないという認識です。気になる一文としては、Llama 2とその派生物を除くという箇所があるため、Llama 2の出力を利用してLlama 2の学習は可能ということでしょうか?これについても、自分自身が間違えた認識をしているかもしれないので詳しい方、教えてください。

Llama 2 論文斜め読み②ではファインチューニングのデータ周りや方法について簡単に紹介します。

この記事が気に入ったらサポートをしてみませんか?