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
46fae69c
Unverified
Commit
46fae69c
authored
May 04, 2025
by
Cyrus Leung
Committed by
GitHub
May 03, 2025
Browse files
[Misc] V0 fallback for `--enable-prompt-embeds` (#17615)
Signed-off-by:
DarkLight1337
<
tlleungac@connect.ust.hk
>
parent
f66f1e0f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
vllm/engine/arg_utils.py
vllm/engine/arg_utils.py
+6
-0
vllm/inputs/preprocess.py
vllm/inputs/preprocess.py
+0
-3
No files found.
vllm/engine/arg_utils.py
View file @
46fae69c
...
@@ -1237,6 +1237,12 @@ class EngineArgs:
...
@@ -1237,6 +1237,12 @@ class EngineArgs:
recommend_to_remove
=
False
)
recommend_to_remove
=
False
)
return
False
return
False
# No text embedding inputs so far.
if
self
.
enable_prompt_embeds
:
_raise_or_fallback
(
feature_name
=
"--enable-prompt-embeds"
,
recommend_to_remove
=
False
)
return
False
# Only Fp16 and Bf16 dtypes since we only support FA.
# Only Fp16 and Bf16 dtypes since we only support FA.
V1_SUPPORTED_DTYPES
=
[
torch
.
bfloat16
,
torch
.
float16
]
V1_SUPPORTED_DTYPES
=
[
torch
.
bfloat16
,
torch
.
float16
]
if
model_config
.
dtype
not
in
V1_SUPPORTED_DTYPES
:
if
model_config
.
dtype
not
in
V1_SUPPORTED_DTYPES
:
...
...
vllm/inputs/preprocess.py
View file @
46fae69c
...
@@ -6,7 +6,6 @@ from typing import Any, Optional, Union, cast
...
@@ -6,7 +6,6 @@ from typing import Any, Optional, Union, cast
from
typing_extensions
import
assert_never
from
typing_extensions
import
assert_never
from
vllm
import
envs
from
vllm.config
import
ModelConfig
from
vllm.config
import
ModelConfig
from
vllm.logger
import
init_logger
from
vllm.logger
import
init_logger
from
vllm.lora.request
import
LoRARequest
from
vllm.lora.request
import
LoRARequest
...
@@ -306,8 +305,6 @@ class InputPreprocessor:
...
@@ -306,8 +305,6 @@ class InputPreprocessor:
if
not
self
.
model_config
.
enable_prompt_embeds
:
if
not
self
.
model_config
.
enable_prompt_embeds
:
raise
ValueError
(
"You must set `--enable-prompt-embeds` to input "
raise
ValueError
(
"You must set `--enable-prompt-embeds` to input "
"`prompt_embeds`."
)
"`prompt_embeds`."
)
if
envs
.
VLLM_USE_V1
:
raise
ValueError
(
"`prompt_embeds` is only available in V0."
)
prompt_embeds
=
parsed_content
[
"prompt_embeds"
]
prompt_embeds
=
parsed_content
[
"prompt_embeds"
]
...
...
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