-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Add roleplay.gbnf #5368
Add roleplay.gbnf #5368
Conversation
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch (oobabooga#5257)
Merge dev branch
Merge dev branch
Does this work?
If not, I may need to pull the latest code from https://github.com/epfl-dlab/transformers-CFG. |
Indeed this works fine like that, thanks for the catch, I've simplified the grammar. |
Nice, thanks. That's a creative and interesting useful use of grammar. Looks good to merge. |
@YakuzaSuske Oh yeah you are right, the [a-zA-Zà-üÀ-Ü] rules are only working on llamacpp_hf (not llamacpp) but the [A-ZéÉàÀèÈùÙâÂêÊîÎôÔûÛçÇöÖüÜäÄëË0-9] rules are working everytime. |
The transformers-CFG code applies only to llamacpp_HF and HF loaders, and not to llama.cpp. So it's a problem with llama.cpp grammar parsing. |
Hello,
This gbnf is centred on the typical roleplaying grammar structure:
Any feedback is welcome, we can discuss how to make this work best. For example, I wondered if (action + speech) would be more interesting to think about than (speech + action).
Edit: I also enforced UTF-8 encoding when loading the gbnf, because that's what happens if we don't: