From 9e247245a2e4137394a19643df72b70e022b43d1 Mon Sep 17 00:00:00 2001 From: BUAADreamer <1428195643@qq.com> Date: Tue, 14 May 2024 16:45:28 +0800 Subject: [PATCH] modify yi-vl template Former-commit-id: d72e6f8dfd670533f3bbdf0bf5e7d596e2dd34ac --- src/llmtuner/data/template.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/llmtuner/data/template.py b/src/llmtuner/data/template.py index 7fa2ccce..631c79c1 100644 --- a/src/llmtuner/data/template.py +++ b/src/llmtuner/data/template.py @@ -857,15 +857,16 @@ _register_template( _register_template( - name="yi-vl", - format_user=StringFormatter(slots=["### Human:\n{{content}}\n### Assistant: "]), + name="yivl", + format_user=StringFormatter(slots=["### Human: {{content}}\n### Assistant:"]), + format_assistant=StringFormatter(slots=[" {{content}}"]), stop_words=["###"], default_system=( "This is a chat between an inquisitive human and an AI assistant. " "Assume the role of the AI assistant. " "Read all the images carefully, and respond to the human's questions with informative, helpful, detailed and polite answers." "这是一个好奇的人类和一个人工智能助手之间的对话。" - "假设你扮演这个AI助手的角色。仔细阅读所有的图像,并对人类的问题做出信息丰富、有帮助、详细的和礼貌的回答。" + "假设你扮演这个AI助手的角色。仔细阅读所有的图像,并对人类的问题做出信息丰富、有帮助、详细的和礼貌的回答。\n\n" ), )