seung275 commited on
Commit
af19bcc
·
verified ·
1 Parent(s): fe15409

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -4
app.py CHANGED
@@ -15,12 +15,25 @@ from matplotlib import pyplot as plt
15
  from torchvision import transforms
16
 
17
  # init the model
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  args = {
19
  'model': 'openllama_peft',
20
- 'imagebind_ckpt_path': './pretrained_ckpt/imagebind_ckpt/imagebind_huge.pth',
21
- 'vicuna_ckpt_path': './pretrained_ckpt/vicuna_ckpt/7b_v0',
22
- 'anomalygpt_ckpt_path': './ckpt/train_supervised/pytorch_model.pt',
23
- 'delta_ckpt_path': './pretrained_ckpt/pandagpt_ckpt/7b/pytorch_model.pt',
24
  'stage': 2,
25
  'max_tgt_len': 128,
26
  'lora_r': 32,
@@ -28,6 +41,7 @@ args = {
28
  'lora_dropout': 0.1
29
  }
30
 
 
31
  model = OpenLLAMAPEFTModel(**args)
32
  delta_ckpt = torch.load(args['delta_ckpt_path'], map_location=torch.device('cpu'))
33
  model.load_state_dict(delta_ckpt, strict=False)
 
15
  from torchvision import transforms
16
 
17
  # init the model
18
+ #args = {
19
+ # 'model': 'openllama_peft',
20
+ # 'imagebind_ckpt_path': './pretrained_ckpt/imagebind_ckpt/imagebind_huge.pth',
21
+ # 'vicuna_ckpt_path': './pretrained_ckpt/vicuna_ckpt/7b_v0',
22
+ # 'anomalygpt_ckpt_path': './ckpt/train_supervised/pytorch_model.pt',
23
+ # 'delta_ckpt_path': './pretrained_ckpt/pandagpt_ckpt/7b/pytorch_model.pt',
24
+ # 'stage': 2,
25
+ # 'max_tgt_len': 128,
26
+ # 'lora_r': 32,
27
+ # 'lora_alpha': 32,
28
+ # 'lora_dropout': 0.1
29
+ #}
30
+
31
  args = {
32
  'model': 'openllama_peft',
33
+ 'imagebind_ckpt_path': 'seung275/imagebind_huge.pth',
34
+ 'vicuna_ckpt_path': 'seung275/7b_v0',
35
+ 'anomalygpt_ckpt_path': '/seung275/anomalygpt_ckpt_path',
36
+ 'delta_ckpt_path': '/seung275/delta_ckpt_path',
37
  'stage': 2,
38
  'max_tgt_len': 128,
39
  'lora_r': 32,
 
41
  'lora_dropout': 0.1
42
  }
43
 
44
+
45
  model = OpenLLAMAPEFTModel(**args)
46
  delta_ckpt = torch.load(args['delta_ckpt_path'], map_location=torch.device('cpu'))
47
  model.load_state_dict(delta_ckpt, strict=False)