Explicitly set return_dict for apply_chat_template (#33372)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2026-01-30 07:27:04 +00:00
committed by GitHub
parent 726d89720c
commit 9432ed8c7e
11 changed files with 22 additions and 10 deletions
+2
View File
@@ -70,6 +70,7 @@ class DeepseekV32Renderer(RendererLike):
content_format="string",
)
kwargs["return_dict"] = False
prompt_raw = tokenizer.apply_chat_template(
conversation=conversation,
messages=messages,
@@ -100,6 +101,7 @@ class DeepseekV32Renderer(RendererLike):
content_format="string",
)
kwargs["return_dict"] = False
prompt_raw = tokenizer.apply_chat_template(
conversation=conversation,
messages=messages,
+2
View File
@@ -70,6 +70,7 @@ class Grok2Renderer(RendererLike):
content_format="string",
)
kwargs["return_dict"] = False
prompt_raw = tokenizer.apply_chat_template(
conversation=conversation,
messages=messages,
@@ -100,6 +101,7 @@ class Grok2Renderer(RendererLike):
content_format="string",
)
kwargs["return_dict"] = False
prompt_raw = tokenizer.apply_chat_template(
conversation=conversation,
messages=messages,
+1
View File
@@ -465,6 +465,7 @@ def safe_apply_chat_template(
chat_template=chat_template,
chat_template_kwargs=kwargs,
)
resolved_kwargs["return_dict"] = False
try:
return tokenizer.apply_chat_template(