Metadata-Version: 2.2
Name: xgrammar
Version: 0.1.11
Summary: Efficient, Flexible and Portable Structured Generation
Home-page: https://github.com/mlc-ai/xgrammar
Author: MLC Team
License: Apache 2.0
Keywords: machine learning inference
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Requires-Python: >=3.8, <4
Description-Content-Type: text/markdown
Requires-Dist: pybind11
Requires-Dist: pydantic
Requires-Dist: pytest
Requires-Dist: sentencepiece
Requires-Dist: tiktoken
Requires-Dist: torch
Requires-Dist: transformers
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

<div align="center" id="top">

# XGrammar

[![Documentation](https://img.shields.io/badge/docs-latest-green)](https://xgrammar.mlc.ai/docs/)
[![License](https://img.shields.io/badge/license-apache_2-blue)](https://github.com/mlc-ai/xgrammar/blob/main/LICENSE)

**Efficient, Flexible and Portable Structured Generation**


[Get Started](#get-started) | [Documentation](https://xgrammar.mlc.ai/docs/) | [Blogpost](https://blog.mlc.ai/2024/11/22/achieving-efficient-flexible-portable-structured-generation-with-xgrammar) | [Technical Report](https://arxiv.org/abs/2411.15100)

</div>

## Overview


XGrammar is an open-source library for efficient, flexible, and portable structured generation.
It supports general context-free grammar to enable a broad range of structures while bringing careful system optimizations to enable fast executions.
XGrammar features a minimal and portable C++ backend that can be easily integrated into multiple environments and frameworks,
and is co-designed with the LLM inference engine and enables zero-overhead structured generation in LLM inference.



## Get Started

Please visit our [documentation](https://xgrammar.mlc.ai/docs/) to get started with XGrammar.
- [Installation](https://xgrammar.mlc.ai/docs/start/install)
- [Quick start](https://xgrammar.mlc.ai/docs/start/quick_start)
