diff options
author | Don Mahurin <dmahurin@users.noreply.github.com> | 2023-11-17 07:32:34 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-17 17:32:34 +0200 |
commit | 2ab0707acbf3a3ca9e5bc5959c7920c22eba2257 (patch) | |
tree | 76313ab7c435e56f2457500bd4b8b75000a28ab6 | |
parent | 11173c92d6eaa2bd1308c2389f44f838480836ac (diff) |
convert : use 'model' value if it exists. This allows karpathy/tinyllamas to load (#4089)
Co-authored-by: Don Mahurin <@>
-rwxr-xr-x | convert.py | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -690,6 +690,7 @@ def lazy_load_torch_file(outer_fp: IO[bytes], path: Path) -> ModelPlus: data_base_path=pickle_paths[0][:-4], zip_file=zf) model = unpickler.load() + if 'model' in model: model = model['model'] as_dict = dict(model.items()) return ModelPlus(model=as_dict, paths=[path], format='torch', vocab=None) |