Skip to content

Commit acb43d7

Browse files
Lunwen Hefacebook-github-bot
authored andcommitted
Do not raise error when there is mixed dtype in the checkpoint
Summary: This warning message got turned into an exception during the refactor of D64145852. It fails our export flow for llama 3.2 1B/3B. This diff fixes it. Differential Revision: D64438373
1 parent 3e052a8 commit acb43d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/models/checkpoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def get_checkpoint_dtype(checkpoint: Dict[str, Any]) -> Optional[str]:
6767
if value.dtype != dtype
6868
]
6969
if len(mismatched_dtypes) > 0:
70-
raise ValueError(
70+
print(
7171
f"Mixed dtype model. Dtype of {first_key}: {first.dtype}. Mismatches in the checkpoint: {mismatched_dtypes}"
7272
)
7373
return dtype

0 commit comments

Comments
 (0)