Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mismatch between slow and fast tokenizer #1682

Open
KaiLv69 opened this issue Nov 15, 2024 · 1 comment
Open

Mismatch between slow and fast tokenizer #1682

KaiLv69 opened this issue Nov 15, 2024 · 1 comment

Comments

@KaiLv69
Copy link

KaiLv69 commented Nov 15, 2024

Hi, I trained a sentencepiece tokenizer with prefix match. After convert to HF tokenizer, the tokenization result is not consistent with slow tokenizer.

In sentencepiece, we can choose whether to use prefix match to split the input into token sequences. (https://github.com/google/sentencepiece/blob/d8f741853847553169444afc12c00f4bbff3e9ce/src/bpe_model.cc#L111) I don't find similar func in tokenizers.

Is there any plan to support prefix match for better alignment with sentencepiece?

@ArthurZucker
Copy link
Collaborator

cc @Narsil as I have no direct idea, would need to look into it!

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

No branches or pull requests

2 participants