[ModelRunnerV2] Support prompt embeds (#42963)
Signed-off-by: gcanlin <canlinguosdu@gmail.com> Signed-off-by: Canlin Guo <961750412@qq.com> Signed-off-by: Nick Hill <nickhill123@gmail.com> Co-authored-by: Nick Hill <nickhill123@gmail.com>
This commit is contained in:
@@ -926,6 +926,12 @@ class ModelConfig:
|
||||
f"got {type(self.max_model_len).__name__}: {self.max_model_len!r}. "
|
||||
"Example: max_model_len=2048"
|
||||
)
|
||||
if self.enable_prompt_embeds and self.is_encoder_decoder:
|
||||
# No encoder-decoder model accepts `inputs_embeds`; their decoders
|
||||
# embed `input_ids` internally.
|
||||
raise ValueError(
|
||||
"--enable-prompt-embeds is not supported with encoder-decoder models."
|
||||
)
|
||||
return self
|
||||
|
||||
def _resolve_mm_device_do_normalize(
|
||||
|
||||
@@ -2449,9 +2449,6 @@ class VllmConfig:
|
||||
):
|
||||
unsupported.append("custom logits processors")
|
||||
|
||||
if model_config is not None and model_config.enable_prompt_embeds:
|
||||
unsupported.append("prompt embeds")
|
||||
|
||||
if self.cache_config.kv_sharing_fast_prefill:
|
||||
# Will be added by https://github.com/vllm-project/vllm/pull/35045
|
||||
unsupported.append("KV sharing fast prefill")
|
||||
|
||||
Reference in New Issue
Block a user