mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-08-01 11:54:27 +08:00
[V1] Fix vocab size calculation for structured output (#14826)
Signed-off-by: Russell Bryant <rbryant@redhat.com>
This commit is contained in:
parent
613c5bb945
commit
1140991a7b
@ -40,7 +40,7 @@ class StructuredOutputManager:
|
|||||||
tokenizer_group.ping()
|
tokenizer_group.ping()
|
||||||
|
|
||||||
tokenizer = tokenizer_group.get_lora_tokenizer(None)
|
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):
|
if isinstance(tokenizer, MistralTokenizer):
|
||||||
# NOTE: ideally, xgrammar should handle this accordingly.
|
# NOTE: ideally, xgrammar should handle this accordingly.
|
||||||
# refer to https://github.com/mlc-ai/xgrammar/blob/d77c0a0173ef14779c918e3be7966ba852f7910f/python/xgrammar/tokenizer_info.py#L98
|
# refer to https://github.com/mlc-ai/xgrammar/blob/d77c0a0173ef14779c918e3be7966ba852f7910f/python/xgrammar/tokenizer_info.py#L98
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user