yuhaofeng-shiba commited on
Commit
c562a5d
1 Parent(s): 492f975

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -12,7 +12,7 @@ os.environ['CUDA_LAUNCH_BLOCKING'] = '1'
12
 
13
  args = None
14
  lm_generation = None
15
-
16
 
17
  def init_args():
18
  global args
@@ -43,11 +43,10 @@ def init_model():
43
  torch.set_default_tensor_type(torch.FloatTensor)
44
  model = load_model(model, args.load_model_path)
45
  model.eval()
46
- print(model)
47
 
48
- print(torch.cuda.max_memory_allocated() / 1024 ** 3)
49
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
50
  model.to(device)
 
51
  lm_generation = LmGeneration(model, args.tokenizer)
52
 
53
 
 
12
 
13
  args = None
14
  lm_generation = None
15
+ print(torch.__version__)
16
 
17
  def init_args():
18
  global args
 
43
  torch.set_default_tensor_type(torch.FloatTensor)
44
  model = load_model(model, args.load_model_path)
45
  model.eval()
 
46
 
 
47
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
48
  model.to(device)
49
+ print(torch.cuda.max_memory_allocated() / 1024 ** 3)
50
  lm_generation = LmGeneration(model, args.tokenizer)
51
 
52