Michael Brunzel
commited on
Commit
•
61578b6
1
Parent(s):
e48403c
Update tokenizer
Browse files- handler.py +1 -1
handler.py
CHANGED
@@ -60,12 +60,12 @@ class EndpointHandler:
|
|
60 |
parameters = data.pop("parameters", None)
|
61 |
|
62 |
inputs = self.generate_prompt(self.template, self.instruction, inputs)
|
63 |
-
input_ids = input_ids.to(self.device)
|
64 |
# preprocess
|
65 |
self.tokenizer.pad_token_id = (
|
66 |
0 # unk. we want this to be different from the eos token
|
67 |
)
|
68 |
input_ids = self.tokenizer(inputs, return_tensors="pt").input_ids
|
|
|
69 |
|
70 |
# pass inputs with all kwargs in data
|
71 |
if parameters is not None:
|
|
|
60 |
parameters = data.pop("parameters", None)
|
61 |
|
62 |
inputs = self.generate_prompt(self.template, self.instruction, inputs)
|
|
|
63 |
# preprocess
|
64 |
self.tokenizer.pad_token_id = (
|
65 |
0 # unk. we want this to be different from the eos token
|
66 |
)
|
67 |
input_ids = self.tokenizer(inputs, return_tensors="pt").input_ids
|
68 |
+
input_ids = input_ids.to(self.device)
|
69 |
|
70 |
# pass inputs with all kwargs in data
|
71 |
if parameters is not None:
|