-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Missing tokenizer tests #3730
Comments
If it's the same deal as what I did in the stablelm PR, I can do that tomorrow |
Should we apply this fix to conversion scripts of other for i in range(vocab_size):
- tokens.append(reverse_vocab[i] if i in reverse_vocab else f"[PAD{i}]")
- scores.append(0.0) # dummy
- toktypes.append(gguf.TokenType.NORMAL)
+ if i not in reverse_vocab:
+ tokens.append(f"[PAD{i}]")
+ toktypes.append(gguf.TokenType.USER_DEFINED)
+ elif reverse_vocab[i] in added_vocab:
+ # NOTE: wouldn't we like to distinguish CONTROL tokens here?
+ tokens.append(reverse_vocab[i])
+ toktypes.append(gguf.TokenType.USER_DEFINED)
+ else:
+ tokens.append(reverse_vocab[i])
+ toktypes.append(gguf.TokenType.NORMAL) |
Good idea, but no: let us see and fix the issues accordingly. |
@Galunid : I retested conversion of
incoorperating @jploski 's explanation of how to detect special tokens. Tests work still ( |
Sure, to clarify, you mean to rework all the gpt2 conversion scripts and update the vocabs in the test PR? |
As you like and your time permits. I hope someone will object if this is the wrong way to go. |
AFAIU we are missing tokenizer tests for supported models like
It would be great if anyone would be helping out.
The text was updated successfully, but these errors were encountered: