Skip to content

Conversation

@KonradSzafer
Copy link
Contributor

This PR introduces a new method that allows users to retrieve the chat template. It encapsulates the logic from the existing apply_chat_template method, enabling users to access the template without applying it.

Motivation:

  • Tracking of used chat templates in evaluation libraries for reproducibility
  • Allowing casual users to explicitly know which template is being used

I saw that you plan to introduce simplifications for managing chat templates in the next release (#31733). Please let us know if you think this will be relevant, thanks!

@Rocketknight1 @ArthurZucker @clefourrier

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

LGTM, just want to make sur this is alright with you cc @Rocketknight1

Copy link
Member

@Rocketknight1 Rocketknight1 left a comment

Choose a reason for hiding this comment

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

This is a clean PR, and it makes sense to me. Thank you!

@Rocketknight1
Copy link
Member

@KonradSzafer if you pull the latest version of main and rebase your PR the failing test should pass and we can merge this!

@KonradSzafer KonradSzafer force-pushed the add-get-chat-template branch from d52c60b to 8470940 Compare July 22, 2024 17:34
@KonradSzafer
Copy link
Contributor Author

@ArthurZucker @Rocketknight1 thanks for the review! Done!

@ArthurZucker ArthurZucker merged commit 7405c1c into huggingface:main Jul 23, 2024
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.

4 participants