stefan-insilico
commited on
Update handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
@@ -188,7 +188,7 @@ class EndpointHandler:
|
|
188 |
inputs = self.tokenizer(prompt, return_tensors="pt")
|
189 |
input_ids = inputs["input_ids"].to(device)
|
190 |
|
191 |
-
max_new_tokens =
|
192 |
try:
|
193 |
if set(["up", "down"]) & set(config_data.keys()):
|
194 |
acc_embs_up1 = []
|
|
|
188 |
inputs = self.tokenizer(prompt, return_tensors="pt")
|
189 |
input_ids = inputs["input_ids"].to(device)
|
190 |
|
191 |
+
max_new_tokens = self.model.config.max_seq_len - len(input_ids[0])
|
192 |
try:
|
193 |
if set(["up", "down"]) & set(config_data.keys()):
|
194 |
acc_embs_up1 = []
|