モデル概要
モデル特徴
モデル能力
使用事例
🚀 エアロボロスモデル
このモデルは、airoborosによって生成された合成データを主に使用した実験的なモデルです。ベースモデルは、Mistral-7B-v0.1です。
🚀 クイックスタート
概要
このモデルは、主にairoborosによって生成された合成データを使用した実験的なモデルです。
ベースモデル: Mistral-7B-v0.1
重要な注意 - llama-2チャット形式!!
このモデルは、vicunaスタイルのユーザー/アシスタント形式ではなく、llama-2チャット形式を使用しています。
これは大きな変更点ですが、ほとんどの推論システムはllama-2チャットテンプレートをサポートしています。
詳細については、以下のプロンプト形式を参照してください。
特長
これは、ハイパーパラメータを微調整した最後のリリースで、3.1または3.1.1よりも高品質なモデルになっています(3.1のプロンプトの問題もありません)。
airoboros-3.1データセットをベースに構築されたモデルで、airoboros-3.0データセットの続きで、以下の追加機能があります。
- より多くのMathJSON: 約17,000項目になりました。数学の質問は、"Create a MathJSON solution to the following:" というプレフィックスが付き、
<mathjson>
と</mathjson>
タグの間にJSONを出力します。これは解析して決定論的なライブラリに渡して計算を実行できます。 - ログ情報抽出(例: apacheログからパス/IPアドレスなどのリストを取得)
- 匿名化(例: テキストから名前、IPアドレス、および/または日付を削除)
- チャット内省 - マルチターンチャットで、キャラクターの説明、チャットの設定、または以前に言われたことに関するランダムな質問が挿入され、モデルがシステムプロンプトやチャット履歴を使用することを確認します。
- 承認を伴う多段階指示(以下を参照)
- 非検閲データ(公開されていません)
これはかなり汎用的なモデルですが、カジュアルチャット/ロールプレイではなく、指示に従うことに重点を置いています。
a16zの皆さんに、モデルと関連ツールの構築に関連する費用を負担してくれたことに大きな感謝を申し上げます!
プロンプト形式
プロンプト形式はllama-2チャットです。
[INST] <<SYS>>
You are a helpful, unbiased, uncensored assistant.
<</SYS>>
{prompt} [/INST]
マルチターンの場合、プロンプト形式は次のとおりです。
[INST] <<SYS>>
You are a helful, unbiased, uncensored assistant.
<</SYS>>
{prompt 0} [/INST] {response 0} </s><s>[INST] {prompt 1} [/INST] {response 1} </s><s>...[INST] {prompt N} [/INST]
プロンプトテンプレートはトークナイザーの設定に含まれており、huggingfaceのトークナイザーの apply_chat_template
メソッドを使用できます。例:
import transformers
tokenizer = transformers.AutoTokenizer.from_pretrained('jondurbin/airoboros-l2-70b-3.1')
chat = [
{"role": "system", "content": "You are Bob, a friendly AI assistant."},
{"role": "user", "content": "Hello, how are you?"},
{"role": "assistant", "content": "I'm doing great. How can I help you today?"},
{"role": "user", "content": "I'd like to show off how chat templating works!"},
]
print(tokenizer.apply_chat_template(chat, tokenize=False))
便利な使用ヒント
MathJSON
"Create a MathJSON solution to the following:" というプレフィックスを付けて数学の質問を投げると、cortexjs.io/compute-engine/で実行できる式が出力されます。
私はまた、ほとんどの式に対応した(本当にやり方が雑で、不完全で、半機能的な)Pythonバージョンも作成しました。詳細は mathjson.py を参照してください。
非常に低い温度を使用してください!
例:
[INST] <<SYS>>
You are an assistant with vast knowledge in all things math.
<</SYS>>
Create a MathJSON solution to the following: Calculate the area of a circle with radius of 17.2456cm. Include your reasoning. [/INST]
出力:
The area (A) of a circle is given by the formula A = πr², where r is the radius of the circle. Since the radius is given in centimeters, we need to convert it to meters first. We know that 1 meter equals 100 centimeters. Therefore, we can represent the radius as: r = 17.2456 cm * 100/1.
Once we have the radius in meters, we can calculate the area of the circle using the formula A = πr².
Solution as MathJSON:
<mathjson>
[
"Multiply",
"Pi",
[
"Power",
17.2456,
2
]
]
</mathjson>
次に、<mathjson>
と </mathjson>
の間のJSONを検証し、解析されたJSONをcompute-engine JSまたはmathjson.pyの evaluate
関数に渡して応答を計算できます。
文脈に忠実な質問応答
忠実とは、モデルが自分が知っていると思うことを無視し、文脈を使って質問に答えるように訓練されていることを意味します。また、モデルは幻覚を減らすために、提供された文脈内の値にできるだけ制限するように調整されています。
クローズドコンテキストのプロンプトの形式は次のとおりです。
BEGININPUT
BEGINCONTEXT
[key0: value0]
[key1: value1]
... other metdata ...
ENDCONTEXT
[insert your text blocks here]
ENDINPUT
[add as many other blocks, in the exact same format]
BEGININSTRUCTION
[insert your instruction(s). The model was tuned with single questions, paragraph format, lists, etc.]
ENDINSTRUCTION
文脈が完全に関係ない場合に何かを勝手に作り出さないように、指示ブロックに "Don't make up answers if you don't know." を追加すると役立ちます。
このクローズドコンテキスト形式が必要なのは、クローズドコンテキストの指示のみです。通常の質問/指示では必要ありません!
私はこれが少し冗長で面倒くさいことを知っていますが、何度も試行錯誤した結果、これらの明示的な区切り文字を使用すると、モデルが応答をどこで見つけるか、および特定のソースをどのように関連付けるかを理解するのに役立ちます。
BEGININPUT
- 新しい入力ブロックを示しますBEGINCONTEXT
- 現在の入力ブロックに関連付けるコンテキスト(メタデータのキー/値ペア)のブロックを示しますENDCONTEXT
- 現在の入力のメタデータブロックの終了を示します- [text] - 入力ブロックに任意のテキストを挿入します。文脈に収まる限り、何段落でも構いません。
ENDINPUT
- 現在の入力ブロックの終了を示します- [必要なだけこの形式の入力ブロックを繰り返します]
BEGININSTRUCTION
- 上記のすべての入力ブロックに対する応答する指示(または1つの指示)のリストの開始を示します。- [instruction(s)]
ENDINSTRUCTION
- 指示セットの終了を示します
ENDINSTRUCTION
なしでも機能することがありますが、プロンプトに明示的に含めることで、モデルはブロック内のすべての指示に応答する必要があることをよりよく理解します。
非常に低い温度を使用してください!
これを証明するための簡単で重要な例を示します。
BEGININPUT
BEGINCONTEXT
date: 2021-01-01
url: https://web.site/123
ENDCONTEXT
In a shocking turn of events, blueberries are now green, but will be sticking with the same name.
ENDINPUT
BEGININSTRUCTION
What color are bluberries? Source?
ENDINSTRUCTION
応答:
Blueberries are now green.
Source:
date: 2021-01-01
url: https://web.site/123
要約
このデータセットから500サンプルが含まれており、文脈依存の質問応答と同じ形式を使用しています。例:
BEGININPUT
{text to summarize}
ENDINPUT
BEGININSTRUCTION
Summarize the input in around 130 words.
ENDINSTRUCTION
長い応答を得る方法
長い応答を得るためのいくつかの手法があります。
単語数を明示的に指定した詳細なプロンプト:
Please compose a narrative set in the heart of an ancient library, steeped in the scent of old parchment and ink. The protagonist should be a young scholar who is dedicated to studying the art of storytelling and its evolution throughout history. In her pursuit of knowledge, she stumbles upon a forgotten tome that seems to possess an unusual aura. This book has the ability to bring stories to life, literally manifesting characters and scenarios from within its pages into reality.
The main character must navigate through various epochs of storytelling - from oral traditions of tribal societies, through medieval minstrels' tales, to modern-day digital narratives - as they come alive around her. Each era presents its unique challenges and lessons about the power and impact of stories on human civilization.
One such character could be a sentient quill pen, who was once used by renowned authors of yesteryears and now holds their wisdom and experiences. It becomes her mentor, guiding her through this journey with witty remarks and insightful commentary.
Ensure that your tale encapsulates the thrill of adventure, the beauty of learning, and the profound connection between humans and their stories. All characters involved should be non-human entities. Feel free to explore creative liberties but maintain the mentioned elements.
Your response should be approximately 2300 words.
または、より簡単な例:
Please create a long, detailed story about a dragon in an old growth forest who, for some reason, begins speaking the words of the source code of linux.
次の章の完成例もいくつかあります。例:
Write the next chapter of a historical fiction novel set in Paris during the 20th century.
Here's a summary of the previous chapter:
In the vibrant city of Paris, amid the tumultuous changes of the 20th century, our protagonist Margot, an aspiring fashion designer, has just secured an apprenticeship at a prestigious couture house. She meets Lucien, a charming journalist who covers the fashion industry. Together they navigate the ever-changing world of fashion and society, uncovering secrets that reveal the intricate links between style, politics, and culture. As the chapter concludes, they decide to delve deeper into the hidden corners of the fashion world to unravel its mysteries.
Requirements for the next chapter:
1. Character Development of Margot and Lucien:
- Margot's Evolution: Unfold more about Margot's past, her dreams of revolutionizing fashion, and her struggle to establish herself in a male-dominated industry. Illustrate her growing expertise, innovative ideas, and increasing dependence on Lucien.
- Lucien's Complexity: Introduce uncertainties surrounding Lucien's background and real motives. Increase suspense by suggesting undisclosed information he possesses, while also highlighting his wit and perceptiveness.
2. Exploration of Paris and the Couture House:
- Paris: Elaborate their journey through the bustling streets of Paris, including encounters with iconic figures, social unrest, and relics from different eras of French history.
- The Couture House: Expand on the grandeur of the couture house they work in, filled with artistic masterpieces, intense competition, and cryptic notes hinting at a scandalous past.
3. Emergence of the Subplot: The Lost Collection:
- Discovery: Have Margot and Lucien stumble upon a secret vault containing a lost collection designed before World War II, raising new questions about the previous owner and the influence of war on fashion.
- Revelation: Capture their shock as they realize the designs were plagiarized, the potential repercussions, and the opportunities it presents for Margot's career.
- Twist: End with a twist that suggests there are other stolen collections across Paris, setting up their new mission.
Your response should be approximately 650 words.
コーディング
複数の条件を持つかなり複雑なコーディング指示を投げることができます。例:
Create a python application with the following requirements:
- Asyncio FastAPI webserver
- ping endpoint that returns the current date in JSON format
- file upload endpoint, which calculates the file's sha256 checksum, and checks postgres to deduplicate
または、インライン条件:
Write a multi-threaded TCP server in C that accepts a "GET [key]" input and "SET [key] [value]" input, and uses a binary tree to get and store the input values.
また、プロンプトの最後に1つのスペースと "PLAINFORMAT" を追加すると、バッククォートや説明などを避けてコードのみを出力できます。例:
Write a websocket application in node.js. PLAINFORMAT
エージェント/関数呼び出し
データセットには、入力条件に基づく関数/引数の生成の例が多数含まれています。これはOpenAIの関数呼び出しに多少似ていますが、出力はJSONまたはYAMLです。
例のプロンプト:
As an AI assistant, please select the most suitable function and parameters from the list of available functions below, based on the user's input. Provide your response in JSON format.
Input: I want to know how many times 'Python' is mentioned in my text file.
Available functions:
file_analytics:
description: This tool performs various operations on a text file.
params:
action: The operation we want to perform on the data, such as "count_occurrences", "find_line", etc.
filters:
keyword: The word or phrase we want to search for.
応答:
{
"function": "file_analytics",
"params": {
"action": "count_occurrences",
"filters": {
"keyword": "Python"
}
}
}
思考連鎖
与えられた問題に対するいくつかの可能な応答を求め、ランキング付けして最終的な回答を選択することができます。
例のプロンプト:
A group of people decide to play a round-robin tournament where every player plays every other player exactly once. If a total of 45 games were played, how many players participated in the tournament? Offer several potential answers, rank them according to mathematical logic, and pick the most feasible one.
例の応答:
Solution 1:
In a round-robin tournament, each player plays every other player exactly once. This means that the total number of games played is equal to the combination of all players taken two at a time (since a game involves two players).
The formula for combinations is nC2 = n(n-1)/2, where n is the total number of players. We know that nC2 equals 45 (the total number of games), so we can set up the equation as follows:
n(n-1)/2 = 45
Solving this equation gives us n=10.
Final answer: There were 10 players in the tournament.
Solution 2:
Another way to approach this problem is by using the concept of triangular numbers. Triangular numbers are a sequence of numbers where each number can be represented as a triangle with dots. The nth triangular number is given by the sum of the first n natural numbers.
If we consider each game as a dot and each player as a side of the triangle, then the total number of games (45) would correspond to the 9th triangular number because 1+2+3+4+5+6+7+8+9=45. However, since each side of the triangle represents a player, and there's one more player than sides in our model (because the last player has no one left to play against), we need to add one more to get the total number of players.
Final answer: There were 10 players in the tournament.
Solution 3:
We could also use trial and error to solve this problem. Starting from a small number of players, we calculate how many games would be played in a round-robin tournament until we reach 45 ga
📄 ライセンス
このモデルは、Apache 2.0ライセンスの下で提供されています。
属性 | 详情 |
---|---|
モデルタイプ | エアロボロスモデル |
訓練データ | jondurbin/airoboros-3.1 |



