[GH-ISSUE #2895] May I add GBNF support? #48282

Closed
opened 2026-04-28 07:35:23 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @josharian on GitHub (Mar 3, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2895

Hi! I see you're drowning in issues and PRs here. :)

Partly as a follow-up to #2623, I'd like to add support for arbitrary GBNF. I'm going to do this for myself regardless.

The question is: Should I polish it and document it and upstream it?

The trickiest API part is the command-line interface. The server can just grow a "gbnf" request param. The command line...maybe gbnf-file instead? (An alternative is curl-like, where it is just "gbnf", but a value starting with @ causes it to be read from a file.) Or just omit it from the command line?

Originally created by @josharian on GitHub (Mar 3, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2895 Hi! I see you're drowning in issues and PRs here. :) Partly as a follow-up to #2623, I'd like to add support for arbitrary GBNF. I'm going to do this for myself regardless. The question is: Should I polish it and document it and upstream it? The trickiest API part is the command-line interface. The server can just grow a "gbnf" request param. The command line...maybe gbnf-file instead? (An alternative is curl-like, where it is just "gbnf", but a value starting with `@` causes it to be read from a file.) Or just omit it from the command line?
Author
Owner

@josharian commented on GitHub (Mar 3, 2024):

Oh wow, I just found the pull requests adding GBNF and json schema support. It would be really great to get some of those in…

<!-- gh-comment-id:1975259844 --> @josharian commented on GitHub (Mar 3, 2024): Oh wow, I just found the pull requests adding GBNF and json schema support. It would be really great to get some of those in…
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#48282