[PP] Refactor PP to async mode (#11852)
Signed-off-by: Shangming Cai <csmthu@gmail.com> Signed-off-by: Xuchun Shang <xuchun.shang@gmail.com> Co-authored-by: Lianmin Zheng <lianminzheng@gmail.com> Co-authored-by: Shangming Cai <csmthu@gmail.com> Co-authored-by: bluecoffee8 <jasperli2002@gmail.com> Co-authored-by: zhangxiaolei123456 <zhangxiaolei.666@bytedance.com> Co-authored-by: ybyang <10629930+whybeyoung@users.noreply.github.com>
This commit is contained in:
co-authored by
Lianmin Zheng
Shangming Cai
bluecoffee8
zhangxiaolei123456
ybyang
parent
8f5adac8c6
commit
c01b2ee094
@@ -290,6 +290,7 @@ class ServerArgs:
|
||||
max_queued_requests: Optional[int] = None
|
||||
max_total_tokens: Optional[int] = None
|
||||
chunked_prefill_size: Optional[int] = None
|
||||
enable_dynamic_chunking: bool = False
|
||||
max_prefill_tokens: int = 16384
|
||||
schedule_policy: str = "fcfs"
|
||||
enable_priority_scheduling: bool = False
|
||||
@@ -308,6 +309,7 @@ class ServerArgs:
|
||||
tp_size: int = 1
|
||||
pp_size: int = 1
|
||||
pp_max_micro_batch_size: Optional[int] = None
|
||||
pp_async_batch_depth: int = 0
|
||||
stream_interval: int = 1
|
||||
stream_output: bool = False
|
||||
random_seed: Optional[int] = None
|
||||
@@ -2516,6 +2518,12 @@ class ServerArgs:
|
||||
default=ServerArgs.chunked_prefill_size,
|
||||
help="The maximum number of tokens in a chunk for the chunked prefill. Setting this to -1 means disabling chunked prefill.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--enable-dynamic-chunking",
|
||||
action="store_true",
|
||||
default=ServerArgs.enable_dynamic_chunking,
|
||||
help="Enable dynamic chunk size adjustment for pipeline parallelism. When enabled, chunk sizes are dynamically calculated based on fitted function to maintain consistent execution time across chunks.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--max-prefill-tokens",
|
||||
type=int,
|
||||
@@ -2624,6 +2632,12 @@ class ServerArgs:
|
||||
default=ServerArgs.pp_max_micro_batch_size,
|
||||
help="The maximum micro batch size in pipeline parallelism.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--pp-async-batch-depth",
|
||||
type=int,
|
||||
default=ServerArgs.pp_async_batch_depth,
|
||||
help="The async batch depth of pipeline parallelism.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--stream-interval",
|
||||
type=int,
|
||||
|
||||
Reference in New Issue
Block a user