XGrammar
github.com · Open source · Active
Structured generation engine that constrains LLM output to a grammar
- AI & agents
- Open source
- Python
- Day-7 check
- Day-30 check
- llm
- structured output
- inference
- large language model
- structured generation
- json
- Stars
- 2k
- Forks
- 289
- Open issues
- 69
- Last commit
- Releases
- 40
- Found
- 2 years ago
GitHub figures as of . They are context, not a ranking.
XGrammar is a structured generation and reasoning engine that constrains large language model output to a grammar, with code spanning Python, C++, TypeScript and CUDA. It is aimed at developers building LLM inference systems who need efficient, portable structured output.
Repository description on GitHub: “Fast, Flexible and Portable Structured Generation”
What it does
- Structured generation that constrains LLM output
- Python package published on PyPI
- Technical report and documentation available
Good for
- Force an LLM to emit valid JSON or other structured output
- Add grammar-constrained generation to an inference engine
Suits: Developers building LLM inference or structured-output pipelines.
What you can try
Install the Python package from PyPI, as its README indicates.
Install
brew install xgrammarpip install xgrammarConfirmed against the package registry. Read the project’s own instructions before running anything.
Links go to third-party sites KipFound does not control. KipFound has not installed, audited or tested this software.
Found vs. released
Kip first saw XGrammar on , when its repository was created; it is packaged in Homebrew. The oldest published release on GitHub is v0.1.4, dated . Its first tagged release came 150 days after it was found. 40 releases have been published in total; the latest is v0.2.9 ().
Day-7 and day-30 updates
Day 7 no new release
- No tagged release was published in the first 7 days after it was found (GitHub release dates).
Checked , later than day 7 because tracking began after.
Day 30 no new release
- No tagged release was published in the first 30 days after it was found (GitHub release dates).
Checked , later than day 30 because tracking began after.
Release timeline every entry links to its source
- Repository created on GitHub: mlc-ai/xgrammar
- Found: its repository was created; it is packaged in Homebrew. Homebrew
- Release v0.1.4
- Release v0.2.6rc2 (pre-release)
- Release v0.2.5.post1
- Release v0.2.6
- Release v0.2.7
- Release v0.2.8
- Release v0.2.9
- Day-7 check recorded by Kip (details)
- Day-30 check recorded by Kip (details)
Showing the first and the 6 latest of 40 releases. All releases on GitHub
Quick answers
- When was XGrammar released?
- Its first tagged release on GitHub is dated 25 Nov 2024. Kip found it on Homebrew on 28 Jun 2024.
- Is XGrammar open source?
- Its source is public on GitHub at mlc-ai/xgrammar under the Apache-2.0 licence.
- What does XGrammar run on?
- Library.
- Is XGrammar free?
- It is open source, so the code is free to read and run; check the licence for terms.
- Is XGrammar still maintained?
- Yes. It had a commit or release in the last 90 days as of the latest check.
Provenance
| Source | Record | Last checked |
|---|---|---|
| Homebrew | listing official API record | |
| GitHub repository | mlc-ai/xgrammar REST API record | |
| GitHub Releases | release list REST API record |
Stable ID brew-xgrammar. Summary drafted with AI from the source records above and checked against KipFound’s rules before publishing. Dates and release facts come only from those records.
Share
Similar tools
Made this, or spotted a mistake? Ask for a correction or removal. No account or email address needed.