[Rebase] Align vLLM-Omni with vLLM v0.31.0 (#8459)
Signed-off-by: tzhouam <tzhouam@connect.ust.hk>
This commit is contained in:
1 parent
1f47fa2f29
commit
0b0d2d7009
141 files changed
+2885
-721
No files matched your search
@@ -14,6 +14,7 @@ from typing import Any, Literal, cast
|
||||
from vllm.inputs import PromptType
|
||||
from vllm.logger import init_logger
|
||||
from vllm.v1.engine import EngineCoreRequest
|
||||
from vllm.v1.kv_hints import KvHintsEnvelope
|
||||
|
||||
from vllm_omni.data_entry_keys import REQUEST_ARTIFACT_DIRS_KEY, TRANSFORM_OWNED_META_KEYS
|
||||
from vllm_omni.engine import OmniEngineCoreRequest
|
||||
@@ -259,6 +260,7 @@ class AsyncOmniEngine(OmniEngineBase):
|
||||
data_parallel_rank: int | None = None,
|
||||
reasoning_ended: bool | None = None,
|
||||
*,
|
||||
kv_hints: KvHintsEnvelope | None = None,
|
||||
resumable: bool = False,
|
||||
message_type: Literal["add_request", "streaming_update"] = "add_request",
|
||||
) -> StageSubmissionMessage:
|
||||
@@ -289,6 +291,8 @@ class AsyncOmniEngine(OmniEngineBase):
|
||||
request_artifact_dirs: list[str] = []
|
||||
|
||||
stage_type = self.stage_metadata[0].stage_type
|
||||
if stage_type == "diffusion" and kv_hints is not None:
|
||||
raise ValueError("kv_hints require an AR/LLM stage with a KV cache")
|
||||
output_prompt_text: Any = None
|
||||
_preprocess_ms = 0.0
|
||||
if stage_type != "diffusion" and not isinstance(prompt, EngineCoreRequest):
|
||||
@@ -343,6 +347,7 @@ class AsyncOmniEngine(OmniEngineBase):
|
||||
priority=priority,
|
||||
data_parallel_rank=data_parallel_rank,
|
||||
resumable=resumable,
|
||||
**({"kv_hints": kv_hints} if kv_hints is not None else {}),
|
||||
)
|
||||
except Exception:
|
||||
if preselected_stage0_replica is not None and self.stage_pools:
|
||||
@@ -518,6 +523,7 @@ class AsyncOmniEngine(OmniEngineBase):
|
||||
data_parallel_rank: int | None = None,
|
||||
reasoning_ended: bool | None = None,
|
||||
*,
|
||||
kv_hints: KvHintsEnvelope | None = None,
|
||||
resumable: bool = False,
|
||||
) -> None:
|
||||
"""Process stage-0 input locally, then send to the Orchestrator.
|
||||
@@ -543,6 +549,7 @@ class AsyncOmniEngine(OmniEngineBase):
|
||||
data_parallel_rank=data_parallel_rank,
|
||||
reasoning_ended=reasoning_ended,
|
||||
resumable=resumable,
|
||||
**({"kv_hints": kv_hints} if kv_hints is not None else {}),
|
||||
)
|
||||
except BaseException:
|
||||
if isinstance(prompt, dict):
|
||||
@@ -599,6 +606,7 @@ class AsyncOmniEngine(OmniEngineBase):
|
||||
data_parallel_rank: int | None = None,
|
||||
reasoning_ended: bool | None = None,
|
||||
*,
|
||||
kv_hints: KvHintsEnvelope | None = None,
|
||||
resumable: bool = False,
|
||||
) -> None:
|
||||
"""Async add_request API."""
|
||||
@@ -617,6 +625,7 @@ class AsyncOmniEngine(OmniEngineBase):
|
||||
data_parallel_rank=data_parallel_rank,
|
||||
reasoning_ended=reasoning_ended,
|
||||
resumable=resumable,
|
||||
**({"kv_hints": kv_hints} if kv_hints is not None else {}),
|
||||
)
|
||||
|
||||
def add_streaming_update(
|
||||
|
||||
Reference in new issue
Block a user