[model] support ERNIE-4.5-VL Models (#9521)

This commit is contained in:
Hertz
2025-11-24 16:48:06 +08:00
committed by GitHub
parent 3140c242f0
commit 591fc9ed02
3 changed files with 66 additions and 0 deletions

View File

@@ -963,6 +963,19 @@ register_template(
)
register_template(
name="ernie_vl",
format_user=StringFormatter(slots=["User: {{content}}"]),
format_assistant=StringFormatter(slots=["\nAssistant: {{content}}<|end_of_sentence|>"]),
format_system=StringFormatter(slots=["{{content}}\n"]),
stop_words=["<|end_of_sentence|>"],
replace_eos=True,
replace_jinja_template=True,
template_class=ReasoningTemplate,
mm_plugin=get_mm_plugin(name="ernie_vl", image_token="<|image@placeholder|>", video_token="<|video@placeholder|>"),
)
register_template(
name="exaone",
format_user=StringFormatter(slots=["[|user|]{{content}}\n[|assistant|]"]),