Skip to content

Conversation

@juliendenize
Copy link
Contributor

@juliendenize juliendenize commented Oct 31, 2025

What does this PR do?

  1. 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.
  1. Add ValidationMode as a string support to avoid import from mistral-common for the user.

  2. Fix decode when user passes an int instead of a sequence of ints

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

@juliendenize juliendenize force-pushed the patch_mistral_tokenizer_2 branch from ef7d5fb to 0b817f9 Compare November 5, 2025 15:59
@juliendenize juliendenize changed the title Patch Mistral Common Tokenizer 2: fix add_special_tokens Patch Mistral Common Tokenizer 2 Nov 5, 2025
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