Trie Automata for Constrained Decoding over Large Finite Sets
The trie automaton is introduced, a specialized mechanism that exploits finite-set structure via Aho-Corasick multi-pattern matching to precompute per-node token masks, and achieves 7X faster per-step valid-token computation compared to XGrammar and 2.5X faster compilation at K>= 300.