Skip to content

Commit

Permalink
convert : use 'model' value if it exists. This allows karpathy/tinyll…
Browse files Browse the repository at this point in the history
…amas to load (ggerganov#4089)

Co-authored-by: Don Mahurin <@>
  • Loading branch information
dmahurin authored and olexiyb committed Nov 23, 2023
1 parent 2f3f0c0 commit d75ecec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit d75ecec

Please sign in to comment.