[Feature] Support minicpmv v2.6 (#2785)
Co-authored-by: Chayenne <zhaochen20@outlook.com> Co-authored-by: yizhang2077 <1109276519@qq.com>
This commit is contained in:
co-authored by
Chayenne
yizhang2077
parent
c2f212d672
commit
3d93f84a00
@@ -452,7 +452,6 @@ def generate_chat_conv(
|
||||
|
||||
# Add a blank message for the assistant.
|
||||
conv.append_message(conv.roles[1], None)
|
||||
|
||||
return conv
|
||||
|
||||
|
||||
@@ -555,3 +554,17 @@ register_conv_template(
|
||||
image_token="<|vision_start|><|image_pad|><|vision_end|>",
|
||||
)
|
||||
)
|
||||
|
||||
# Reference: https://huggingface.co/openbmb/MiniCPM-V-2_6#usage
|
||||
register_conv_template(
|
||||
Conversation(
|
||||
name="minicpmv",
|
||||
system_message="You are a helpful assistant",
|
||||
system_template="<|im_start|>system\n{system_message}.",
|
||||
roles=("<|im_start|>user", "<|im_start|>assistant"),
|
||||
sep="<|im_end|>\n",
|
||||
sep_style=SeparatorStyle.ADD_NEW_LINE_SINGLE,
|
||||
stop_str=("<|im_end|>", "<|endoftext|>"),
|
||||
image_token="(<image>./</image>)",
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user