[PD] Introduce runtime role switching between prefill and decode (#28403)
Signed-off-by: huanglong <huanglong@linux.alibaba.com> Signed-off-by: inkcherry <mingzhi.liu@amd.com> Co-authored-by: huanglong <huanglong@linux.alibaba.com> Co-authored-by: Shangming Cai <csmthu@gmail.com> Co-authored-by: Huang Long <121648372+LLLL114@users.noreply.github.com>
This commit is contained in:
co-authored by
huanglong
Shangming Cai
Huang Long
parent
a98d921658
commit
1f60ddef5d
@@ -2049,6 +2049,24 @@ class SlowDownReqOutput(BaseReq, kw_only=True):
|
||||
pass
|
||||
|
||||
|
||||
class PdRoleSwitchReqInput(BaseReq, kw_only=True):
|
||||
# Target role; "" is an invalid sentinel rejected by the handler.
|
||||
new_role: Literal["prefill", "decode", ""] = ""
|
||||
# Optional decode bs to capture on a flip to decode (capture-to-fit);
|
||||
# None uses the server's configured decode bs list.
|
||||
decode_cuda_graph_bs: Optional[List[int]] = None
|
||||
# Measured graph footprint from a matching decode peer.
|
||||
decode_cuda_graph_memory_gb: Optional[float] = None
|
||||
|
||||
|
||||
class PdRoleSwitchReqOutput(BaseReq, kw_only=True):
|
||||
success: bool = False
|
||||
message: str = ""
|
||||
old_role: str = ""
|
||||
new_role: str = ""
|
||||
safe_to_restore: bool = False
|
||||
|
||||
|
||||
class AbortReq(BaseReq, kw_only=True):
|
||||
# Whether to abort all requests
|
||||
abort_all: bool = False
|
||||
|
||||
Reference in New Issue
Block a user