Skip to content

Commit 2ab0707

Browse files
authored
convert : use 'model' value if it exists. This allows karpathy/tinyllamas to load (#4089)
Co-authored-by: Don Mahurin <@>
1 parent 11173c9 commit 2ab0707

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

convert.py

+1
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,7 @@ def lazy_load_torch_file(outer_fp: IO[bytes], path: Path) -> ModelPlus:
690690
data_base_path=pickle_paths[0][:-4],
691691
zip_file=zf)
692692
model = unpickler.load()
693+
if 'model' in model: model = model['model']
693694
as_dict = dict(model.items())
694695
return ModelPlus(model=as_dict, paths=[path], format='torch', vocab=None)
695696

0 commit comments

Comments
 (0)