Michael Brunzel commited on
Commit
a1f7ec0
1 Parent(s): b4a7bbc

Update model path

Browse files
Files changed (1) hide show
  1. handler.py +2 -2
handler.py CHANGED
@@ -8,14 +8,14 @@ class EndpointHandler:
8
  def __init__(self, path=""):
9
  # load model and processor from path
10
  self.model = AutoModelForCausalLM.from_pretrained(
11
- path, device_map="auto", load_in_8bit=True)
12
  self.model = PeftModel.from_pretrained(
13
  self.model,
14
  "MichaelAI23/falcon-rw-1b_8bit_finetuned",
15
  torch_dtype=torch.float16,
16
  device_map="auto"
17
  )
18
- self.tokenizer = AutoTokenizer.from_pretrained(path)
19
  self.template = {
20
  "prompt_input": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Input:\n{input}\n\n### Response:\n",
21
  "prompt_no_input": "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Response:\n",
 
8
  def __init__(self, path=""):
9
  # load model and processor from path
10
  self.model = AutoModelForCausalLM.from_pretrained(
11
+ "tiiuae/falcon-rw-1b", device_map="auto", load_in_8bit=True)
12
  self.model = PeftModel.from_pretrained(
13
  self.model,
14
  "MichaelAI23/falcon-rw-1b_8bit_finetuned",
15
  torch_dtype=torch.float16,
16
  device_map="auto"
17
  )
18
+ self.tokenizer = AutoTokenizer.from_pretrained("tiiuae/falcon-rw-1b")
19
  self.template = {
20
  "prompt_input": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Input:\n{input}\n\n### Response:\n",
21
  "prompt_no_input": "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Response:\n",