-
Notifications
You must be signed in to change notification settings - Fork 11.8k
feature request - disabling tokenizer in conversion / inference #1765
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
Comments
Do you mean something along the lines of just giving input as token ids separated by spaces? Sounds interesting. Is there really evidence that something like HF's tokenizer tokenizes in a significantly way than the built in one? You can use |
|
It should be a very simple change. I guess the main question would be if something like that would actually get merged since it's so niche. I guess one way to handle it might be to have it as a compile flag which is disabled by default to avoid confusing users. It also probably wouldn't really work too well with stuff like interactive mode. |
You can totally do this with the C++ API — all of the underlying inference APIs run on tokens and you typically have to manually convert between strings and tokens. |
@j-f1 i see, thanks! but i would need a convert.py that works without a tokenizer. i'll look into the code. @KerfuffleV2 it'd be niche if llama keeps dominating the (open-source) LLM world. but, we already have Falcon - and there will be only so many more! surely a lot of them would be not based on any thoughts, @ggerganov? or am i missing anything? |
We can extend the
|
in #1764 i asked if it'd be possible to add a Huggingface tokenizer. but - HF tokenizers are quite flexible and officially supporting them in llama.cpp (or ggml?) might be a lot of hassle.
a much easier workaround would be allowing to disable tokenizers in both model conversion and inference. this means the users are supposed to encode(text)/decode(ids) in their implementation for using llama.cpp. in my case, for example, i'll use a python GUI and a wrapper anyway.
i'd like to work on it, but honestly i don't think i understand enough to be able to do this. i'd appreciate very much if anyone's interested in it.
The text was updated successfully, but these errors were encountered: