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
e35879c2
Unverified
Commit
e35879c2
authored
Dec 09, 2024
by
Jeff Cook
Committed by
GitHub
Dec 10, 2024
Browse files
[Bugfix] Fix xgrammar failing to read a vocab_size from LlavaConfig on PixtralHF. (#11043)
parent
ebf77806
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
vllm/model_executor/guided_decoding/xgrammar_decoding.py
vllm/model_executor/guided_decoding/xgrammar_decoding.py
+3
-3
No files found.
vllm/model_executor/guided_decoding/xgrammar_decoding.py
View file @
e35879c2
...
@@ -148,7 +148,7 @@ class GrammarConfig:
...
@@ -148,7 +148,7 @@ class GrammarConfig:
else
:
else
:
json_str
=
guided_params
.
json
json_str
=
guided_params
.
json
return
cls
(
json_str
=
json_str
,
return
cls
(
json_str
=
json_str
,
vocab_size
=
model_config
.
hf_config
.
vocab_size
,
vocab_size
=
model_config
.
hf_
text_
config
.
vocab_size
,
encoded_vocab
=
encoded_vocab
,
encoded_vocab
=
encoded_vocab
,
stop_token_ids
=
stop_token_ids
,
stop_token_ids
=
stop_token_ids
,
backend_str
=
backend_str
,
backend_str
=
backend_str
,
...
@@ -168,7 +168,7 @@ class GrammarConfig:
...
@@ -168,7 +168,7 @@ class GrammarConfig:
else
:
else
:
grammar_str
=
guided_params
.
grammar
grammar_str
=
guided_params
.
grammar
return
cls
(
grammar_str
=
grammar_str
,
return
cls
(
grammar_str
=
grammar_str
,
vocab_size
=
model_config
.
hf_config
.
vocab_size
,
vocab_size
=
model_config
.
hf_
text_
config
.
vocab_size
,
encoded_vocab
=
encoded_vocab
,
encoded_vocab
=
encoded_vocab
,
stop_token_ids
=
stop_token_ids
,
stop_token_ids
=
stop_token_ids
,
backend_str
=
backend_str
,
backend_str
=
backend_str
,
...
@@ -176,7 +176,7 @@ class GrammarConfig:
...
@@ -176,7 +176,7 @@ class GrammarConfig:
max_threads
=
max_threads
)
max_threads
=
max_threads
)
elif
guided_params
.
json_object
:
elif
guided_params
.
json_object
:
return
cls
(
json_object
=
True
,
return
cls
(
json_object
=
True
,
vocab_size
=
model_config
.
hf_config
.
vocab_size
,
vocab_size
=
model_config
.
hf_
text_
config
.
vocab_size
,
encoded_vocab
=
encoded_vocab
,
encoded_vocab
=
encoded_vocab
,
stop_token_ids
=
stop_token_ids
,
stop_token_ids
=
stop_token_ids
,
backend_str
=
backend_str
,
backend_str
=
backend_str
,
...
...
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