MrD05 commited on
Commit
f5ea52f
·
1 Parent(s): 7572baf

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +3 -3
handler.py CHANGED
@@ -23,9 +23,9 @@ Alice Gate: *Alice strides into the room with a smile, her eyes lighting up when
23
  class EndpointHandler():
24
 
25
  def __init__(self, path = ""):
26
- self.tokenizer = AutoTokenizer.from_pretrained(path)
27
  self.model = AutoModelForCausalLM.from_pretrained(
28
- path,
29
  device_map = "auto",
30
  load_in_8bit = True,
31
  )
@@ -42,7 +42,7 @@ class EndpointHandler():
42
  ).input_ids
43
  stream_generator = self.model.generate(
44
  input_ids,
45
- max_new_tokens = 50,
46
  do_sample = True,
47
  do_stream = True,
48
  temperature = 0.5,
 
23
  class EndpointHandler():
24
 
25
  def __init__(self, path = ""):
26
+ self.tokenizer = AutoTokenizer.from_pretrained("")
27
  self.model = AutoModelForCausalLM.from_pretrained(
28
+ "",
29
  device_map = "auto",
30
  load_in_8bit = True,
31
  )
 
42
  ).input_ids
43
  stream_generator = self.model.generate(
44
  input_ids,
45
+ max_length = 2048,
46
  do_sample = True,
47
  do_stream = True,
48
  temperature = 0.5,