Skip to content

Commit 2b26469

Browse files
authored
convert.py: Support models which are stored in a single pytorch_model.bin (#1469)
* Support models in a single pytorch_model.bin * Remove spurious line with typo
1 parent 4262742 commit 2b26469

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

convert.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ def make_tensors_list() -> List[str]:
121121
f'layers.{i}.feed_forward.w1.weight',
122122
f'layers.{i}.feed_forward.w2.weight',
123123
f'layers.{i}.feed_forward.w3.weight',
124-
f'layers.{i}.atttention_norm.weight',
125124
f'layers.{i}.ffn_norm.weight',
126125
]
127126
return ret
@@ -1055,7 +1054,7 @@ def load_some_model(path: Path) -> ModelPlus:
10551054
files = list(path.glob("model-00001-of-*.safetensors"))
10561055
if not files:
10571056
# Try the PyTorch patterns too, with lower priority
1058-
globs = ["consolidated.00.pth", "pytorch_model-00001-of-*.bin", "*.pt"]
1057+
globs = ["consolidated.00.pth", "pytorch_model-00001-of-*.bin", "*.pt", "pytorch_model.bin" ]
10591058
files = [file for glob in globs for file in path.glob(glob)]
10601059
if not files:
10611060
# Try GGML too, but with lower priority, since if both a non-GGML

0 commit comments

Comments
 (0)