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
02c9afa2
Unverified
Commit
02c9afa2
authored
Sep 18, 2024
by
Roger Wang
Committed by
GitHub
Sep 19, 2024
Browse files
Revert "[Misc][Bugfix] Disable guided decoding for mistral tokenizer" (#8593)
parent
3118f633
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
23 deletions
+0
-23
vllm/model_executor/guided_decoding/__init__.py
vllm/model_executor/guided_decoding/__init__.py
+0
-23
No files found.
vllm/model_executor/guided_decoding/__init__.py
View file @
02c9afa2
...
...
@@ -6,7 +6,6 @@ from vllm.entrypoints.openai.protocol import (
from
vllm.model_executor.guided_decoding.guided_fields
import
(
GuidedDecodingRequest
)
from
vllm.sampling_params
import
LogitsProcessor
from
vllm.transformers_utils.tokenizer
import
MistralTokenizer
async
def
get_guided_decoding_logits_processor
(
...
...
@@ -16,23 +15,12 @@ async def get_guided_decoding_logits_processor(
request
=
_adapt_request_for_tool_use
(
request
)
if
guided_decoding_backend
==
'outlines'
:
if
isinstance
(
tokenizer
,
MistralTokenizer
):
raise
NotImplementedError
(
"Guided decoding with 'outlines' is currently not supported "
"for Mistral tokenizer. Please consider contributing to the "
"'outlines' project if you are interested in this feature."
)
# NOTE: lazy import outlines to avoid https://github.com/vllm-project/vllm/issues/4193
from
vllm.model_executor.guided_decoding.outlines_decoding
import
(
# noqa
get_outlines_guided_decoding_logits_processor
)
return
await
get_outlines_guided_decoding_logits_processor
(
request
,
tokenizer
)
if
guided_decoding_backend
==
'lm-format-enforcer'
:
if
isinstance
(
tokenizer
,
MistralTokenizer
):
raise
NotImplementedError
(
"Guided decoding with 'lm-format-enforcer' is currently not "
"supported for Mistral tokenizer. Please consider contributing "
"to the 'lm-format-enforcer' project if you are interested "
"in this feature."
)
from
vllm.model_executor.guided_decoding.lm_format_enforcer_decoding
import
(
# noqa
get_lm_format_enforcer_guided_decoding_logits_processor
)
return
await
get_lm_format_enforcer_guided_decoding_logits_processor
(
...
...
@@ -49,23 +37,12 @@ def get_local_guided_decoding_logits_processor(
# request = _adapt_request_for_tool_use(request)
if
guided_decoding_backend
==
'outlines'
:
if
isinstance
(
tokenizer
,
MistralTokenizer
):
raise
NotImplementedError
(
"Guided decoding with 'outlines' is currently not supported "
"for Mistral tokenizer. Please consider contributing to the "
"'outlines' project if you are interested in this feature."
)
# NOTE: lazy import outlines to avoid https://github.com/vllm-project/vllm/issues/4193
from
vllm.model_executor.guided_decoding.outlines_decoding
import
(
# noqa
get_local_outlines_guided_decoding_logits_processor
)
return
get_local_outlines_guided_decoding_logits_processor
(
guided_options
,
tokenizer
)
if
guided_decoding_backend
==
'lm-format-enforcer'
:
if
isinstance
(
tokenizer
,
MistralTokenizer
):
raise
NotImplementedError
(
"Guided decoding with 'lm-format-enforcer' is currently not "
"supported for Mistral tokenizer. Please consider contributing "
"to the 'lm-format-enforcer' project if you are interested "
"in this feature."
)
from
vllm.model_executor.guided_decoding.lm_format_enforcer_decoding
import
(
# noqa
get_local_lm_format_enforcer_guided_decoding_logits_processor
)
return
get_local_lm_format_enforcer_guided_decoding_logits_processor
(
...
...
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