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
1140991a
Unverified
Commit
1140991a
authored
Mar 14, 2025
by
Russell Bryant
Committed by
GitHub
Mar 14, 2025
Browse files
[V1] Fix vocab size calculation for structured output (#14826)
Signed-off-by:
Russell Bryant
<
rbryant@redhat.com
>
parent
613c5bb9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
vllm/v1/structured_output/__init__.py
vllm/v1/structured_output/__init__.py
+1
-1
No files found.
vllm/v1/structured_output/__init__.py
View file @
1140991a
...
...
@@ -40,7 +40,7 @@ class StructuredOutputManager:
tokenizer_group
.
ping
()
tokenizer
=
tokenizer_group
.
get_lora_tokenizer
(
None
)
self
.
vocab_size
=
tokenizer
.
max_token_id
self
.
vocab_size
=
tokenizer
.
max_token_id
+
1
if
isinstance
(
tokenizer
,
MistralTokenizer
):
# NOTE: ideally, xgrammar should handle this accordingly.
# refer to https://github.com/mlc-ai/xgrammar/blob/d77c0a0173ef14779c918e3be7966ba852f7910f/python/xgrammar/tokenizer_info.py#L98
...
...
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