Skip to content

Commit

Permalink
Minor documentation rephrasing
Browse files Browse the repository at this point in the history
  • Loading branch information
austinapatel committed Sep 13, 2023
1 parent 6eaab24 commit b5a3f5f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/accelerate/big_modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,8 @@ def dispatch_model(
called directly during the forward, for instance if a `dense` linear layer is registered, but at forward,
`dense.weight` and `dense.bias` are used in some operations instead of calling `dense` directly.
force_hooks (`bool`, *optional*, defaults to `False`):
Whether or not to force hooks to be attached to the model even if it's on a single device.
Whether or not to force device hooks to be attached to the model even if all layers are dispatched to a
single device.
"""
# Error early if the device map is incomplete.
check_device_map(model, device_map)
Expand Down Expand Up @@ -487,7 +488,8 @@ def load_checkpoint_and_dispatch(
called directly during the forward, for instance if a `dense` linear layer is registered, but at forward,
`dense.weight` and `dense.bias` are used in some operations instead of calling `dense` directly.
force_hooks (`bool`, *optional*, defaults to `False`):
Whether or not to force hooks to be attached to the model even if it's on a single device.
Whether or not to force device hooks to be attached to the model even if all layers are dispatched to a
single device.
Example:
Expand Down

0 comments on commit b5a3f5f

Please sign in to comment.