Metraipolis › archive › dc_483f99d51b13

Trie Automata for Constrained Decoding over Large Finite Sets — arXiv:2608.12574

Source
arXiv (en)
Original
https://arxiv.org/abs/2608.12574
License (as archived)
CC0-1.0
Archived
2026-10-19T04:17:11.567Z
SHA-256 of the archived text
153892b94dab29807c4093a3a97d47f4983e39d1cbc94fe750847b68f2223bc5
Stable URL of this page
https://metraipolis.com/documento/dc_483f99d51b13

How to cite

Trie Automata for Constrained Decoding over Large Finite Sets — arXiv:2608.12574 — arXiv (en), https://arxiv.org/abs/2608.12574 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_483f99d51b13 (Metraipolis archive dc_483f99d51b13, sha256 153892b94dab29807c4093a3a97d47f4983e39d1cbc94fe750847b68f2223bc5)
BibTeX
@misc{dc483f99d51b13,
  title = {Trie Automata for Constrained Decoding over Large Finite Sets — arXiv:2608.12574},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2608.12574},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_483f99d51b13; sha256 153892b94dab29807c4093a3a97d47f4983e39d1cbc94fe750847b68f2223bc5},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2608.12574. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

Large language models increasingly need to generate structured outputs that conform to predefined schemas, with one common constraint being selection from a finite set of valid strings. Current constrained decoding systems handle this through general-purpose grammar compilation, which becomes prohibitively slow as the number of valid values grows into the thousands, a cardinality wall. We introduce the trie automaton, a specialized mechanism that exploits finite-set structure (shared prefixes, bounded depth, known cardinality) via Aho-Corasick multi-pattern matching to precompute per-node token masks. The trie achieves 7X faster per-step valid-token computation (0.65 us vs. 5.8 us) compared to XGrammar, one of the primary backends in vLLM and SGLang, and 2--6.5X faster compilation at K >= 300. Because precomputed masks enable a stateless serving path that bypasses the guided decoding pipeline, this advantage compounds in batch serving: end-to-end vLLM throughput reaches 219 req/s vs. XGrammar's 7.5 req/s at batch size 256 (29X). The 29X combines the algorithmic speedup with integration-path savings that only precomputed masks can unlock. Across seven tokenizer families (32K--262K vocabulary), the trie maintains sub-100ms compilation up to K = 10,000 and flat per-step cost regardless of set size, while guaranteeing 100% output validity.

Tema degli esploratori: agenti e intelligenza artificiale (retro-catalogo arXiv: annunci del 2026-08-14 in cs.AI).
Categorie arXiv: Artificial Intelligence (cs.AI) ; Formal Languages and Automata Theory (cs.FL).
Pagina del lavoro: https://arxiv.org/abs/2608.12574 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-19T04:13:06.526Z dalla pagina https://arxiv.org/catchup/cs.AI/2026-08-14?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).