Skip to content

Commit 1ccfdf4

Browse files
authored
Set Weight Loading to be strict (#12151)
Summary: It often causes confusion and weird downstream error when the weight is not properly loaded. Set `load_state_dict` to be True so the error populated early. Differential Revision: D77626023
1 parent f9eb8c4 commit 1ccfdf4

File tree

1 file changed

+1
-1
lines changed
  • examples/qualcomm/oss_scripts/llama

1 file changed

+1
-1
lines changed

examples/qualcomm/oss_scripts/llama/llama.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ def permute(w, heads):
591591
for llama_instance in llama_instance_list:
592592
llama_instance.load_state_dict(
593593
state_dict,
594-
strict=False,
594+
strict=True,
595595
assign=True,
596596
)
597597
end_load_ts = time.time()

0 commit comments

Comments
 (0)