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
138485a8
Unverified
Commit
138485a8
authored
Apr 19, 2024
by
Ayush Rautwar
Committed by
GitHub
Apr 19, 2024
Browse files
[Bugfix] Add fix for JSON whitespace (#4189)
Co-authored-by:
Ubuntu
<
ubuntu@ip-172-31-13-147.ec2.internal
>
parent
bc9df157
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
13 deletions
+19
-13
tests/entrypoints/test_openai_server.py
tests/entrypoints/test_openai_server.py
+14
-13
vllm/model_executor/guided_decoding/outlines_logits_processors.py
...el_executor/guided_decoding/outlines_logits_processors.py
+5
-0
No files found.
tests/entrypoints/test_openai_server.py
View file @
138485a8
...
@@ -754,6 +754,7 @@ async def test_guided_choice_chat_logprobs(server, client: openai.AsyncOpenAI,
...
@@ -754,6 +754,7 @@ async def test_guided_choice_chat_logprobs(server, client: openai.AsyncOpenAI,
async
def
test_response_format_json_object
(
server
,
client
:
openai
.
AsyncOpenAI
):
async
def
test_response_format_json_object
(
server
,
client
:
openai
.
AsyncOpenAI
):
for
_
in
range
(
2
):
resp
=
await
client
.
chat
.
completions
.
create
(
resp
=
await
client
.
chat
.
completions
.
create
(
model
=
MODEL_NAME
,
model
=
MODEL_NAME
,
messages
=
[{
messages
=
[{
...
...
vllm/model_executor/guided_decoding/outlines_logits_processors.py
View file @
138485a8
...
@@ -131,6 +131,11 @@ class CFGLogitsProcessor(BaseLogitsProcessor):
...
@@ -131,6 +131,11 @@ class CFGLogitsProcessor(BaseLogitsProcessor):
fsm
=
CFGFSM
(
cfg
,
tokenizer
)
fsm
=
CFGFSM
(
cfg
,
tokenizer
)
self
.
fsm
=
fsm
self
.
fsm
=
fsm
def
init_state
(
self
):
"""Initialize state with a CFGFSM copy."""
super
().
init_state
()
self
.
fsm
=
self
.
fsm
.
copy
()
@
lru_cache
@
lru_cache
def
_adapt_tokenizer
(
tokenizer
:
PreTrainedTokenizerBase
):
def
_adapt_tokenizer
(
tokenizer
:
PreTrainedTokenizerBase
):
...
...
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