dev-python/xgrammar
Efficient, flexible structured generation engine for LLMs
ChangeLog
commit f917a48f6c850849842f916c50b6c503735f2f80
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Tue May 19 19:07:09 2026 +0200
dev-python/xgrammar: add 0.2.1
Keep 0.2.0 alongside: vllm 0.21.0 pins xgrammar <1.0.0 and is still
the current installed ebuild; 0.2.1 is the current upstream release.
commit bf2a12a29f11cff35a2cea7c505a7e3e4353eb49
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Sun May 17 00:52:23 2026 +0200
dev-python/xgrammar: symlink bindings into tvm_ffi/lib
xgrammar/load_binding.py calls tvm_ffi's load_lib_module() without
passing extra_lib_paths, so tvm_ffi searches only its own lib/ dirs
and a few PATH entries — none of which include xgrammar's
site-packages dir where the .so lives. Any consumer (e.g. vllm)
dies at xgrammar module init with "Cannot find library
libxgrammar_bindings.so".
Upstream's wheel apparently works by accident — tvm_ffi's wheel
layout differs from a normal site-packages install. Add a
python_install_all hook that creates a symlink at
${tvm_ffi}/lib/libxgrammar_bindings.so pointing at xgrammar's own
.so. Symlink is owned by this package's CONTENTS.
Workaround, not proper fix. Upstream-able fix is patching
xgrammar's load_binding.py to pass extra_lib_paths=[Path(__file__).
parent]. Switch when there's appetite for a maintained patch.
commit 85c23d2b00165f6205bd6e1348771e94e22746c9
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Wed May 13 14:35:39 2026 +0200
dev-python/xgrammar: disable py3.11
commit 15c140112432480f86acb1580b8b8c922c742347
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Sun May 10 18:41:05 2026 +0200
dev-python/xgrammar: switch to DISTUTILS_SINGLE_IMPL
sci-ml/{pytorch,transformers} are SINGLE_IMPL; multi-impl consumer with
bare $ on them produces python_targets_python3_*(-)?
that the single-impl children can't expose. Both versions converted in
one pass.
commit 0a29dd42d85f2fa63bb3ddf5fd6f283cc4bdf98d
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Sun May 10 15:19:02 2026 +0200
dev-python/xgrammar: add 0.2.0
Upstream's `0.1.34+` line gained a hard dep on apache-tvm-ffi (TVM's
FFI shim). The previous 0.1.33 ebuild's stay-pin comment is now
obsolete: apache-tvm-ffi-0.1.11 lands in this overlay, so 0.2.0
solves on the consumer side (vllm pins >=0.1.32, <1.0.0; 0.2.0 fits).
Build-check skipped: xgrammar's CMake configure does
find_package(tvm_ffi) which requires apache-tvm-ffi already merged on
the host (its wheel installs the cmake config at
/usr/lib/python*/site-packages/tvm_ffi/share/cmake/tvm_ffi/). pkgcheck
passes; trust upstream metadata pending end-to-end pre-push validation.
Upstream also lists `triton` as a runtime dep on Linux x86_64, but
neither this overlay nor ::gentoo packages dev-python/triton, and the
xgrammar grammar-matching paths vllm exercises don't require it. Note
left inline; revisit if/when triton is packaged.
commit 74ffa9342744a2eafa46bdbfd553dbc2c58ef669
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Thu May 7 01:03:47 2026 +0200
dev-python/xgrammar: new package
MLC's structured-generation engine for LLMs (CMake/scikit-build-core
+ nanobind C++ extension). Required by dev-python/vllm at
>=0.1.32, <1.0.0.
Pinned to 0.1.33 because 0.1.34+ added a hard runtime dep on
apache-tvm-ffi which isn't packaged. nanobind pin (==2.5.0 upstream)
relaxed to >=2.5.0; built clean against ::gentoo's 2.12.0.
NonsolvableDepsInStable is policy noise — pytorch and transformers are
~amd64 only too.
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Tue May 19 19:07:09 2026 +0200
dev-python/xgrammar: add 0.2.1
Keep 0.2.0 alongside: vllm 0.21.0 pins xgrammar <1.0.0 and is still
the current installed ebuild; 0.2.1 is the current upstream release.
commit bf2a12a29f11cff35a2cea7c505a7e3e4353eb49
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Sun May 17 00:52:23 2026 +0200
dev-python/xgrammar: symlink bindings into tvm_ffi/lib
xgrammar/load_binding.py calls tvm_ffi's load_lib_module() without
passing extra_lib_paths, so tvm_ffi searches only its own lib/ dirs
and a few PATH entries — none of which include xgrammar's
site-packages dir where the .so lives. Any consumer (e.g. vllm)
dies at xgrammar module init with "Cannot find library
libxgrammar_bindings.so".
Upstream's wheel apparently works by accident — tvm_ffi's wheel
layout differs from a normal site-packages install. Add a
python_install_all hook that creates a symlink at
${tvm_ffi}/lib/libxgrammar_bindings.so pointing at xgrammar's own
.so. Symlink is owned by this package's CONTENTS.
Workaround, not proper fix. Upstream-able fix is patching
xgrammar's load_binding.py to pass extra_lib_paths=[Path(__file__).
parent]. Switch when there's appetite for a maintained patch.
commit 85c23d2b00165f6205bd6e1348771e94e22746c9
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Wed May 13 14:35:39 2026 +0200
dev-python/xgrammar: disable py3.11
commit 15c140112432480f86acb1580b8b8c922c742347
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Sun May 10 18:41:05 2026 +0200
dev-python/xgrammar: switch to DISTUTILS_SINGLE_IMPL
sci-ml/{pytorch,transformers} are SINGLE_IMPL; multi-impl consumer with
bare $ on them produces python_targets_python3_*(-)?
that the single-impl children can't expose. Both versions converted in
one pass.
commit 0a29dd42d85f2fa63bb3ddf5fd6f283cc4bdf98d
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Sun May 10 15:19:02 2026 +0200
dev-python/xgrammar: add 0.2.0
Upstream's `0.1.34+` line gained a hard dep on apache-tvm-ffi (TVM's
FFI shim). The previous 0.1.33 ebuild's stay-pin comment is now
obsolete: apache-tvm-ffi-0.1.11 lands in this overlay, so 0.2.0
solves on the consumer side (vllm pins >=0.1.32, <1.0.0; 0.2.0 fits).
Build-check skipped: xgrammar's CMake configure does
find_package(tvm_ffi) which requires apache-tvm-ffi already merged on
the host (its wheel installs the cmake config at
/usr/lib/python*/site-packages/tvm_ffi/share/cmake/tvm_ffi/). pkgcheck
passes; trust upstream metadata pending end-to-end pre-push validation.
Upstream also lists `triton` as a runtime dep on Linux x86_64, but
neither this overlay nor ::gentoo packages dev-python/triton, and the
xgrammar grammar-matching paths vllm exercises don't require it. Note
left inline; revisit if/when triton is packaged.
commit 74ffa9342744a2eafa46bdbfd553dbc2c58ef669
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Thu May 7 01:03:47 2026 +0200
dev-python/xgrammar: new package
MLC's structured-generation engine for LLMs (CMake/scikit-build-core
+ nanobind C++ extension). Required by dev-python/vllm at
>=0.1.32, <1.0.0.
Pinned to 0.1.33 because 0.1.34+ added a hard runtime dep on
apache-tvm-ffi which isn't packaged. nanobind pin (==2.5.0 upstream)
relaxed to >=2.5.0; built clean against ::gentoo's 2.12.0.
NonsolvableDepsInStable is policy noise — pytorch and transformers are
~amd64 only too.


View
Download
Browse