Skip to content

Conversation

@juliendenize
Copy link
Contributor

@juliendenize juliendenize commented Oct 31, 2025

What does this PR do?

Fixes the behavior of add_special_tokens to match PretrainedTokenizer goals:

  • if mode is finetuning: add both bos and eos tokens
  • if mode is test: add only bos tokens so that the model can generate freely.

Also adds the possibility to use ValidationMode as a string to avoid import from mistral-common for the user.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

cc @patrickvonplaten for viz

@ArthurZucker and @itazap

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.

1 participant