Skip to content

Commit

Permalink
Doc
Browse files Browse the repository at this point in the history
  • Loading branch information
muellerzr committed Apr 24, 2024
1 parent 7c3704d commit 47952ee
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/transformers/trainer_pt_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1288,6 +1288,17 @@ class AcceleratorConfig:
"multiple different seeds to compare. Should also be ran with [`~utils.set_seed`] for the best results."
},
)

non_blocking: Optional[bool] = field(
default=False,
metadata={
"help": "Whether to use non-blocking CUDA calls to help minimize synchronization during "
"distributed training with prepared `DataLoader` inputs being moved to device. "
"Best if used with `pin_memory=True` in the `TrainingArguments`. Requires accelerate "
"v0.30.0."
},
)

gradient_accumulation_kwargs: Optional[Dict] = field(
default=None,
metadata={
Expand All @@ -1302,15 +1313,6 @@ class AcceleratorConfig:
},
)

non_blocking: Optional[bool] = field(
default=False,
metadata={
"help": "Whether to use non-blocking CUDA calls to help minimize synchronization during "
"distributed training with prepared `DataLoader` inputs being moved to device. "
"Best if used with `pin_memory=True` in the `TrainingArguments`."
},
)

@classmethod
def from_json_file(cls, json_file):
# Check if exists
Expand Down

0 comments on commit 47952ee

Please sign in to comment.