Spaces:
Running
Running
Husnain
commited on
💎 [Feature] New model supported: command-r-plus (CohereForai/c4ai-com…
Browse files
messagers/message_composer.py
CHANGED
@@ -151,8 +151,8 @@ class MessageComposer:
|
|
151 |
# https://huggingface.co/NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO#prompt-format
|
152 |
# https://huggingface.co/openchat/openchat-3.5-0106
|
153 |
# elif self.model in ["openchat-3.5", "nous-mixtral-8x7b"]:
|
154 |
-
|
155 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
156 |
self.merged_str = tokenizer.apply_chat_template(
|
157 |
messages, tokenize=False, add_generation_prompt=True
|
158 |
)
|
@@ -164,7 +164,8 @@ if __name__ == "__main__":
|
|
164 |
# model = "mixtral-8x7b"
|
165 |
# model = "nous-mixtral-8x7b"
|
166 |
# model = "gemma-1.1-7b"
|
167 |
-
model = "openchat-3.5"
|
|
|
168 |
composer = MessageComposer(model)
|
169 |
messages = [
|
170 |
{
|
|
|
151 |
# https://huggingface.co/NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO#prompt-format
|
152 |
# https://huggingface.co/openchat/openchat-3.5-0106
|
153 |
# elif self.model in ["openchat-3.5", "nous-mixtral-8x7b"]:
|
154 |
+
elif self.model in ["openchat-3.5", "command-r-plus"]:
|
155 |
+
tokenizer = AutoTokenizer.from_pretrained("self.model_fullname")
|
156 |
self.merged_str = tokenizer.apply_chat_template(
|
157 |
messages, tokenize=False, add_generation_prompt=True
|
158 |
)
|
|
|
164 |
# model = "mixtral-8x7b"
|
165 |
# model = "nous-mixtral-8x7b"
|
166 |
# model = "gemma-1.1-7b"
|
167 |
+
# model = "openchat-3.5"
|
168 |
+
model = "command-r-plus"
|
169 |
composer = MessageComposer(model)
|
170 |
messages = [
|
171 |
{
|