LlamaGrammar
A GBNF grammar constraining generation (llama.cpp llama_sampler_init_grammar).
Build one with gbnf, jsonSchema or json. GBNF text is validated by llama.cpp when generation starts; a grammar that does not parse fails the generation with com.donfuldauer.kggml.core.InvalidInputException.
Types
Link copied to clipboard
object Companion
Constants and factory functions of LlamaGrammar.