Skip to content

Commit

Permalink
add trainable_only to gather_cpu_state_dict
Browse files Browse the repository at this point in the history
  • Loading branch information
mori360 committed Dec 13, 2024
1 parent e168f07 commit b5a8e63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions recipes/lora_dpo_distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,7 @@ def save_checkpoint(
self._model,
self._is_rank_zero,
device=self._device,
trainable_only=self._save_adapter_weights_only,
)
if intermediate_checkpoint:
opt_state_dict = training.get_full_optimizer_state_dict(
Expand Down
1 change: 1 addition & 0 deletions recipes/qat_lora_finetune_distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,7 @@ def save_checkpoint(
self._model,
self._is_rank_zero,
device=self._device,
trainable_only=self._save_adapter_weights_only,
)
if self._is_rank_zero:
log.info(
Expand Down

0 comments on commit b5a8e63

Please sign in to comment.