Skip to content
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

[Feature]: GBNF Support #890

Open
Autumnlight02 opened this issue Dec 15, 2024 · 3 comments
Open

[Feature]: GBNF Support #890

Autumnlight02 opened this issue Dec 15, 2024 · 3 comments

Comments

@Autumnlight02
Copy link
Contributor

🚀 The feature, motivation and pitch

To align the feature set of llamacpp and Aphrodite

Alternatives

Grammar using the openai spec, but thats nowhere close.

Additional context

https://github.com/ggerganov/llama.cpp/tree/master/grammars
May be interesting for mass usage, and I would personally need it for some game projects which always need a structured output but also the throughput only aphrodite can offer

@sgsdxzy
Copy link
Collaborator

sgsdxzy commented Dec 17, 2024

I think aphro already supports EBNF, and various guided decoding options provided by outlines/lm-format-enforcer. What feature is missing from outlines but present in llamacpp?

@Autumnlight02
Copy link
Contributor Author

Wiki has no results for EBNF

@sgsdxzy
Copy link
Collaborator

sgsdxzy commented Dec 19, 2024

There are various guided_* options in the api, if you want context-free grammars you should be using guided_grammar
https://github.com/dottxt-ai/outlines?tab=readme-ov-file#using-context-free-grammars-to-guide-generation is the documentation for outlines.
But guided_json or guided_regex should have covered most use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants