{"id":24020169,"url":"https://github.com/mlc-ai/xgrammar","last_synced_at":"2025-05-14T02:07:24.771Z","repository":{"id":262007345,"uuid":"821257066","full_name":"mlc-ai/xgrammar","owner":"mlc-ai","description":"Fast, Flexible and Portable Structured Generation","archived":false,"fork":false,"pushed_at":"2025-05-08T07:04:04.000Z","size":4217,"stargazers_count":932,"open_issues_count":32,"forks_count":67,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-05-12T05:57:19.362Z","etag":null,"topics":["large-language-models","structured-generation"],"latest_commit_sha":null,"homepage":"https://xgrammar.mlc.ai/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mlc-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-06-28T06:34:27.000Z","updated_at":"2025-05-10T16:48:23.000Z","dependencies_parsed_at":"2024-11-09T21:31:05.625Z","dependency_job_id":"098a2e1b-536d-4e39-b274-7b471f217c78","html_url":"https://github.com/mlc-ai/xgrammar","commit_stats":null,"previous_names":["mlc-ai/xgrammar"],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlc-ai%2Fxgrammar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlc-ai%2Fxgrammar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlc-ai%2Fxgrammar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlc-ai%2Fxgrammar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlc-ai","download_url":"https://codeload.github.com/mlc-ai/xgrammar/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253685213,"owners_count":21947305,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["large-language-models","structured-generation"],"created_at":"2025-01-08T12:00:49.820Z","updated_at":"2025-05-14T02:07:19.760Z","avatar_url":"https://github.com/mlc-ai.png","language":"C++","funding_links":[],"categories":["Inference","A01_文本生成_文本对话","Libraries","C++","4. Agentic AI \u0026 Multi-Agent Systems"],"sub_categories":["Output","大语言对话模型及数据"],"readme":"\u003cdiv align=\"center\" id=\"top\"\u003e\n\n# XGrammar\n\n[![Documentation](https://img.shields.io/badge/docs-latest-green)](https://xgrammar.mlc.ai/docs/)\n[![License](https://img.shields.io/badge/license-apache_2-blue)](https://github.com/mlc-ai/xgrammar/blob/main/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/xgrammar)](https://pypi.org/project/xgrammar)\n[![PyPI Downloads](https://static.pepy.tech/badge/xgrammar)](https://pepy.tech/projects/xgrammar)\n\n**Efficient, Flexible and Portable Structured Generation**\n\n\n[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)\n\n\u003c/div\u003e\n\n## News\n- [2025/02] XGrammar has been officially integrated into [Modular's MAX](https://docs.modular.com/max/serve/structured-output)\n- [2025/01] XGrammar has been officially integrated into [TensorRT-LLM](https://github.com/NVIDIA/TensorRT-LLM).\n- [2024/12] XGrammar has been officially integrated into [vLLM](https://github.com/vllm-project/vllm).\n- [2024/12] We presented research talks on XGrammar at CMU Catalyst, Berkeley SkyLab, MIT HANLAB, THU IIIS, SJTU, Ant Group, SGLang Meetup, Qingke AI, Camel AI. The slides can be found [here](https://docs.google.com/presentation/d/1iS7tu2EV4IKRWDaR0F3YD7ubrNqtGYUStSskceneelc/edit?usp=sharing).\n- [2024/11] XGrammar has been officially integrated into [SGLang](https://github.com/sgl-project/sglang).\n- [2024/11] XGrammar has been officially integrated into [MLC-LLM](https://github.com/mlc-ai/mlc-llm).\n- [2024/11] We officially released XGrammar v0.1.0!\n\n## Overview\n\n\nXGrammar is an open-source library for efficient, flexible, and portable structured generation.\nIt supports general context-free grammar to enable a broad range of structures while bringing careful system optimizations to enable fast executions.\nXGrammar features a minimal and portable C++ backend that can be easily integrated into multiple environments and frameworks,\nand is co-designed with the LLM inference engine and enables zero-overhead structured generation in LLM inference.\n\n\n\n## Get Started\n\nPlease visit our [documentation](https://xgrammar.mlc.ai/docs/) to get started with XGrammar.\n- [Installation](https://xgrammar.mlc.ai/docs/start/install)\n- [Quick start](https://xgrammar.mlc.ai/docs/start/quick_start)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlc-ai%2Fxgrammar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlc-ai%2Fxgrammar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlc-ai%2Fxgrammar/lists"}