Skip to content

Commit 32971d3

Browse files
authored
Fix Llama3 HF checkpoint converter (#202)
1 parent c9f683e commit 32971d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/convert_hf_checkpoint.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def permute(w, n_head):
115115
del final_result[key.replace("wq", "wv")]
116116
print(f"Saving checkpoint to {checkpoint_dir / 'model.pth'}")
117117
torch.save(final_result, checkpoint_dir / "model.pth")
118-
if 'llama-3' in model_name.lower():
118+
if 'llama-3-' in model_name.lower() or 'llama-3.1-' in model_name.lower():
119119
if 'llama-3.1-405b' in model_name.lower():
120120
original_dir = checkpoint_dir / "original" / "mp16"
121121
else:

0 commit comments

Comments
 (0)