Unverified Commit 4cb59dea authored by Cyrus Leung's avatar Cyrus Leung Committed by GitHub
Browse files

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


Signed-off-by: default avatarDarkLight1337 <tlleungac@connect.ust.hk>
parent 608b5565
...@@ -71,7 +71,6 @@ class DeepseekV32Renderer(RendererLike): ...@@ -71,7 +71,6 @@ class DeepseekV32Renderer(RendererLike):
content_format="string", content_format="string",
) )
kwargs["return_dict"] = False
prompt_raw = tokenizer.apply_chat_template( prompt_raw = tokenizer.apply_chat_template(
conversation=conversation, conversation=conversation,
messages=messages, messages=messages,
...@@ -98,7 +97,6 @@ class DeepseekV32Renderer(RendererLike): ...@@ -98,7 +97,6 @@ class DeepseekV32Renderer(RendererLike):
content_format="string", content_format="string",
) )
kwargs["return_dict"] = False
prompt_raw = tokenizer.apply_chat_template( prompt_raw = tokenizer.apply_chat_template(
conversation=conversation, conversation=conversation,
messages=messages, messages=messages,
......
...@@ -71,7 +71,6 @@ class Grok2Renderer(RendererLike): ...@@ -71,7 +71,6 @@ class Grok2Renderer(RendererLike):
content_format="string", content_format="string",
) )
kwargs["return_dict"] = False
prompt_raw = tokenizer.apply_chat_template( prompt_raw = tokenizer.apply_chat_template(
conversation=conversation, conversation=conversation,
messages=messages, messages=messages,
...@@ -98,7 +97,6 @@ class Grok2Renderer(RendererLike): ...@@ -98,7 +97,6 @@ class Grok2Renderer(RendererLike):
content_format="string", content_format="string",
) )
kwargs["return_dict"] = False
prompt_raw = tokenizer.apply_chat_template( prompt_raw = tokenizer.apply_chat_template(
conversation=conversation, conversation=conversation,
messages=messages, messages=messages,
......
...@@ -466,7 +466,6 @@ def safe_apply_chat_template( ...@@ -466,7 +466,6 @@ def safe_apply_chat_template(
chat_template=chat_template, chat_template=chat_template,
chat_template_kwargs=kwargs, chat_template_kwargs=kwargs,
) )
resolved_kwargs["return_dict"] = False
try: try:
return tokenizer.apply_chat_template( return tokenizer.apply_chat_template(
......
...@@ -66,7 +66,7 @@ class ChatParams: ...@@ -66,7 +66,7 @@ class ChatParams:
"""The arguments to pass to `tokenizer.apply_chat_template`.""" """The arguments to pass to `tokenizer.apply_chat_template`."""
return merge_kwargs( return merge_kwargs(
self.chat_template_kwargs, self.chat_template_kwargs,
dict(chat_template=self.chat_template), dict(chat_template=self.chat_template, return_dict=False),
) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment