Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/accelerate/utils/modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ def load_checkpoint_in_model(
else:
for param_name, param in checkpoint.items():
module_name = param_name
if dtype is not None:
if dtype is not None and not str(param.dtype).startswith(("torch.uint", "torch.int", "torch.bool")):
param = param.to(dtype)
while len(module_name) > 0 and module_name not in device_map:
module_name = ".".join(module_name.split(".")[:-1])
Expand Down