Skip to content

Commit

Permalink
Register stablelm-2 conversation template (#2029)
Browse files Browse the repository at this point in the history
  • Loading branch information
rickzx authored Mar 25, 2024
1 parent f04cd3e commit 1c975de
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions python/mlc_llm/conversation_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,21 @@ def get_conv_template(name: str) -> Optional[Conversation]:
)
)

# StableLM-2
ConvTemplateRegistry.register_conv_template(
Conversation(
name="stablelm-2",
system_template=f"{MessagePlaceholders.SYSTEM.value}",
system_message="",
roles={"user": "<|user|>", "assistant": "<|assistant|>"},
seps=["<|endoftext|>", "<|endoftext|>"],
role_content_sep="\n",
role_empty_sep="\n",
stop_str=["<|endoftext|>"],
stop_token_ids=[100257],
)
)

# Llava
ConvTemplateRegistry.register_conv_template(
Conversation(
Expand Down

0 comments on commit 1c975de

Please sign in to comment.