dotgrammar

dotgrammar is a high-performance shared library for grammar-based structured text generation. It provides efficient algorithms to constrain large language models to generate properly structured outputs that conform to a predefined formal grammar.

Key Features

  • High performance implementation with minimal runtime overhead
  • Support for context-free grammars in multiple formats (GBNF, Lark, yacc, tree-sitter)
  • Simple logit masking API in C++ and Python

Need structured generation?

Email us at [email protected] or schedule a demo call to learn more about dotgrammar.

Support