jonathanjordan21 commited on
Commit
1295055
·
verified ·
1 Parent(s): ff12c57

Update messagers/message_composer.py

Browse files
Files changed (1) hide show
  1. messagers/message_composer.py +2 -2
messagers/message_composer.py CHANGED
@@ -76,7 +76,7 @@ class MessageComposer:
76
  self.merged_str = ""
77
 
78
  # https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1#instruction-format
79
- if self.model in ["mixtral-8x7b", "mistral-7b", "mistral-nemo-instruct"]:
80
  self.messages = self.concat_messages_by_role(messages)
81
  self.cached_str = ""
82
  for message in self.messages:
@@ -151,7 +151,7 @@ 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
  # https://huggingface.co/01-ai/Yi-1.5-34B-Chat
154
- elif self.model in ["openchat-3.5", "command-r-plus", "gemma-7b", "yi-1.5-34b", "llama3-8b", "llama3-70b", "qwen2-1.5b-instruct", "qwen2-7b-instruct", "zephyr-7b-beta"]:
155
  # https://discuss.huggingface.co/t/error-with-new-tokenizers-urgent/2847/5
156
  tokenizer = AutoTokenizer.from_pretrained(
157
  self.model_fullname, use_fast=False
 
76
  self.merged_str = ""
77
 
78
  # https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1#instruction-format
79
+ if self.model in ["mixtral-8x7b", "mistral-7b"]:
80
  self.messages = self.concat_messages_by_role(messages)
81
  self.cached_str = ""
82
  for message in self.messages:
 
151
  # https://huggingface.co/NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO#prompt-format
152
  # https://huggingface.co/openchat/openchat-3.5-0106
153
  # https://huggingface.co/01-ai/Yi-1.5-34B-Chat
154
+ elif self.model in ["openchat-3.5", "command-r-plus", "gemma-7b", "yi-1.5-34b", "llama3-8b", "llama3-70b", "qwen2-1.5b-instruct", "qwen2-7b-instruct", "zephyr-7b-beta", "mistral-nemo-instruct"]:
155
  # https://discuss.huggingface.co/t/error-with-new-tokenizers-urgent/2847/5
156
  tokenizer = AutoTokenizer.from_pretrained(
157
  self.model_fullname, use_fast=False