whisper.cpp icon indicating copy to clipboard operation
whisper.cpp copied to clipboard

Move grammar support out of examples? Unify?

Open josharian opened this issue 1 year ago • 3 comments
trafficstars

I'd like to add Go binding support for grammars (for https://github.com/ggerganov/whisper.cpp/issues/1697). It's a bit inconvenient now, because the grammar support is off in an examples directory, and adding stuff from examples to libwhisper.a feels wrong; ditto for the header file.

GBNF seems pretty well established at this point (it is in common in llama.cpp). It'd be nice to make it easier to support.

Could we promote grammar support to core whisper.h/whisper.cpp, similar to llama.cpp, where you simply provide a grammar string?

josharian avatar Mar 05 '24 16:03 josharian