DW-ReCo commited on
Commit
4bc4efd
1 Parent(s): befb905

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +2 -2
handler.py CHANGED
@@ -17,8 +17,8 @@ alpaca_prompt = """Below is an instruction that describes a task, paired with an
17
  class EndpointHandler:
18
  def __init__(self, path=""):
19
  # load model and processor from path
20
- self.model = AutoModelForCausalLM.from_pretrained(path, device_map="auto")
21
- self.tokenizer = AutoTokenizer.from_pretrained(path)
22
 
23
  with open(f"{path}/zero_shot_cot_prompt.txt", 'r') as file:
24
  self.instruction_prompt = file.read()
 
17
  class EndpointHandler:
18
  def __init__(self, path=""):
19
  # load model and processor from path
20
+ self.model = AutoModelForCausalLM.from_pretrained(path, gguf_file='./unsloth.Q4_K_M.gguf')
21
+ self.tokenizer = AutoTokenizer.from_pretrained(path, gguf_file='./unsloth.Q4_K_M.gguf')
22
 
23
  with open(f"{path}/zero_shot_cot_prompt.txt", 'r') as file:
24
  self.instruction_prompt = file.read()