to0ony commited on
Commit
520c6fd
·
1 Parent(s): b4fee78

fixed torch loading

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -30,7 +30,7 @@ def load_model():
30
 
31
  model = GPT(gcfg)
32
  sd = torch.load(mdl_path, map_location="cpu", weights_only=False)
33
- model.load_state_dict(sd, strict=True)
34
  model.to(DEVICE)
35
  model.eval()
36
 
 
30
 
31
  model = GPT(gcfg)
32
  sd = torch.load(mdl_path, map_location="cpu", weights_only=False)
33
+ model.load_state_dict(sd["model_state_dict"], strict=True)
34
  model.to(DEVICE)
35
  model.eval()
36