sourabht commited on
Commit
2fedcc0
·
verified ·
1 Parent(s): 526256d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -18,7 +18,12 @@ base = AutoModelForCausalLM.from_pretrained(
18
  MODEL, revision=REVISION, dtype=torch.float32,
19
  attn_implementation="eager",
20
  )
21
- model = PeftModel.from_pretrained(base, "adapter").eval()
 
 
 
 
 
22
 
23
  def reply(text):
24
  messages = [
 
18
  MODEL, revision=REVISION, dtype=torch.float32,
19
  attn_implementation="eager",
20
  )
21
+ model = PeftModel.from_pretrained(
22
+ base,
23
+ "adapter",
24
+ torch_device="cpu",
25
+ is_trainable=False,
26
+ ).eval()
27
 
28
  def reply(text):
29
  messages = [