Nam Nguyen
commited on
Update handler.py
Browse files- handler.py +2 -0
handler.py
CHANGED
@@ -37,6 +37,8 @@ class EndpointHandler:
|
|
37 |
return_tensors="pt",
|
38 |
).to("cuda")
|
39 |
|
|
|
|
|
40 |
with torch.backends.cuda.sdp_kernel(enable_flash=True, enable_math=False, enable_mem_efficient=False):
|
41 |
outputs = self.model.generate(
|
42 |
input_ids=inputs,
|
|
|
37 |
return_tensors="pt",
|
38 |
).to("cuda")
|
39 |
|
40 |
+
print(f"inputs={inputs}")
|
41 |
+
|
42 |
with torch.backends.cuda.sdp_kernel(enable_flash=True, enable_math=False, enable_mem_efficient=False):
|
43 |
outputs = self.model.generate(
|
44 |
input_ids=inputs,
|