🚀 Open-Instruct Stanford Alpaca 7B
このモデルは、Stanford Alpacaデータセットでファインチューニングされた7BのLLaMaモデルです。これはモデル差分であることに注意してください - 使用方法については以下を参照してください。
このモデルは論文 How Far Can Camels Go? Exploring the State of Instruction Tuning on Open Resources の一部として学習されました。
このモデルを学習および評価するために使用されたコードベースは https://github.com/allenai/open-instruct で見つけることができます。
このモデルは、LICENSE.txtに記載されたAIモデルライセンスと元のLlamaライセンス (llama_license.txt) に基づいてライセンスされています。
🚀 クイックスタート
✨ 主な機能
このモデルは、Stanford Alpacaデータセットでファインチューニングされた7BのLLaMaモデルで、特定のタスクに対してより良い性能を発揮します。
📦 インストール
- すでにHF形式のLLaMaモデルにアクセスできることを前提としています。アクセス方法とモデルの変換に関する詳細はこちらで確認できます:
https://huggingface.co/docs/transformers/main/model_doc/llama
- https://github.com/allenai/open-instruct をクローンし、必要な依存関係をインストールするか、
scripts/weight_diff.py
をコピーして weight-diff-requirements.txt
に記載された最小限の要件をインストールします。
- このモデル差分を同じマシンにダウンロードまたはクローンします。
💻 使用例
基本的な使用法
以下のコマンドを実行すると、回復されたモデルが得られます。ただし、これにはかなりの量のRAMが必要です。
python scripts/weight_diff.py recover --path_raw ${hf_llama_path} --path_tuned ${output_path} --path_diff ${diff_location}
📚 ドキュメント
入力形式
モデルは以下の形式(改行に注意)で学習されています。
<|user|>
Your message here!
<|assistant|>
最良の結果を得るために、すべての入力をこの形式で整形してください。
性能
このモデルのベンチマークにおける性能は、論文 How Far Can Camels Go? Exploring the State of Instruction Tuning on Open Resources で調査されています。
MMLU 0-shot |
MMLU 5-shot |
GSM Direct |
GSM CoT |
BBH Direct |
BBH CoT |
TydiQA Gold-Passage |
TydiQA Closed-book |
Codex-Eval Pass@1 |
Codex-Eval Pass@10 |
AlpacaFarm vs Davinci-003 |
Average |
41.5 |
40.3 |
7.0 |
10.0 |
32.6 |
31.8 |
31.2 |
7.2 |
13.2 |
22.0 |
21.1 |
23.3 |
📄 ライセンス
このモデルは、LICENSE.txtに記載されたAIモデルライセンスと元のLlamaライセンス (llama_license.txt) に基づいてライセンスされています。
引用
このモデルを使用する場合は、以下の論文を引用してください。
@misc{wang2023far,
title={How Far Can Camels Go? Exploring the State of Instruction Tuning on Open Resources},
author={Yizhong Wang and Hamish Ivison and Pradeep Dasigi and Jack Hessel and Tushar Khot and Khyathi Raghavi Chandu and David Wadden and Kelsey MacMillan and Noah A. Smith and Iz Beltagy and Hannaneh Hajishirzi},
year={2023},
eprint={2306.04751},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
@misc{touvron2023llama,
title={LLaMA: Open and Efficient Foundation Language Models},
author={Hugo Touvron and Thibaut Lavril and Gautier Izacard and Xavier Martinet and Marie-Anne Lachaux and Timothée Lacroix and Baptiste Rozière and Naman Goyal and Eric Hambro and Faisal Azhar and Aurelien Rodriguez and Armand Joulin and Edouard Grave and Guillaume Lample},
year={2023},
eprint={2302.13971},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
@misc{alpaca,
author = {Rohan Taori and Ishaan Gulrajani and Tianyi Zhang and Yann Dubois and Xuechen Li and Carlos Guestrin and Percy Liang and Tatsunori B. Hashimoto },
title = {Stanford Alpaca: An Instruction-following LLaMA model},
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/tatsu-lab/stanford_alpaca}},
}