mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-06-09 23:29:07 +08:00
[Misc] V0 fallback for --enable-prompt-embeds (#17615)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
parent
f66f1e0fa3
commit
46fae69cf0
@ -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:
|
||||||
|
|||||||
@ -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:
|
|||||||
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"]
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user