Home Projects xgrammar
xgrammar
C++

xgrammar

Fast, Flexible and Portable Structured Generation

by mlc-ai · GitHub
Stars
Forks
License
Created
Last commit
Language
large-language-modelsstructured-generationApache-2.0C++
View on GitHub
In plain words

Generate structured data efficiently with XGrammar, which is compatible with various AI frameworks.

You maintain this project?

Claim its page: indexed whatever its rank, translated into six languages, and enriched with what you write yourself.

Claim this page →
xgrammar — GitHub preview card
📈 Star history
1.9k1.8k
2026-07-202026-08-31
📈 Track xgrammar

Get an email alert on its next release or when it starts trending — never miss the moment.

Free · no card · unsubscribe anytime
Get email alerts →
📄 About

Fast, Flexible and Portable Structured Generation

xgrammar has 1.9k stars on GitHub. It has been forked 195 times. xgrammar is written mainly in C++. It has been in active development since 2024. xgrammar is available under the Apache-2.0 license. Its main topics are large-language-models, structured-generation.

Frequently asked questions

What is xgrammar?

Fast, Flexible and Portable Structured Generation

Is xgrammar open source?

xgrammar is an open-source project. It is released under the Apache-2.0 license.

Is xgrammar free?

Yes. xgrammar is free and open source — you can use, modify and self-host it.

What license does xgrammar use?

xgrammar is available under the Apache-2.0 license.

What language is xgrammar written in?

xgrammar is written mainly in C++.

🏅 Maintainer of this project?
olud.ai badge — xgrammar

Add this live badge to your README — your GitHub stars and directory rank, refreshed daily.

[![olud.ai](https://olud.ai/badge.php?tool=mlc-ai-xgrammar)](https://olud.ai/project/mlc-ai-xgrammar.html)
More badge options →
🧬 Shares DNA with

Measured from GitHub topics shared by both projects, weighted by how rare each topic is.