[None][feat] Upgrade xgrammar and lock pillow#12812
[None][feat] Upgrade xgrammar and lock pillow#12812yuanjingx87 wants to merge 6 commits intoNVIDIA:release/1.3.0rc5.post2from
Conversation
|
/bot run |
📝 WalkthroughWalkthroughThis PR upgrades the xgrammar dependency from v0.1.25 to v0.1.32, adds support for applying patch files during CMake dependency fetching, introduces a patch that converts internal flag declarations to constexpr, and updates version references across build configuration, dependency metadata, and documentation files. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@ATTRIBUTIONS-Python.md`:
- Line 63474: Update the release notes sentence that currently reads "The
dependent xgrammar version is updated to 0.1.25" to reference xgrammar version
0.1.32 instead; locate the string in docs/source/release-notes.md (the line
containing that exact sentence) and change the version number to 0.1.32 so it
matches ATTRIBUTIONS-Python.md and other project references.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 003b5d71-d64e-43ba-8a25-9f99f4397c86
⛔ Files ignored due to path filters (1)
security_scanning/poetry.lockis excluded by!**/*.lock
📒 Files selected for processing (8)
3rdparty/CMakeLists.txt3rdparty/fetch_content.json3rdparty/patches/xgrammar_constexpr.patchATTRIBUTIONS-Python.mdrequirements.txtscripts/attribution/data/dependency_metadata.ymlscripts/attribution/data/files_to_dependency.ymlsecurity_scanning/pyproject.toml
ATTRIBUTIONS-Python.md
Outdated
|
|
||
|
|
||
| ## xgrammar (0.1.25) | ||
| ## xgrammar (0.1.32) |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
What is the latest version of xgrammar on PyPI and what are the changes between version 0.1.25 and 0.1.32?
💡 Result:
Latest version of xgrammar on PyPI
As of Mar 27, 2026, the latest PyPI release is xgrammar 0.1.33. (pypi.org)
Changes from 0.1.25 → 0.1.32 (release-by-release)
v0.1.26
- Added batched methods for token-mask generation (batched fill-next-token mask; batched accept string/token)
- Refactors and fixes (pipeline refactor, repetition refactor, AddRule / URIToRule fixes), plus tokenizer support for openGPT-x (github.com)
v0.1.27
- Fixed JsonSchemaConverter handling for numbers like
-0... - Added/adjusted web build tests (github.com)
v0.1.28
- Fixed web emscripten bindings; several build/CI tweaks (e.g., riscv64 LTO disable, remove ninja dependency)
- Efficiency fixes (repetition structure), added BF16/FP16 CPU bitmask support, TagDispatch/SubGrammarAdder optimization fixes, docs/site improvements (github.com)
v0.1.29
- Added TraverseDraftTree for speculative-decoding bitmask generation
- AMD GPU triton kernel fix; tokenizer detection fix for Kimi-K2-Instruct; web package update for structural tag support (github.com)
v0.1.30
- Structural-tag/tag features (e.g., allow empty separator for
tags_with_separator, multiple end tokens) any_text/ TagDispatch: excluded strings support and termination behavior when excludes are specified- Added crossing-grammar cache (first introduction here)
- Build/CI expansions (more wheels via cibuildwheel; Python 3.14/3.14t; nanobind free-threading opt-in); various bugfixes (UTF-8 char classes, DynamicBitset UB, etc.) (github.com)
v0.1.31
- Fixed apply_token_bitmask “auto”
- Reverted the earlier crossing-grammar cache change from v0.1.30 (github.com)
v0.1.32
- Added third-party Rust support integration
- Re-introduced/added crossing-grammar cache support (new implementation)
- Refactors for extensibility (structural_tag and json_schema_converter)
- Structural-tag/XML-related additions and fixes (MinimaxXmlFormat, DeepSeekXmlFormat, builtin structural tag formats for several models, quote-stripping behavior, empty-string support, deepseek_xml fixes)
- Parser/FSM refactors (kRepeat handling moved to FSM via kRepeatRef edges; removed AST fallback paths from Earley parser)
- Added optional timeout for
_traverse_draft_tree(github.com)
Citations:
- 1: https://pypi.org/project/xgrammar/
- 2: https://github.com/mlc-ai/xgrammar/releases/tag/v0.1.26
- 3: https://github.com/mlc-ai/xgrammar/releases/tag/v0.1.27
- 4: https://github.com/mlc-ai/xgrammar/releases/tag/v0.1.28
- 5: https://github.com/mlc-ai/xgrammar/releases/tag/v0.1.29
- 6: https://github.com/mlc-ai/xgrammar/releases/tag/v0.1.30
- 7: https://github.com/mlc-ai/xgrammar/releases/tag/v0.1.31
- 8: https://github.com/mlc-ai/xgrammar/releases/tag/v0.1.32
🏁 Script executed:
#!/bin/bash
# Description: Verify all xgrammar version references are consistently updated to 0.1.32
echo "=== Searching for xgrammar version references ==="
rg -n "xgrammar.*0\.1\.(25|32)" --type-add 'config:*.{json,toml,txt,yml,yaml,md}' --type config
echo -e "\n=== Checking requirements files ==="
fd -e txt -e toml --exec rg -n "xgrammar" {}
echo -e "\n=== Checking for any remaining 0.1.25 references ==="
rg -n "0\.1\.25"Repository: NVIDIA/TensorRT-LLM
Length of output: 6160
Update docs/source/release-notes.md line 86 to reflect xgrammar version 0.1.32.
The version reference in the release notes still mentions 0.1.25 ("The dependent xgrammar version is updated to 0.1.25") while all other references in the codebase have been correctly updated to 0.1.32.
All other xgrammar version references across the codebase (requirements.txt, pyproject.toml, dependency metadata, attribution files, and ATTRIBUTIONS-Python.md) are consistently updated to 0.1.32. The changelog for 0.1.32 includes significant feature additions (Rust support integration, structural-tag/XML enhancements, FSM refactors) and does not report breaking changes.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@ATTRIBUTIONS-Python.md` at line 63474, Update the release notes sentence that
currently reads "The dependent xgrammar version is updated to 0.1.25" to
reference xgrammar version 0.1.32 instead; locate the string in
docs/source/release-notes.md (the line containing that exact sentence) and
change the version number to 0.1.32 so it matches ATTRIBUTIONS-Python.md and
other project references.
|
PR_Github #42180 [ run ] triggered by Bot. Commit: |
3fd5faf to
fc1f38b
Compare
Signed-off-by: Yuanjing Xue <197832395+yuanjingx87@users.noreply.github.com>
4f7a192 to
7d64ffb
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #42192 [ run ] triggered by Bot. Commit: |
|
PR_Github #42192 [ run ] completed with state
|
Signed-off-by: Yiqing Yan <yiqingy@nvidia.com>
7d64ffb to
89a6154
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #42194 [ run ] triggered by Bot. Commit: |
| "einops (>=0.8.2,<0.9.0)", | ||
| "flashinfer-python (==0.6.4)", | ||
| "xgrammar (==0.1.25)", | ||
| "flashinfer-python (>=0.6.1,<0.7.0)", |
There was a problem hiding this comment.
@thorjohnsen I thought we wanted to pin this to 0.6.4 because of some additional issues?
There was a problem hiding this comment.
security_scanning is auto-generated and be cherry-picked, it is only for nspect scanning, this should not affect trtllm itself
There was a problem hiding this comment.
The actual version to be locked is defined here https://github.com/yuanjingx87/TensorRT-LLM/blob/89a6154838305eee8a074761d5341b10208511df/requirements.txt#L57
Signed-off-by: tijyojwad <1127155+tijyojwad@users.noreply.github.com>
…tics (NVIDIA#12446) Signed-off-by: Yuanjing Xue <197832395+yuanjingx87@users.noreply.github.com>
Signed-off-by: Yuanjing Xue <197832395+yuanjingx87@users.noreply.github.com>
|
/bot run --disable-fail-fast |
|
PR_Github #42255 [ run ] triggered by Bot. Commit: |
|
PR_Github #42194 [ run ] completed with state |
Signed-off-by: Tyler Burt <195370667+tburt-nv@users.noreply.github.com> Signed-off-by: Yiteng Niu <6831097+niukuo@users.noreply.github.com>
|
/bot run --disable-fail-fast |
|
PR_Github #42262 [ run ] triggered by Bot. Commit: |
|
PR_Github #42262 [ run ] completed with state
|
Signed-off-by: qgai
Summary by CodeRabbit
Description
Test Coverage
PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.