Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev/eval/export_hf.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def convert(filepath, output, push_to_hub=False, out_dtype="bfloat16"):
data = np.frombuffer(f.read(num_elements * np.dtype(dtype).itemsize), dtype=dtype)
w[key] = data.reshape(shape)
# The binary file saves the padded vocab - drop the padding back to GPT2 size
if shape[0] == Vp:
if shape[0] == Vp and V != Vp:
w[key] = w[key].reshape(shape)[:(V-Vp), :]
# Ensure the file is fully read and then close
assert f.read() == b''
Expand Down