Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
08275ec0
Unverified
Commit
08275ec0
authored
Sep 24, 2025
by
Chauncey
Committed by
GitHub
Sep 23, 2025
Browse files
[Build] Update Xgrammar to 0.1.25 (#25467)
Signed-off-by:
chaunceyjiang
<
chaunceyjiang@gmail.com
>
parent
c828d1bf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
requirements/common.txt
requirements/common.txt
+1
-1
vllm/v1/structured_output/backend_xgrammar.py
vllm/v1/structured_output/backend_xgrammar.py
+6
-2
No files found.
requirements/common.txt
View file @
08275ec0
...
...
@@ -24,7 +24,7 @@ outlines_core == 0.2.11
# required for outlines backend disk cache
diskcache == 5.6.3
lark == 1.2.2
xgrammar == 0.1.2
4
; platform_machine == "x86_64" or platform_machine == "aarch64" or platform_machine == "arm64"
xgrammar == 0.1.2
5
; platform_machine == "x86_64" or platform_machine == "aarch64" or platform_machine == "arm64"
typing_extensions >= 4.10
filelock >= 3.16.1 # need to contain https://github.com/tox-dev/filelock/pull/317
partial-json-parser # used for parsing partial JSON outputs
...
...
vllm/v1/structured_output/backend_xgrammar.py
View file @
08275ec0
...
...
@@ -108,7 +108,9 @@ class XgrammarBackend(StructuredOutputBackend):
end
=
s
[
"end"
],
)
for
s
in
s_tag
[
"structures"
]
]
ctx
=
self
.
compiler
.
compile_structural_tag
(
tags
,
s_tag
[
"triggers"
])
structural_tag
=
xgr
.
StructuralTag
.
from_legacy_structural_tag
(
tags
,
s_tag
[
"triggers"
])
ctx
=
self
.
compiler
.
compile_structural_tag
(
structural_tag
)
else
:
logger
.
error
(
"Validation should have already occurred. Please file an issue."
...
...
@@ -318,6 +320,8 @@ def validate_xgrammar_grammar(sampling_params: SamplingParams) -> None:
end
=
s
[
"end"
],
)
for
s
in
s_tag
[
"structures"
]
]
xgr
.
Grammar
.
from_structural_tag
(
tags
,
s_tag
[
"triggers"
])
structural_tag
=
xgr
.
StructuralTag
.
from_legacy_structural_tag
(
tags
,
s_tag
[
"triggers"
])
xgr
.
Grammar
.
from_structural_tag
(
structural_tag
)
except
Exception
as
e
:
raise
ValueError
(
"Invalid structural tag specification."
)
from
e
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment