xgrammar¶
|
This class represents a grammar object in XGrammar, and can be used later in the grammar-guided generation. |
|
The compiler for grammars. |
This is the primary object to store compiled grammar. |
|
|
Match the output of the LLM to the specified grammar, then generate the mask for the next token. |
|
The tokenizer info contains the vocabulary, the type of the vocabulary, and necessary information for the grammar-guided generation. |
|
The type of the vocabulary. |