aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Jobbins <784313+TheBloke@users.noreply.github.com>2023-05-16 23:04:35 +0100
committerGitHub <noreply@github.com>2023-05-17 00:04:35 +0200
commit2b2646931bd2a2eb3e21c6f3733cc0e090b2e24b (patch)
treecdfda40e7c20d1e73474f38a733221d93c203d22
parent42627421ece816e632e6a0d757fa75150c687f87 (diff)
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
-rw-r--r--convert.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/convert.py b/convert.py
index 8f4f039..ece5a02 100644
--- a/convert.py
+++ b/convert.py
@@ -121,7 +121,6 @@ def make_tensors_list() -> List[str]:
f'layers.{i}.feed_forward.w1.weight',
f'layers.{i}.feed_forward.w2.weight',
f'layers.{i}.feed_forward.w3.weight',
- f'layers.{i}.atttention_norm.weight',
f'layers.{i}.ffn_norm.weight',
]
return ret
@@ -1055,7 +1054,7 @@ def load_some_model(path: Path) -> ModelPlus:
files = list(path.glob("model-00001-of-*.safetensors"))
if not files:
# Try the PyTorch patterns too, with lower priority
- globs = ["consolidated.00.pth", "pytorch_model-00001-of-*.bin", "*.pt"]
+ globs = ["consolidated.00.pth", "pytorch_model-00001-of-*.bin", "*.pt", "pytorch_model.bin" ]
files = [file for glob in globs for file in path.glob(glob)]
if not files:
# Try GGML too, but with lower priority, since if both a non-GGML