[PD] Update prefill.py (#7190)
This commit is contained in:
@@ -1,23 +1,32 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Optional
|
||||
from typing import TYPE_CHECKING, List, Optional
|
||||
|
||||
import numpy as np
|
||||
import numpy.typing as npt
|
||||
|
||||
from sglang.srt.disaggregation.utils import DisaggregationMode
|
||||
from sglang.srt.server_args import ServerArgs
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from sglang.srt.disaggregation.utils import DisaggregationMode
|
||||
|
||||
|
||||
class KVArgs:
|
||||
engine_rank: int
|
||||
kv_data_ptrs: list[int]
|
||||
kv_data_lens: list[int]
|
||||
kv_item_lens: list[int]
|
||||
aux_data_ptrs: list[int]
|
||||
aux_data_lens: list[int]
|
||||
aux_item_lens: list[int]
|
||||
kv_data_ptrs: List[int]
|
||||
kv_data_lens: List[int]
|
||||
kv_item_lens: List[int]
|
||||
aux_data_ptrs: List[int]
|
||||
aux_data_lens: List[int]
|
||||
aux_item_lens: List[int]
|
||||
ib_device: str
|
||||
ib_traffic_class: str
|
||||
gpu_id: int
|
||||
# for different tp
|
||||
decode_tp_size: int
|
||||
# for pp prefill
|
||||
prefill_pp_size: int
|
||||
|
||||
|
||||
class KVPoll:
|
||||
@@ -45,7 +54,12 @@ class BaseKVSender(ABC):
|
||||
|
||||
@abstractmethod
|
||||
def __init__(
|
||||
self, mgr: BaseKVManager, bootstrap_addr: str, bootstrap_room: int
|
||||
self,
|
||||
mgr: BaseKVManager,
|
||||
bootstrap_addr: str,
|
||||
bootstrap_room: int,
|
||||
dest_tp_ranks: List[int],
|
||||
pp_rank: int,
|
||||
): ...
|
||||
|
||||
@abstractmethod
|
||||
|
||||
Reference in New Issue
Block a user