zetavg commited on
Commit
211c86c
1 Parent(s): 6352654
Files changed (1) hide show
  1. llama_lora/models.py +1 -0
llama_lora/models.py CHANGED
@@ -244,6 +244,7 @@ def prepare_base_model(base_model_name=Config.default_base_model_name):
244
  def clear_cache():
245
  gc.collect()
246
 
 
247
  # if not shared.args.cpu: # will not be running on CPUs anyway
248
  with torch.no_grad():
249
  torch.cuda.empty_cache()
 
244
  def clear_cache():
245
  gc.collect()
246
 
247
+ torch = get_torch()
248
  # if not shared.args.cpu: # will not be running on CPUs anyway
249
  with torch.no_grad():
250
  torch.cuda.empty_cache()