Add simple CPU offloading support. (#2081)

This commit is contained in:
Jani Monoses
2024-11-23 08:23:53 +02:00
committed by GitHub
parent 865233e256
commit d98fa1e93d
9 changed files with 174 additions and 29 deletions

View File

@@ -62,6 +62,7 @@ class ServerArgs:
max_prefill_tokens: int = 16384
schedule_policy: str = "lpm"
schedule_conservativeness: float = 1.0
cpu_offload_gb: int = 0
# Other runtime options
tp_size: int = 1
@@ -373,6 +374,13 @@ class ServerArgs:
help="How conservative the schedule policy is. A larger value means more conservative scheduling. Use a larger value if you see requests being retracted frequently.",
)
parser.add_argument(
"--cpu-offload-gb",
type=int,
default=ServerArgs.cpu_offload_gb,
help="How many GBs of RAM to reserve for CPU offloading",
)
# Other runtime options
parser.add_argument(
"--tensor-parallel-size",