sleep model support (#3135)
Co-authored-by: salman <salman.mohammadi@outlook.com>
This commit is contained in:
@@ -52,6 +52,7 @@ class GRPOStrategy:
|
|||||||
if trl.vllm_mode:
|
if trl.vllm_mode:
|
||||||
grpo_args_kwargs["vllm_mode"] = trl.vllm_mode
|
grpo_args_kwargs["vllm_mode"] = trl.vllm_mode
|
||||||
if trl.vllm_mode == "colocate":
|
if trl.vllm_mode == "colocate":
|
||||||
|
grpo_args_kwargs["enable_sleep_mode"] = trl.vllm_enable_sleep_mode # type: ignore[attr-defined]
|
||||||
grpo_args_kwargs["vllm_gpu_memory_utilization"] = (
|
grpo_args_kwargs["vllm_gpu_memory_utilization"] = (
|
||||||
vllm_cfg.gpu_memory_utilization
|
vllm_cfg.gpu_memory_utilization
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -167,3 +167,9 @@ class TRLConfig(BaseModel):
|
|||||||
"description": "Whether to exclude truncated completions from loss calculation."
|
"description": "Whether to exclude truncated completions from loss calculation."
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
vllm_enable_sleep_mode: bool | None = Field(
|
||||||
|
default=None,
|
||||||
|
json_schema_extra={
|
||||||
|
"description": "Enable sleep mode for vLLM to offload VRAM when idle"
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user