[Feature] Support text encoder Disaggregation for H3 (#5885)
Signed-off-by: Canlin Guo <canlinguosdu@gmail.com> Signed-off-by: lishunyang12 <lishunyang12@163.com> Signed-off-by: yuanwu <yuan.wu@intel.com> Co-authored-by: lishunyang12 <lishunyang12@163.com> Co-authored-by: yuanwu <yuan.wu@intel.com>
This commit is contained in:
61 files changed
+2952
-366
No files matched your search
@@ -16,6 +16,7 @@ from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import os
|
||||
import shutil
|
||||
import time as _time
|
||||
from collections.abc import Awaitable, Callable
|
||||
from dataclasses import dataclass, field
|
||||
@@ -66,6 +67,12 @@ from vllm_omni.outputs import OmniRequestOutput
|
||||
|
||||
logger = init_logger(__name__)
|
||||
|
||||
|
||||
def cleanup_request_artifact_dirs(artifact_dirs: set[str] | list[str]) -> None:
|
||||
for artifact_dir in artifact_dirs:
|
||||
shutil.rmtree(artifact_dir, ignore_errors=True)
|
||||
|
||||
|
||||
# VLLM_OMNI_EVENT_DRIVEN_ORCH=1 switches the orchestration loop (and the
|
||||
# serving-side final-output drain in entrypoints/async_omni.py) from the legacy
|
||||
# 1 ms poll cadence to event-driven wakeups: one reader task per live LLM stage
|
||||
@@ -220,6 +227,7 @@ class OrchestratorRequestState:
|
||||
duplex_stage_fences: dict[int, DuplexFence] = field(default_factory=dict)
|
||||
duplex_config_generation: int = -1
|
||||
running_counter_registered: bool = False
|
||||
request_artifact_dirs: set[str] = field(default_factory=set)
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -723,6 +731,7 @@ class Orchestrator:
|
||||
final_output_stage_ids=final_output_stage_ids,
|
||||
request_timestamp=float(msg.request_timestamp or _time.time()),
|
||||
mm_features=getattr(prompt, "mm_features", None),
|
||||
request_artifact_dirs=set(msg.request_artifact_dirs or ()),
|
||||
)
|
||||
self.request_states[request_id] = req_state
|
||||
self._register_running_request(req_state)
|
||||
@@ -1720,6 +1729,8 @@ class Orchestrator:
|
||||
for request_id in cleanup_ids:
|
||||
self._pd_kv_params.pop(request_id, None)
|
||||
req_state = self.request_states.pop(request_id, None)
|
||||
if req_state is not None:
|
||||
cleanup_request_artifact_dirs(getattr(req_state, "request_artifact_dirs", ()))
|
||||
if req_state is not None and req_state.running_counter_registered and self._running_counter is not None:
|
||||
self._running_counter.decrement()
|
||||
req_state.running_counter_registered = False
|
||||
|
||||
Reference in new issue
Block a user