Skip to content

Commit

Permalink
Change file rename approach
Browse files Browse the repository at this point in the history
  • Loading branch information
davmacario authored and rasbt committed Jun 12, 2024
1 parent 6c3b0ee commit 9383b5c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions litgpt/scripts/convert_hf_checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import gc
import json
import os
from collections import defaultdict
from functools import partial
from pathlib import Path
Expand Down Expand Up @@ -347,7 +346,7 @@ def convert_hf_checkpoint(
with open(model_safetensor_map_json_path, encoding="utf-8") as json_map:
bin_index = json.load(json_map)
bin_files = {
checkpoint_dir / (os.path.splitext(bin)[0] + ".bin")
checkpoint_dir / Path(bin).with_suffix(".bin")
for bin in bin_index["weight_map"].values()
}
else:
Expand Down

0 comments on commit 9383b5c

Please sign in to comment.