-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Support SPM infill #1492
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
Support SPM infill #1492
Conversation
I also see that |
Actually, since I ended up not using them there let's make it simple and remove them from that PR and add them here. |
This is identical behaviour to llama.cpp I guess any model that doesn't use BOS is recent enough to have the add_bos_token metadata.
My Codestral GGUFs are up for those who wish to test with this option. NOTE: It requires ggml-org/llama.cpp#7644 to not insert garbage |
@CISC looks good overall, do you mind adding something minimal to |
Sure, no problem. |
@abetlen Example added. |
Add
spm_infill
option to perform infill in the Suffix/Prefix/Middle pattern instead of Prefix/Suffix/Middle as some models (like the newCodestral
) prefer this.Also added a tokenizer hack to remove leading space in suffix to improve inference, tested on several different tokenizers/vocabs with success.