🚀 Cappy-Large
Cappyは、マルチタスクLLMの性能と効率を向上させるために設計された事前学習済みの小型スコアリングモデルです。Cappyは、指示と候補応答を入力として受け取り、0から1までのスコアを出力し、指示に対する応答の推定正確性を示します。わずか3億6000万のパラメータで、Cappyは分類タスクで独立して機能するか、LLMの補助コンポーネントとして機能し、その性能を向上させます。また、Cappyは、LLMの微調整やパラメータへのアクセスを必要とせずに、下流の監督を効率的に統合することができます。さらに、Cappyは、微調整、コンテキスト内学習、プロンプトチューニングなど、他のLLMの適応策と柔軟に協力し、追加の性能向上を提供します。
🚀 クイックスタート
Cappyは、事前学習された小型のスコアラーで、マルチタスクLLMの性能と効率を向上させるように設計されています。Cappyは、指示と候補応答を入力として受け取り、0から1までのスコアを出力し、指示に対する応答の推定正確性を示します。わずか3億6000万のパラメータで、Cappyは分類タスクで独立して機能するか、LLMの補助コンポーネントとして機能し、その性能を向上させます。また、Cappyは、LLMの微調整やパラメータへのアクセスを必要とせずに、下流の監督を効率的に統合することができます。さらに、Cappyは、微調整、コンテキスト内学習、プロンプトチューニングなど、他のLLMの適応策と柔軟に協力し、追加の性能向上を提供します。
✨ 主な機能
Cappyは、Jax/FlaxモデルまたはPyTorchモデルとしてロードすることができます。
💻 使用例
基本的な使用法
Jax/Flax
from transformers import AutoTokenizer, FlaxAutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained('btan2/cappy-large')
cappy = FlaxAutoModelForSequenceClassification.from_pretrained('btan2/cappy-large')
instruction = """
What label best describes this news article?
Carlyle Looks Toward Commercial Aerospace (Reuters) Reuters - Private investment firm Carlyle Group,\which has a reputation for making well-timed and occasionally\controversial plays in the defense industry, has quietly placed\its bets on another part of the market.
"""
response = 'Business'
inputs = tokenizer([(instruction, response), ], return_tensors='pt')
score = cappy(**inputs).logits[0][0].item()
PyTorch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained('btan2/cappy-large')
cappy = AutoModelForSequenceClassification.from_pretrained('btan2/cappy-large')
instruction = """
What label best describes this news article?
Carlyle Looks Toward Commercial Aerospace (Reuters) Reuters - Private investment firm Carlyle Group,\which has a reputation for making well-timed and occasionally\controversial plays in the defense industry, has quietly placed\its bets on another part of the market.
"""
response = 'Business'
inputs = tokenizer([(instruction, response), ], return_tensors='pt')
score = cappy(**inputs).logits[0][0].item()
📚 ドキュメント
評価
我々は、事前学習に使用されたタスクとは異なる一連のタスクを使用して、Cappyの性能を検証しました。全体的な性能は、図1と図2に示されています。具体的には、PromptSourceから抽出された11の言語理解タスクで、3億6000万のパラメータを持つCappyは、OPT - IML - 30BとOPT - 175Bを大幅に上回り、以前のマルチタスクLLMの中で最良のものと匹敵します。また、BIG - Benchからの45の多様な複雑なタスクで、Cappyは高度なマルチタスクLLMであるFLAN - T5の性能を大幅に向上させます。さらに、Cappyは、微調整またはコンテキスト内学習と組み合わせて適用すると、追加の性能向上を提供します。我々のその後のアブレーション研究は、提案された事前学習とデータ拡張戦略の重要性を証明しています。

ソフトウェア
Cappyの事前学習には、軽量な分散トレーニング自動化ツールキットであるRed Coastのこの例のコードが使用されています。
引用
@inproceedings{
tan2023cappy,
title={Cappy: Outperforming and Boosting Large Multi-Task {LM}s with a Small Scorer},
author={Bowen Tan and Yun Zhu and Lijuan Liu and Eric Xing and Zhiting Hu and Jindong Chen},
booktitle={Thirty-seventh Conference on Neural Information Processing Systems},
year={2023},
url={https://openreview.net/forum?id=Srt1hhQgqa}
}

📄 ライセンス
このプロジェクトは、Apache-2.0ライセンスの下で公開されています。