Skip to content

Commit

Permalink
fix (#2218)
Browse files Browse the repository at this point in the history
  • Loading branch information
SunMarc authored Dec 26, 2023
1 parent ceb7c69 commit d1abd59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/accelerate/utils/modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -1415,8 +1415,8 @@ def load_checkpoint_in_model(
logger.warn(
"The model weights are not tied. Please use the `tie_weights` method before using the `infer_auto_device` function."
)

check_tied_parameters_on_same_device(tied_params, device_map)
if device_map is not None:
check_tied_parameters_on_same_device(tied_params, device_map)

if offload_folder is None and device_map is not None and "disk" in device_map.values():
raise ValueError(
Expand Down

0 comments on commit d1abd59

Please sign in to comment.