Skip to content

Commit

Permalink
fix: add max_memory to _init_infer_auto_device_map's return statement (
Browse files Browse the repository at this point in the history
  • Loading branch information
Nech-C authored Dec 13, 2024
1 parent 7b2edc0 commit 200c9eb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/accelerate/utils/modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,7 @@ def _init_infer_auto_device_map(
special_dtypes: Optional[Dict[str, Union[str, torch.device]]] = None,
) -> Tuple[
List[Union[int, str]],
Dict[Union[int, str], Union[int, str]],
List[Union[int, str]],
List[int],
Dict[str, int],
Expand Down Expand Up @@ -1147,6 +1148,7 @@ def _init_infer_auto_device_map(

return (
devices,
max_memory,
main_devices,
gpus,
module_sizes,
Expand Down Expand Up @@ -1356,6 +1358,7 @@ def infer_auto_device_map(
# Initialize the variables
(
devices,
max_memory,
main_devices,
gpus,
module_sizes,
Expand Down

0 comments on commit 200c9eb

Please sign in to comment.