Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enabling mistral training by adding mistral template #1211

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions llava/conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class SeparatorStyle(Enum):
MPT = auto()
PLAIN = auto()
LLAMA_2 = auto()

biomistral =auto()

@dataclasses.dataclass
class Conversation:
Expand Down Expand Up @@ -357,7 +357,15 @@ def dict(self):
sep="",
sep2="</s>",
)

conv_biomistral = Conversation(
system="""<s> [INST] system Answer the questions.<s>""",
roles=("[INST]user\n", "[/INST]assistant\n"),
version="mistral",
messages=(),
offset=0,
sep_style=SeparatorStyle.biomistral,
sep="<s>",
)
conv_chatml_direct = Conversation(
system="""<|im_start|>system
Answer the questions.""",
Expand All @@ -379,7 +387,7 @@ def dict(self):
"mistral_instruct": conv_mistral_instruct,
"chatml_direct": conv_chatml_direct,
"mistral_direct": conv_chatml_direct,

"mistral_bio":conv_biomistral,
"plain": conv_llava_plain,
"v0_plain": conv_llava_plain,
"llava_v0": conv_llava_v0,
Expand Down