-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
88 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
from ..settings import ConversationSettings, SeparatorStyle | ||
|
||
# AquilaChat default template | ||
# source: https://github.com/FlagAI-Open/FlagAI/blob/master/examples/Aquila/Aquila-chat/cyg_conversation.py | ||
aquila_chat = ConversationSettings( | ||
name="aquila-chat", | ||
system_message="A chat between a curious human and an artificial intelligence assistant. " | ||
"The assistant gives helpful, detailed, and polite answers to the human's questions.", | ||
roles=("Human", "Assistant"), | ||
sep_style=SeparatorStyle.ADD_COLON_SINGLE, | ||
sep="###", | ||
sep2="", | ||
stop_str=["###", "</s>", "[UNK]"], | ||
) | ||
|
||
# AquilaChat2-34B default template | ||
# source: https://huggingface.co/BAAI/AquilaChat2-34B/blob/4608b75855334b93329a771aee03869dbf7d88cc/predict.py#L212 | ||
aquila_legacy = ConversationSettings( | ||
name="aquila-legacy", | ||
system_message="A chat between a curious human and an artificial intelligence assistant. " | ||
"The assistant gives helpful, detailed, and polite answers to the human's questions.\n\n", | ||
roles=("### Human: ", "### Assistant: "), | ||
offset=0, | ||
sep_style=SeparatorStyle.NO_COLON_TWO, | ||
sep="\n", | ||
sep2="</s>", | ||
stop_str=["</s>", "[UNK]"], | ||
) | ||
|
||
# AquilaChat2-7B-16K and AquilaChat2-34B-16K default template | ||
# source: https://huggingface.co/BAAI/AquilaChat2-34B/blob/4608b75855334b93329a771aee03869dbf7d88cc/predict.py#L227 | ||
aquila = ConversationSettings( | ||
name="aquila", | ||
system_message="A chat between a curious human and an artificial intelligence assistant. " | ||
"The assistant gives helpful, detailed, and polite answers to the human's questions.", | ||
roles=("Human", "Assistant"), | ||
offset=0, | ||
sep_style=SeparatorStyle.ADD_COLON_TWO, | ||
sep="###", | ||
sep2="</s>", | ||
stop_str=["</s>", "[UNK]"], | ||
) | ||
|
||
|
||
# AquilaChat2-7B default template | ||
# source: https://huggingface.co/BAAI/AquilaChat2-34B/blob/4608b75855334b93329a771aee03869dbf7d88cc/predict.py#L242 | ||
aquila_v1 = ConversationSettings( | ||
name="aquila-v1", | ||
roles=("<|startofpiece|>", "<|endofpiece|>"), | ||
offset=0, | ||
sep_style=SeparatorStyle.NO_COLON_TWO, | ||
sep="", | ||
sep2="</s>", | ||
stop_str=["</s>", "<|endoftext|>"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
from ..settings import ConversationSettings, SeparatorStyle | ||
|
||
# ehartford/dolphin-2.2.1-mistral-7b template | ||
# reference: https://huggingface.co/ehartford/dolphin-2.2.1-mistral-7b#training | ||
|
||
dolphin = ConversationSettings( | ||
name="dolphin", | ||
system_template="<|im_start|>system\n{system_message}", | ||
system_message="You are Dolphin, a helpful AI assistant.", | ||
roles=("<|im_start|>user", "<|im_start|>assistant"), | ||
sep_style=SeparatorStyle.CHATML, | ||
sep="<|im_end|>", | ||
stop_token_ids=[32000, 32001], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from ..settings import ConversationSettings, SeparatorStyle | ||
|
||
# Phi default template | ||
phi = ConversationSettings( | ||
name="phi", | ||
roles=("<|user|>", "<|assistant|>"), | ||
sep_style=SeparatorStyle.ADD_NEW_LINE_SINGLE, | ||
system_template="<|system|>\n{system_message}", | ||
sep="<|end|>\n", | ||
stop_str="<|end|>", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters