Searches without login should now work. You must get asked to click a button.
Some translations wanted please.
New RSS 2.0 and Atom feeds are here. The old /backend/ feeds still work, but will be redirected later, so please update your subscriptions. Details.
Port details
py-xgrammar Efficient, flexible and portable structured generation
0.2.9 misc Σ=0 search for ports that depend on this port Find issues related to this port Report an issue related to this port View this port on Repology. pkg-fallout 0.1.33Version of this port present on the latest quarterly branch.
Maintainer: yuri@FreeBSD.org search for ports maintained by this maintainer
Port Added: 2026-04-07 10:00:31
Last Update: 2026-11-14 20:15:03
Commit Hash: c46a24b
Also Listed In: python
License: APACHE20
WWW:
https://xgrammar.mlc.ai/
https://github.com/mlc-ai/xgrammar
Description: #
xgrammar enables efficient, flexible and portable structured generation for large language models. It provides grammar-constrained decoding that works with JSON schemas, regular expressions, and custom context-free grammars.
HomepageHomepage    cgit ¦ Codeberg ¦ GitHub ¦ GitLab ¦ SVNWeb - no subversion history for this port
Manual pages: #
FreshPorts has no man page information for this port.
pkg-plist: as obtained via: make generate-plist #
There is no configure plist information for this port.
USE_RC_SUBR (Service Scripts)
  • no SUBR information found for this port
Dependency lines:
  • ${PYTHON_PKGNAMEPREFIX}xgrammar>0:misc/py-xgrammar@${PY_FLAVOR}
To install the port: #
cd /usr/ports/misc/py-xgrammar/ && make install clean
To add the package, run one of these commands:
  • pkg install misc/py-xgrammar
  • pkg install py312-xgrammar
NOTE: If this package has multiple flavors (see below), then use one of them instead of the name specified above.
NOTE: This is a Python port. Instead of py312-xgrammar listed in the above command, you can pick from the names under the Packages section.
PKGNAME: py312-xgrammar
Package flavors (<flavor>: <package>) #
  • py312: py312-xgrammar
distinfo: #
TIMESTAMP = 1794585821 SHA256 (xgrammar-0.2.9.tar.gz) = 87b466bca2475e29bb0323abc62c6c33cbcbcff47e5fb800a3e2099ac9620b90 SIZE (xgrammar-0.2.9.tar.gz) = 2763853

Packages (timestamps in pop-ups are UTC): #
py312-xgrammar
ABIaarch64amd64armv6armv7i386
FreeBSD:14:latest-0.1.33_1---
FreeBSD:14:quarterly-0.1.33_1---
FreeBSD:15:latest-0.1.33_1n/a-n/a
FreeBSD:15:quarterly-0.1.33_1n/a-n/a
FreeBSD:16:latest-0.1.33_1n/a-n/a
Dependencies #
NOTE: FreshPorts displays only information on required and default dependencies. Optional dependencies are not covered.
Build dependencies: #
  1. py312-apache-tvm-ffi>=0.1.11 : misc/py-apache-tvm-ffi@py312
  2. py312-scikit-build-core>=0.10.0 : devel/py-scikit-build-core@py312
  3. py312-setuptools-scm>=8.1 : devel/py-setuptools-scm@py312
  4. cmake : devel/cmake-core
  5. python3.12 : lang/python312
  6. py312-build>=0 : devel/py-build@py312
  7. py312-installer>=0 : devel/py-installer@py312
Test dependencies: #
  1. py312-cohere-melody>=0.13.0 : misc/py-cohere-melody@py312
  2. py312-huggingface-hub>0 : misc/py-huggingface-hub@py312
  3. py312-protobuf>0 : devel/py-protobuf@py312
  4. py312-pytest-run-parallel>0 : devel/py-pytest-run-parallel@py312
  5. py312-sentencepiece>0 : textproc/py-sentencepiece@py312
  6. py312-tiktoken>0 : textproc/py-tiktoken@py312
  7. py312-pytest>=7,1 : devel/py-pytest@py312
  8. python3.12 : lang/python312
Runtime dependencies: #
  1. py312-apache-tvm-ffi>=0.1.11 : misc/py-apache-tvm-ffi@py312
  2. py312-numpy>0 : math/py-numpy@py312
  3. py312-pydantic2>0 : devel/py-pydantic2@py312
  4. py312-pytorch>=1.10.0 : misc/py-pytorch@py312
  5. py312-transformers>=4.38.0 : misc/py-transformers@py312
  6. py312-typing-extensions>=4.9.0 : devel/py-typing-extensions@py312
  7. python3.12 : lang/python312
This port is required by: #
for Run #
  1. misc/py-vllm

Configuration Options: #
No options to configure
Options name: #
misc_py-xgrammar
USES: #
cmake:indirect python
pkg-message: #
FreshPorts was unable to extract/find any pkg message
Master Sites: #
Expand this list (2 items)
Collapse this list.
  1. https://files.pythonhosted.org/packages/source/x/xgrammar/
  2. https://pypi.org/packages/source/x/xgrammar/
Collapse this list.

Number of commits found: 4 #

Commit History - (may be incomplete: for full details, see links to repositories near top of page)
CommitCreditsLog message
0.2.9
14 Nov 2026 20:15:03
commit hash: c46a24b9c816325c894464c752eb6cd5a54cde1dcommit hash: c46a24b9c816325c894464c752eb6cd5a54cde1dcommit hash: c46a24b9c816325c894464c752eb6cd5a54cde1dcommit hash: c46a24b9c816325c894464c752eb6cd5a54cde1d files touched by this commit
Yuri Victorovich (yuri) search for other commits by this committer
misc/py-xgrammar: update 0.1.33 → 0.2.9
0.1.33_1
05 May 2026 19:29:37
commit hash: 2bf3834a197ccf8956332378eda8dd7577965246commit hash: 2bf3834a197ccf8956332378eda8dd7577965246commit hash: 2bf3834a197ccf8956332378eda8dd7577965246commit hash: 2bf3834a197ccf8956332378eda8dd7577965246 files touched by this commit
Max Brazhnikov (makc) search for other commits by this committer
*/*: bump PORTREVISION after switching to NumPy 2.x
0.1.33
05 May 2026 19:29:37
commit hash: b0b4d9e1eae890d0de1591e20fb37358439a2ff6commit hash: b0b4d9e1eae890d0de1591e20fb37358439a2ff6commit hash: b0b4d9e1eae890d0de1591e20fb37358439a2ff6commit hash: b0b4d9e1eae890d0de1591e20fb37358439a2ff6 files touched by this commit Sanity Test Failure
Max Brazhnikov (makc) search for other commits by this committer
*/*: Switch to NumPy 2.x

PR:		294328
Exp-run:	antoine
0.1.33
07 Apr 2026 09:58:07
commit hash: 56eb0aed6ba0d037ccd31cdc85411645ee84b5afcommit hash: 56eb0aed6ba0d037ccd31cdc85411645ee84b5afcommit hash: 56eb0aed6ba0d037ccd31cdc85411645ee84b5afcommit hash: 56eb0aed6ba0d037ccd31cdc85411645ee84b5af files touched by this commit
Yuri Victorovich (yuri) search for other commits by this committer
misc/py-xgrammar: New port: Efficient, flexible and portable structured
generation

Number of commits found: 4