YingL19 commited on
Commit
2ba43d9
·
verified ·
1 Parent(s): 29eb4e7

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +2 -2
handler.py CHANGED
@@ -33,8 +33,8 @@ class EndpointHandler():
33
  def __init__(self, path=""):
34
  DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
35
  model_name = "moka-ai/m3e-base"
36
- self.config = PeftConfig.from_pretrained("YingL19/gemma_10epoch_1e5_lincoln1",device_map=DEVICE)
37
- self.base_model = AutoModelForCausalLM.from_pretrained("google/gemma-7b",device_map=DEVICE)
38
  self.newmodel = PeftModel.from_pretrained(self.base_model, "YingL19/gemma_10epoch_1e5_lincoln1",device_map=DEVICE)
39
  self.tokenizer = AutoTokenizer.from_pretrained("YingL19/gemma_10epoch_1e5_lincoln1",device_map=DEVICE)
40
 
 
33
  def __init__(self, path=""):
34
  DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
35
  model_name = "moka-ai/m3e-base"
36
+ self.config = PeftConfig.from_pretrained("YingL19/gemma_10epoch_1e5_lincoln1")
37
+ self.base_model = AutoModelForCausalLM.from_pretrained("google/gemma-7b",device_map="auto")
38
  self.newmodel = PeftModel.from_pretrained(self.base_model, "YingL19/gemma_10epoch_1e5_lincoln1",device_map=DEVICE)
39
  self.tokenizer = AutoTokenizer.from_pretrained("YingL19/gemma_10epoch_1e5_lincoln1",device_map=DEVICE)
40