-
Notifications
You must be signed in to change notification settings - Fork 34
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
Sampler Expansion - GBNF Grammar #54
Comments
It's probably better to use a custom parser, as the |
@pedro-devv I think that this will fit #50, and this functionality can be implemented as a new |
For what it's worth I got a pretty poor implementation of this working yesterday that being said I'm fairly certain just a new
I'm assuming it probably makes the most sense to store the opaque grammar object in an Option attached to the Sampler and then just pass it through to the sampler stages when applicable as well as call accept_token after token selection within the sample method when applicable. |
Well, sampler stages have access to the tokens in the current context. We should be able to handle this entirely within a |
Currently the Sampler does not actually support sampling with grammar what's currently in place just seems like a placeholder and not actually used in sampling. I'm not sure if this fits directly in with #38 but would be another nice improvement. There's a few different options for implementing this we could probably take a dependency on the llama.cpp parser or we could try and roll a custom GBNF parser I'm not sure what would really be ideal here.
The text was updated successfully, but these errors were encountered: