dev-python/xgrammar
Efficient, flexible structured generation engine for LLMs
ChangeLog
commit 730b1e1849cd454d0b041cbe165f4f8eb9f4241e
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Thu Sep 10 09:26:59 2026 +0200
dev-python/xgrammar: condense 0.2.6 compatibility rationale
commit 8aada51d7ec5c72c4dbeb0187e085b120c482fe3
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Thu Sep 10 09:26:59 2026 +0200
dev-python/xgrammar: condense 0.2.5 compatibility rationale
commit 5dddc7600474d6433e6970b913d2f38f96f4bc1d
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Thu Sep 10 04:10:39 2026 +0200
dev-python/xgrammar: trim 0.2.2 comment prose
commit e0adf435ace7ccd54090cc554f51b10ef4b22549
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Thu Sep 10 02:38:41 2026 +0200
dev-python/xgrammar: trim 0.2.5 comment prose
commit 4419bd0c73265ab90e6e82b351400dc730724401
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Thu Sep 10 02:38:02 2026 +0200
dev-python/xgrammar: trim 0.2.6 comment prose
commit e650e3a50c155834fe774808d64a32bc3525629c
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Wed Sep 9 14:54:42 2026 +0200
dev-python/xgrammar: Keyword 0.2.6 for ~arm64
Matches 0.2.5, which already carries it. 0.2.6 differs from 0.2.5 only in
the dropped upstream transformers cap and the retired align-tests backport,
neither of which is arch-specific.
commit 3665f1cae85a1ae115ef7ef1d533da40cf357b4d
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Wed Sep 9 14:54:42 2026 +0200
dev-python/xgrammar: gate Triton on the arch, not on CUDA
Upstream's marker is platform_machine == 'x86_64', and the auto backend
picks the Triton kernel for any tensor whose device.type is "cuda" --
which ROCm tensors also report. Requiring Triton only under the cuda flag
would therefore leave an AMD host raising ImportError at first GPU use,
and dev-python/vllm's rocm target pins ~dev-python/xgrammar-0.2.2 exactly.
virtual/triton is ~amd64 only, so the arch gate keeps the dependency off
arm64 just as a cuda gate would.
commit 6703c6b23da94f3e1fe5acd117e979fd05d22713
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Wed Sep 9 10:34:22 2026 +0200
dev-python/xgrammar: remove orphaned 0.1.33 patch
No ebuild has referenced it since the 0.1.x line was dropped; the three
surviving versions apply the toolchain-flags, load-binding and
cuda-host-compiler patches only.
commit a64eabde2d1c15ff8ba5936fb87a6c5df7814c04
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Wed Sep 9 10:34:07 2026 +0200
dev-python/xgrammar: drop 0.2.3
Last two are 0.2.5 and 0.2.6; 0.2.2 stays because dev-python/vllm pins it
exactly. Both patches 0.2.3 referenced are shared with the survivors, so
files/ is untouched.
commit c3496f359a63613ed176bf8296a6e7241bac0ab5
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Wed Sep 9 09:36:49 2026 +0200
dev-python/xgrammar: add 0.2.6
The align-tests backport is obsolete: it carried upstream commit 40aa80ba,
which is an ancestor of v0.2.6, so it no longer applies and is dropped from
PATCHES. The other three still apply and the pinned dlpack submodule commit
is unchanged.
Upstream also removed its transformers <5 cap and explains why in the
pyproject, so the atom follows; keeping the cap would have held xgrammar to
4.57.6 even though the tree ships 5.16.1.
commit 2ac35d1feb3d161bbaeba91d174e016b55fa5e6a
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Tue Sep 8 21:16:48 2026 +0200
dev-python/xgrammar: Keyword 0.2.5 for ~arm64
commit 8b173b06c8b9c7a28c2f254f93243fca8343ede6
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Tue Sep 8 21:16:37 2026 +0200
dev-python/xgrammar: Keyword 0.2.3 for ~arm64
commit e1ccd72806574d0e7b8c48d12eee8e281ca9503b
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Tue Sep 8 21:16:28 2026 +0200
dev-python/xgrammar: Keyword 0.2.2 for ~arm64
commit be64a7285adf415df9f8778859b483e4d7f408b5
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Tue Sep 8 21:16:16 2026 +0200
dev-python/xgrammar: require Triton only with CUDA
virtual/triton is ~amd64 only, so an unconditional dependency leaves the
ebuild unresolvable on other architectures.
commit 10839d49fba171f345990d5b18775828d64f1108
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Sun Aug 23 13:14:34 2026 +0200
dev-python/xgrammar: depend on virtual/triton
commit d5280bb0fe58df648062dd8db009e50d5e7bc825
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Mon Aug 17 01:29:59 2026 +0200
dev-python/xgrammar: document gcc:15 JIT coupling on 0.2.3 and 0.2.5
The cuda? sys-devel/gcc:15 runtime dep and the bundled
cuda-host-compiler patch are coupled: the CUDA token-bitmask kernel is
JIT-compiled at import via torch.utils.cpp_extension, and the patch
hardcodes the /usr/bin/gcc-15 fallback that a CUDA bump must raise in
lockstep with this slot. cuda_gccdir cannot resolve it because JIT runs
on the user's machine at import, not at build time. 0.2.2 already
carried this note; add it to 0.2.3 and 0.2.5 so the coupling is not
silently lost on the newer ebuilds.
commit cdb3fa8d6d1cf11f0aa389279980e10915f278da
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Sun Aug 16 11:18:49 2026 +0200
dev-python/xgrammar: document the gcc-slot coupling to the cuda host-compiler patch
The cuda? sys-devel/gcc:15 runtime slot and the /usr/bin/gcc-15 fallback in the cuda-
host-compiler patch must move together, but nothing said so, so a future CUDA bump
could raise the slot and leave the patch pointing at a gcc the new nvcc rejects.
Spell out the coupling and why cuda_gccdir cannot replace the fallback (the kernel
JIT-compiles on the user's machine at import, where the eclass helper is
unavailable).
commit fa565fb83641c9f04b3ea32f5a195a4dc5363057
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Sun Aug 16 02:34:34 2026 +0200
dev-python/xgrammar: fix CUDA 13 runtime JIT
The CUDA bitmask backend JIT-compiles through PyTorch and otherwise inherits an
active compiler that CUDA 13 may reject. Declare the runtime CUDA toolchain and
translate the CUDA compiler overrides to the variables PyTorch actually consumes,
with the supported GCC slot as the default.
commit 1c31752e56402b2facb2b5bce4d731acb450e32b
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Fri Aug 14 10:25:40 2026 +0200
dev-python/xgrammar: enforce build backend floor
Upstream 0.2.5 requires scikit-build-core 0.10 or newer. The backend dependency
generated by distutils-r1 is unversioned, so add the source-declared floor
explicitly.
commit bf3ceef692d54e0c8e54b5bc5660b8a0d58d0b96
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Thu Aug 13 19:19:25 2026 +0200
dev-python/xgrammar: drop 0.1.33
The retained 0.1.34 release preserves the previous minor line without carrying this
superseded version.
commit 6ba5970a319837e8c0c561e5b26e02fbf310dbff
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Thu Aug 13 18:37:37 2026 +0200
dev-python/xgrammar: require compatible apache-tvm-ffi
The packaged-library lookup passes extra_lib_paths to load_lib_module. That keyword
was added in apache-tvm-ffi 0.1.11, so older permitted versions fail while importing
xgrammar.
commit 748ff7824d873f5ed8d40c51d1c7d4178d433489
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Mon Aug 3 23:05:54 2026 +0200
dev-python/xgrammar: add 0.2.2
Add the newest release compatible with transformers 5 and the vLLM 0.25/0.26
FFI sets. Mirror upstream's FFI floor so reverse consumers select their exact
coordinated runtime version.
commit 16e8544f84929ffcbcc3653935df79b2ac0f14d6
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Mon Aug 3 20:00:27 2026 +0200
dev-python/xgrammar: fix dependencies and FFI loading in 0.2.5
Load the binding from xgrammar itself, declare Triton and bundled picojson, and
require the TVM-FFI loader API used by the patch. Drop stale nanobind and sandbox
workarounds, respect toolchain flags, and enable offline tests.
commit cf7b01a870d928d0a8d18abcae928a8b7b7ec16c
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Mon Aug 3 19:45:54 2026 +0200
dev-python/xgrammar: fix dependencies and FFI loading in 0.2.3
Use TVM-FFI 0.1.11 library-path support to load the binding from xgrammar itself
instead of writing into tvm_ffi. Declare Triton and picojson, drop stale nanobind and
sandbox workarounds, respect toolchain flags, and enable offline tests.
commit 408830272a1243a12237d5b8c6642545d5d3c0b8
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Mon Aug 3 19:39:07 2026 +0200
dev-python/xgrammar: fix runtime deps and flags in 0.1.33
Declare Triton for the default GPU masking path and the bundled picojson license. Let
the Gentoo toolchain control optimization and LTO, and run the offline upstream test
subset.
commit 1b5f1baf79ab145b9aae28aebaedb158c50de7bb
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Fri Jul 24 11:42:13 2026 +0200
dev-python/xgrammar: drop 0.2.1, 0.2.2
commit f9b69ba6390de013c75fa8be5d41f29a9ad1f698
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Fri Jul 24 11:20:24 2026 +0200
dev-python/xgrammar: add 0.2.5
Upstream stopped publishing PyPI sdists at 0.2.4 (0.2.4 and 0.2.5 are
wheels-only), so switch SRC_URI from pypi_sdist_url to the GitHub release
tag and stage the dlpack git submodule (headers on XGRAMMAR_INCLUDE_PATH,
installed by the top-level CMakeLists) separately, since GitHub's archive
omits submodule contents. googletest and cpptrace stay unbuilt with our
options (XGRAMMAR_BUILD_CXX_TESTS / XGRAMMAR_ENABLE_CPPTRACE default OFF)
and picojson is vendored in-tree, so only dlpack needs staging.
Also add the transformers<5 cap the 0.2.5 pyproject declares (v5 breaks
tokenizer loading in TokenizerInfo.from_huggingface); 0.2.3 predated it.
commit 401e4935b892117921886e3ae834f637a9fdf880
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Sat Jun 27 08:12:09 2026 +0200
dev-python/xgrammar: add 0.2.3
commit b8450a53362c4a32ebae4e421507fcf3979d5684
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Fri Jun 12 11:02:02 2026 +0200
dev-python/xgrammar: add 0.2.2
0.2.2 imports tvm_ffi at build time (cpp/tvm_ffi/CMakeLists.txt runs
find_package(tvm_ffi)), so add apache-tvm-ffi to BDEPEND. That import
also probes accelerator device nodes; addpredict /dev/kfd and /dev/accel
in python_compile so the sandboxed build does not abort.
commit 429bc05682cae092a171601c1106e2831f51b76b
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Sat Jun 6 21:49:16 2026 +0200
dev-python/xgrammar: drop 0.2.0
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: Thu Sep 10 09:26:59 2026 +0200
dev-python/xgrammar: condense 0.2.6 compatibility rationale
commit 8aada51d7ec5c72c4dbeb0187e085b120c482fe3
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Thu Sep 10 09:26:59 2026 +0200
dev-python/xgrammar: condense 0.2.5 compatibility rationale
commit 5dddc7600474d6433e6970b913d2f38f96f4bc1d
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Thu Sep 10 04:10:39 2026 +0200
dev-python/xgrammar: trim 0.2.2 comment prose
commit e0adf435ace7ccd54090cc554f51b10ef4b22549
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Thu Sep 10 02:38:41 2026 +0200
dev-python/xgrammar: trim 0.2.5 comment prose
commit 4419bd0c73265ab90e6e82b351400dc730724401
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Thu Sep 10 02:38:02 2026 +0200
dev-python/xgrammar: trim 0.2.6 comment prose
commit e650e3a50c155834fe774808d64a32bc3525629c
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Wed Sep 9 14:54:42 2026 +0200
dev-python/xgrammar: Keyword 0.2.6 for ~arm64
Matches 0.2.5, which already carries it. 0.2.6 differs from 0.2.5 only in
the dropped upstream transformers cap and the retired align-tests backport,
neither of which is arch-specific.
commit 3665f1cae85a1ae115ef7ef1d533da40cf357b4d
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Wed Sep 9 14:54:42 2026 +0200
dev-python/xgrammar: gate Triton on the arch, not on CUDA
Upstream's marker is platform_machine == 'x86_64', and the auto backend
picks the Triton kernel for any tensor whose device.type is "cuda" --
which ROCm tensors also report. Requiring Triton only under the cuda flag
would therefore leave an AMD host raising ImportError at first GPU use,
and dev-python/vllm's rocm target pins ~dev-python/xgrammar-0.2.2 exactly.
virtual/triton is ~amd64 only, so the arch gate keeps the dependency off
arm64 just as a cuda gate would.
commit 6703c6b23da94f3e1fe5acd117e979fd05d22713
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Wed Sep 9 10:34:22 2026 +0200
dev-python/xgrammar: remove orphaned 0.1.33 patch
No ebuild has referenced it since the 0.1.x line was dropped; the three
surviving versions apply the toolchain-flags, load-binding and
cuda-host-compiler patches only.
commit a64eabde2d1c15ff8ba5936fb87a6c5df7814c04
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Wed Sep 9 10:34:07 2026 +0200
dev-python/xgrammar: drop 0.2.3
Last two are 0.2.5 and 0.2.6; 0.2.2 stays because dev-python/vllm pins it
exactly. Both patches 0.2.3 referenced are shared with the survivors, so
files/ is untouched.
commit c3496f359a63613ed176bf8296a6e7241bac0ab5
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Wed Sep 9 09:36:49 2026 +0200
dev-python/xgrammar: add 0.2.6
The align-tests backport is obsolete: it carried upstream commit 40aa80ba,
which is an ancestor of v0.2.6, so it no longer applies and is dropped from
PATCHES. The other three still apply and the pinned dlpack submodule commit
is unchanged.
Upstream also removed its transformers <5 cap and explains why in the
pyproject, so the atom follows; keeping the cap would have held xgrammar to
4.57.6 even though the tree ships 5.16.1.
commit 2ac35d1feb3d161bbaeba91d174e016b55fa5e6a
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Tue Sep 8 21:16:48 2026 +0200
dev-python/xgrammar: Keyword 0.2.5 for ~arm64
commit 8b173b06c8b9c7a28c2f254f93243fca8343ede6
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Tue Sep 8 21:16:37 2026 +0200
dev-python/xgrammar: Keyword 0.2.3 for ~arm64
commit e1ccd72806574d0e7b8c48d12eee8e281ca9503b
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Tue Sep 8 21:16:28 2026 +0200
dev-python/xgrammar: Keyword 0.2.2 for ~arm64
commit be64a7285adf415df9f8778859b483e4d7f408b5
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Tue Sep 8 21:16:16 2026 +0200
dev-python/xgrammar: require Triton only with CUDA
virtual/triton is ~amd64 only, so an unconditional dependency leaves the
ebuild unresolvable on other architectures.
commit 10839d49fba171f345990d5b18775828d64f1108
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Sun Aug 23 13:14:34 2026 +0200
dev-python/xgrammar: depend on virtual/triton
commit d5280bb0fe58df648062dd8db009e50d5e7bc825
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Mon Aug 17 01:29:59 2026 +0200
dev-python/xgrammar: document gcc:15 JIT coupling on 0.2.3 and 0.2.5
The cuda? sys-devel/gcc:15 runtime dep and the bundled
cuda-host-compiler patch are coupled: the CUDA token-bitmask kernel is
JIT-compiled at import via torch.utils.cpp_extension, and the patch
hardcodes the /usr/bin/gcc-15 fallback that a CUDA bump must raise in
lockstep with this slot. cuda_gccdir cannot resolve it because JIT runs
on the user's machine at import, not at build time. 0.2.2 already
carried this note; add it to 0.2.3 and 0.2.5 so the coupling is not
silently lost on the newer ebuilds.
commit cdb3fa8d6d1cf11f0aa389279980e10915f278da
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Sun Aug 16 11:18:49 2026 +0200
dev-python/xgrammar: document the gcc-slot coupling to the cuda host-compiler patch
The cuda? sys-devel/gcc:15 runtime slot and the /usr/bin/gcc-15 fallback in the cuda-
host-compiler patch must move together, but nothing said so, so a future CUDA bump
could raise the slot and leave the patch pointing at a gcc the new nvcc rejects.
Spell out the coupling and why cuda_gccdir cannot replace the fallback (the kernel
JIT-compiles on the user's machine at import, where the eclass helper is
unavailable).
commit fa565fb83641c9f04b3ea32f5a195a4dc5363057
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Sun Aug 16 02:34:34 2026 +0200
dev-python/xgrammar: fix CUDA 13 runtime JIT
The CUDA bitmask backend JIT-compiles through PyTorch and otherwise inherits an
active compiler that CUDA 13 may reject. Declare the runtime CUDA toolchain and
translate the CUDA compiler overrides to the variables PyTorch actually consumes,
with the supported GCC slot as the default.
commit 1c31752e56402b2facb2b5bce4d731acb450e32b
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Fri Aug 14 10:25:40 2026 +0200
dev-python/xgrammar: enforce build backend floor
Upstream 0.2.5 requires scikit-build-core 0.10 or newer. The backend dependency
generated by distutils-r1 is unversioned, so add the source-declared floor
explicitly.
commit bf3ceef692d54e0c8e54b5bc5660b8a0d58d0b96
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Thu Aug 13 19:19:25 2026 +0200
dev-python/xgrammar: drop 0.1.33
The retained 0.1.34 release preserves the previous minor line without carrying this
superseded version.
commit 6ba5970a319837e8c0c561e5b26e02fbf310dbff
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Thu Aug 13 18:37:37 2026 +0200
dev-python/xgrammar: require compatible apache-tvm-ffi
The packaged-library lookup passes extra_lib_paths to load_lib_module. That keyword
was added in apache-tvm-ffi 0.1.11, so older permitted versions fail while importing
xgrammar.
commit 748ff7824d873f5ed8d40c51d1c7d4178d433489
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Mon Aug 3 23:05:54 2026 +0200
dev-python/xgrammar: add 0.2.2
Add the newest release compatible with transformers 5 and the vLLM 0.25/0.26
FFI sets. Mirror upstream's FFI floor so reverse consumers select their exact
coordinated runtime version.
commit 16e8544f84929ffcbcc3653935df79b2ac0f14d6
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Mon Aug 3 20:00:27 2026 +0200
dev-python/xgrammar: fix dependencies and FFI loading in 0.2.5
Load the binding from xgrammar itself, declare Triton and bundled picojson, and
require the TVM-FFI loader API used by the patch. Drop stale nanobind and sandbox
workarounds, respect toolchain flags, and enable offline tests.
commit cf7b01a870d928d0a8d18abcae928a8b7b7ec16c
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Mon Aug 3 19:45:54 2026 +0200
dev-python/xgrammar: fix dependencies and FFI loading in 0.2.3
Use TVM-FFI 0.1.11 library-path support to load the binding from xgrammar itself
instead of writing into tvm_ffi. Declare Triton and picojson, drop stale nanobind and
sandbox workarounds, respect toolchain flags, and enable offline tests.
commit 408830272a1243a12237d5b8c6642545d5d3c0b8
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Mon Aug 3 19:39:07 2026 +0200
dev-python/xgrammar: fix runtime deps and flags in 0.1.33
Declare Triton for the default GPU masking path and the bundled picojson license. Let
the Gentoo toolchain control optimization and LTO, and run the offline upstream test
subset.
commit 1b5f1baf79ab145b9aae28aebaedb158c50de7bb
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Fri Jul 24 11:42:13 2026 +0200
dev-python/xgrammar: drop 0.2.1, 0.2.2
commit f9b69ba6390de013c75fa8be5d41f29a9ad1f698
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Fri Jul 24 11:20:24 2026 +0200
dev-python/xgrammar: add 0.2.5
Upstream stopped publishing PyPI sdists at 0.2.4 (0.2.4 and 0.2.5 are
wheels-only), so switch SRC_URI from pypi_sdist_url to the GitHub release
tag and stage the dlpack git submodule (headers on XGRAMMAR_INCLUDE_PATH,
installed by the top-level CMakeLists) separately, since GitHub's archive
omits submodule contents. googletest and cpptrace stay unbuilt with our
options (XGRAMMAR_BUILD_CXX_TESTS / XGRAMMAR_ENABLE_CPPTRACE default OFF)
and picojson is vendored in-tree, so only dlpack needs staging.
Also add the transformers<5 cap the 0.2.5 pyproject declares (v5 breaks
tokenizer loading in TokenizerInfo.from_huggingface); 0.2.3 predated it.
commit 401e4935b892117921886e3ae834f637a9fdf880
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Sat Jun 27 08:12:09 2026 +0200
dev-python/xgrammar: add 0.2.3
commit b8450a53362c4a32ebae4e421507fcf3979d5684
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Fri Jun 12 11:02:02 2026 +0200
dev-python/xgrammar: add 0.2.2
0.2.2 imports tvm_ffi at build time (cpp/tvm_ffi/CMakeLists.txt runs
find_package(tvm_ffi)), so add apache-tvm-ffi to BDEPEND. That import
also probes accelerator device nodes; addpredict /dev/kfd and /dev/accel
in python_compile so the sandboxed build does not abort.
commit 429bc05682cae092a171601c1106e2831f51b76b
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Sat Jun 6 21:49:16 2026 +0200
dev-python/xgrammar: drop 0.2.0
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.


View
Download
Browse