[Bugfix] Fix incompatibility between #33372 and #32863 (#33475)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung
2026-01-31 21:21:32 +08:00
committed by GitHub
parent 608b556507
commit 4cb59dea6a
4 changed files with 1 additions and 6 deletions

View File

@@ -71,7 +71,6 @@ class DeepseekV32Renderer(RendererLike):
content_format="string",
)
kwargs["return_dict"] = False
prompt_raw = tokenizer.apply_chat_template(
conversation=conversation,
messages=messages,
@@ -98,7 +97,6 @@ class DeepseekV32Renderer(RendererLike):
content_format="string",
)
kwargs["return_dict"] = False
prompt_raw = tokenizer.apply_chat_template(
conversation=conversation,
messages=messages,

View File

@@ -71,7 +71,6 @@ class Grok2Renderer(RendererLike):
content_format="string",
)
kwargs["return_dict"] = False
prompt_raw = tokenizer.apply_chat_template(
conversation=conversation,
messages=messages,
@@ -98,7 +97,6 @@ class Grok2Renderer(RendererLike):
content_format="string",
)
kwargs["return_dict"] = False
prompt_raw = tokenizer.apply_chat_template(
conversation=conversation,
messages=messages,

View File

@@ -466,7 +466,6 @@ def safe_apply_chat_template(
chat_template=chat_template,
chat_template_kwargs=kwargs,
)
resolved_kwargs["return_dict"] = False
try:
return tokenizer.apply_chat_template(

View File

@@ -66,7 +66,7 @@ class ChatParams:
"""The arguments to pass to `tokenizer.apply_chat_template`."""
return merge_kwargs(
self.chat_template_kwargs,
dict(chat_template=self.chat_template),
dict(chat_template=self.chat_template, return_dict=False),
)