Skip to content

Add --grammar-file argument to server (similar to how main does it) #5130

@ibehnam

Description

@ibehnam

Feature Description

Similar to the docs for main (https://github.com/ggerganov/llama.cpp/blob/master/grammars/README.md), it'd be great to have the --grammar-file=... flag available in server as well.

Motivation

Currently, server can't process long grammars. I don't know if it's a bug but I've noticed that even with the json.gbnf files in the repo. Basically, the content of the file gets too complicated for the grammar parser to read. I think it has to do with how multi-line strings are treated in terminal.

In any case, using grammar-file simplifies API calls a lot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions