Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions recipes/full_dpo_distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ def __init__(self, cfg: DictConfig) -> None:
"Gradient accumulation is not supported with optimizer in bwd."
"Please set gradient_accumulation_steps=1, or optimizer_in_bwd=False."
)
if self.fsdp_cpu_offload:
raise RuntimeError(
"CPU offload is not supported with optimizer in bwd atm."
"Please set fsdp_cpu_offload=False, or optimizer_in_bwd=False."
)

# activation checkpointing/offloading
self._enable_activation_checkpointing = cfg.get(
Expand Down
5 changes: 5 additions & 0 deletions recipes/full_finetune_distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,11 @@ def __init__(self, cfg: DictConfig) -> None:
"Gradient accumulation is not supported with optimizer in bwd."
"Please set gradient_accumulation_steps=1, or optimizer_in_bwd=False."
)
if self.fsdp_cpu_offload:
raise RuntimeError(
"CPU offload is not supported with optimizer in bwd atm."
"Please set fsdp_cpu_offload=False, or optimizer_in_bwd=False."
)

# activation checkpointing/offloading
self._enable_activation_checkpointing = cfg.get(
Expand Down
5 changes: 5 additions & 0 deletions recipes/qat_distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,11 @@ def __init__(self, cfg: DictConfig) -> None:
"Gradient accumulation is not supported with optimizer in bwd."
"Please set gradient_accumulation_steps=1, or optimizer_in_bwd=False."
)
if self.fsdp_cpu_offload:
raise RuntimeError(
"CPU offload is not supported with optimizer in bwd atm."
"Please set fsdp_cpu_offload=False, or optimizer_in_bwd=False."
)

self._enable_async_checkpointing = cfg.get("enable_async_checkpointing", False)
self._checkpoint_client = CheckpointClient(cfg)
Expand Down
Loading