@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 08275ec0a2
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 14, 05:30 UTC

[Build] Update Xgrammar to 0.1.25 (#25467)

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>

Chauncey committed Sep 24, 2025 at 05:25 UTC 08275ec0a2ba48fbc1054bdbdda2f1e0dfcb20b3
2 files changed +7 -3
requirements/common.txt
+1 -1
@@ -24,7 +24,7 @@ outlines_core == 0.2.11
24 # required for outlines backend disk cache
25 diskcache == 5.6.3
26 lark == 1.2.2
27 -xgrammar == 0.1.24; platform_machine == "x86_64" or platform_machine == "aarch64" or platform_machine == "arm64"
27 +xgrammar == 0.1.25; platform_machine == "x86_64" or platform_machine == "aarch64" or platform_machine == "arm64"
28 typing_extensions >= 4.10
29 filelock >= 3.16.1 # need to contain https://github.com/tox-dev/filelock/pull/317
30 partial-json-parser # used for parsing partial JSON outputs
vllm/v1/structured_output/backend_xgrammar.py
+6 -2
@@ -108,7 +108,9 @@ class XgrammarBackend(StructuredOutputBackend):
108 end=s["end"],
109 ) for s in s_tag["structures"]
110 ]
111 - ctx = self.compiler.compile_structural_tag(tags, s_tag["triggers"])
111 + structural_tag = xgr.StructuralTag.from_legacy_structural_tag(
112 + tags, s_tag["triggers"])
113 + ctx = self.compiler.compile_structural_tag(structural_tag)
114 else:
115 logger.error(
116 "Validation should have already occurred. Please file an issue."
@@ -318,6 +320,8 @@ def validate_xgrammar_grammar(sampling_params: SamplingParams) -> None:
320 end=s["end"],
321 ) for s in s_tag["structures"]
322 ]
321 - xgr.Grammar.from_structural_tag(tags, s_tag["triggers"])
323 + structural_tag = xgr.StructuralTag.from_legacy_structural_tag(
324 + tags, s_tag["triggers"])
325 + xgr.Grammar.from_structural_tag(structural_tag)
326 except Exception as e:
327 raise ValueError("Invalid structural tag specification.") from e