[Feature] Option to save model weights to CPU when memory saver mode is enabled (#10873)

Co-authored-by: molocule <34072934+molocule@users.noreply.github.com>
This commit is contained in:
Matt Nappo
2025-10-03 16:48:19 +08:00
committed by GitHub
co-authored by molocule
parent 34151f173b
commit 8c57490210
7 changed files with 78 additions and 22 deletions
+6
View File
@@ -400,6 +400,7 @@ class ServerArgs:
num_continuous_decode_steps: int = 1
delete_ckpt_after_loading: bool = False
enable_memory_saver: bool = False
enable_weights_cpu_backup: bool = False
allow_auto_truncate: bool = False
enable_custom_logit_processor: bool = False
flashinfer_mla_disable_ragged: bool = False
@@ -2541,6 +2542,11 @@ class ServerArgs:
action="store_true",
help="Allow saving memory using release_memory_occupation and resume_memory_occupation",
)
parser.add_argument(
"--enable-weights-cpu-backup",
action="store_true",
help="Save model weights to CPU memory during release_weights_occupation and resume_weights_occupation",
)
parser.add_argument(
"--allow-auto-truncate",
action="store_true",