Prasanna Dhungana commited on
Commit
e7439a7
1 Parent(s): 356533d

updates app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -9,7 +9,7 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
9
  model_path = "parsanna17/finetune_starcoder2_with_R_data"
10
  checkpoint = "bigcode/starcoder2-3b"
11
  config = PeftConfig.from_pretrained(model_path)
12
- model = AutoModelForCausalLM.from_pretrained(checkpoint,device=device, torch_dtype=torch.bfloat16)
13
  model = PeftModel.from_pretrained(model, model_path).to(device)
14
  tokenizer = AutoTokenizer.from_pretrained(checkpoint)
15
 
 
9
  model_path = "parsanna17/finetune_starcoder2_with_R_data"
10
  checkpoint = "bigcode/starcoder2-3b"
11
  config = PeftConfig.from_pretrained(model_path)
12
+ model = AutoModelForCausalLM.from_pretrained(checkpoint,device_map=device, torch_dtype=torch.bfloat16)
13
  model = PeftModel.from_pretrained(model, model_path).to(device)
14
  tokenizer = AutoTokenizer.from_pretrained(checkpoint)
15