Skip to content

Revert return dict and wrap apply_chat_template#691

Merged
awni merged 1 commit into
mainfrom
wrap_chat_template
Dec 18, 2025
Merged

Revert return dict and wrap apply_chat_template#691
awni merged 1 commit into
mainfrom
wrap_chat_template

Conversation

@awni
Copy link
Copy Markdown
Member

@awni awni commented Dec 18, 2025

This reverts a previous change I made using return_dict=False in apply_chat_template and instead wraps the method.

I think it's preferable since it's simpler and doesn't break old examples we have everywhere (e.g. in all our models on Hugging Face).

Also I this is a useful step towards enabling custom chat templates / other tokenization (e.g. for DSV3.2).

@awni awni requested a review from angeloskath December 18, 2025 20:41
Copy link
Copy Markdown
Member

@angeloskath angeloskath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good point! I should have thought of that :-/ ...

@awni awni merged commit 657a66c into main Dec 18, 2025
2 checks passed
@awni awni deleted the wrap_chat_template branch December 18, 2025 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants