Structs§
- Batch
Grammar Matcher - A batched driver over many
GrammarMatchers — fills one packed bitmask tensor for a whole decode batch in parallel. - Bitmask
Slice - A mutable, vocab-sized view over a caller-owned
i32slice. - Grammar
Matcher - A stateful matcher that matches sampled tokens against a compiled grammar — the core of grammar-guided generation.
- Token
Bitmask - A packed bit-per-token accept mask owned by a
super::GrammarMatcher.
Enums§
- Fill
Error - Why
GrammarMatcher::fill_next_token_bitmaskcould not fill.
Constants§
- BITS_
PER_ WORD - Bits packed per
i32word — fixed by the C++DynamicBitset.
Functions§
- bitmask_
size - Number of
i32words needed to hold a bit-per-token mask for a vocabulary ofvocab_sizetokens.