Skip to content

Commit

Permalink
fix: debug forward pass (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
PABannier authored Oct 10, 2023
1 parent f78c64f commit 3fa4ef0
Show file tree
Hide file tree
Showing 5 changed files with 220 additions and 127 deletions.
7 changes: 6 additions & 1 deletion convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,12 @@ def parse_codec_model(checkpoint, outfile, use_f16):
print(f"Processing variable: {name} with shape: {var_data.shape}")

if use_f16:
if "weight" in name or "embed" in name:
if "embed" in name:
print(" Converting to float32")
var_data = var_data.astype(np.float32)
ftype_cur = 0
n_f32 += 1
elif "weight" in name:
print(" Converting to float16")
var_data = var_data.astype(np.float16)
ftype_cur = 1
Expand Down
Loading

0 comments on commit 3fa4ef0

Please sign in to comment.