zhengr commited on
Commit
6801249
·
verified ·
1 Parent(s): fb57d11

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -27,9 +27,11 @@ tokenizer.padding_side = "right"
27
 
28
  streamer = TextStreamer(tokenizer)
29
 
30
- model = AutoModelForCausalLM.from_pretrained(model, trust_remote_code=True, token = access_token, device_map="auto", load_in_8bit=True, offload_folder="offload/")
31
  model = PeftModel.from_pretrained(model, peft_model, offload_folder="offload/")
32
 
 
 
33
  model = model.eval()
34
 
35
  # Inference Data
 
27
 
28
  streamer = TextStreamer(tokenizer)
29
 
30
+ model = AutoModelForCausalLM.from_pretrained(model, trust_remote_code=True, token = access_token, device_map="cuda:0", load_in_8bit=True, offload_folder="offload/")
31
  model = PeftModel.from_pretrained(model, peft_model, offload_folder="offload/")
32
 
33
+ #device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')
34
+ device = 'cuda:0'
35
  model = model.eval()
36
 
37
  # Inference Data