Update handler.py
Browse files- handler.py +6 -4
handler.py
CHANGED
@@ -50,10 +50,12 @@ class EndpointHandler():
|
|
50 |
|
51 |
with torch.no_grad():
|
52 |
out = self.model.generate(**processed,
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
|
57 |
).to(self.device)
|
58 |
|
59 |
result = {}
|
|
|
50 |
|
51 |
with torch.no_grad():
|
52 |
out = self.model.generate(**processed,
|
53 |
+
max_new_tokens=50,
|
54 |
+
temperature = 0.5,
|
55 |
+
do_sample=True,
|
56 |
+
top_k=50,
|
57 |
+
top_p=0.9,
|
58 |
+
repetition_penalty=1.2
|
59 |
).to(self.device)
|
60 |
|
61 |
result = {}
|