We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ac8f76 commit 2d2c4f3Copy full SHA for 2d2c4f3
src/transformers/modeling_utils.py
@@ -3379,7 +3379,8 @@ def save_pretrained(
3379
for key, value in state_dict.items():
3380
if hasattr(value, "_local_tensor"):
3381
gathered_state_dict[key] = value.to_local()
3382
- gathered_state_dict[key] = value
+ else:
3383
+ gathered_state_dict[key] = value
3384
3385
del state_dict
3386
state_dict = gathered_state_dict
0 commit comments