model: Support Janus-pro (#3203)

This commit is contained in:
Mick
2025-03-12 11:02:11 -07:00
committed by GitHub
parent 6f43a9b9f4
commit 01090e8ac3
13 changed files with 2957 additions and 15 deletions
+15
View File
@@ -631,3 +631,18 @@ register_conv_template(
image_token="(<image>./</image>)",
)
)
# Reference: https://github.com/deepseek-ai/Janus?tab=readme-ov-file#janus-pro
register_conv_template(
Conversation(
name="janus-pro",
system_message="You are a helpful language and vision assistant. You are able to understand the visual content that the user provides, and assist the user with a variety of tasks using natural language",
system_template="{system_message}.",
roles=("User", "Assistant"),
sep="\n\n",
sep2="<end▁of▁sentence>",
sep_style=SeparatorStyle.ADD_COLON_TWO,
stop_str=["<|User|>", "<end▁of▁sentence>"],
image_token="<image_placeholder>",
)
)