merge data part to the text stream

This commit is contained in:
BUAADreamer
2024-04-25 19:58:47 +08:00
parent 2ee3046eb0
commit 42c90c8183
6 changed files with 18 additions and 38 deletions

View File

@@ -1012,8 +1012,8 @@ _register_template(
_register_template(
name="llava",
format_user=StringFormatter(slots=["USER: {{content}} "]),
format_assistant=StringFormatter(slots=["ASSISTANT: {{content}}"]),
format_user=StringFormatter(slots=["USER: {{content}} ASSISTANT: "]),
format_assistant=StringFormatter(slots=["{{content}}", {"eos_token"}]),
default_system=(
"A chat between a curious user and an artificial intelligence assistant. "
"The assistant gives helpful, detailed, and polite answers to the user's questions."