Update handler.py
Browse files- 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(
|
27 |
self.model = AutoModelForCausalLM.from_pretrained(
|
28 |
-
|
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 |
-
|
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,
|