FireRedTeam commited on
Commit
2c64544
·
1 Parent(s): 3bc7439
fireredasr/fireredasr/models/fireredasr_llm.py CHANGED
@@ -18,7 +18,7 @@ class FireRedAsrLlm(nn.Module):
18
  @classmethod
19
  def load_encoder(cls, model_path):
20
  assert os.path.exists(model_path)
21
- package = torch.load(model_path, map_location=lambda storage, loc: storage)
22
  model = FireRedAsrAed.from_args(package["args"])
23
  if "model_state_dict" in package:
24
  model.load_state_dict(package["model_state_dict"], strict=False)
 
18
  @classmethod
19
  def load_encoder(cls, model_path):
20
  assert os.path.exists(model_path)
21
+ package = torch.load(model_path, map_location=lambda storage, loc: storage, weights_only=False)
22
  model = FireRedAsrAed.from_args(package["args"])
23
  if "model_state_dict" in package:
24
  model.load_state_dict(package["model_state_dict"], strict=False)