cyqm
commited on
Commit
·
439dfb9
1
Parent(s):
6957707
Update handler: delete debug info
Browse files- handler.py +0 -4
handler.py
CHANGED
@@ -45,8 +45,6 @@ class EndpointHandler:
|
|
45 |
return_tensors="pt"
|
46 |
).to("cuda")
|
47 |
|
48 |
-
print("Debug: `tokenized_prompt`:", len(tokenized_prompt[0]), self.tokenizer.decode(tokenized_prompt[0]))
|
49 |
-
|
50 |
torch.manual_seed(random.randint(0, 2 ** 32 - 1))
|
51 |
|
52 |
time_start = time.time()
|
@@ -60,8 +58,6 @@ class EndpointHandler:
|
|
60 |
)
|
61 |
time_end = time.time()
|
62 |
|
63 |
-
print("Debug: `out`:", len(out[0]), self.tokenizer.decode(out[0]))
|
64 |
-
|
65 |
response = self.tokenizer.decode(out[0][len(tokenized_prompt[0]):])
|
66 |
|
67 |
num_new_tokens = len(out[0]) - len(tokenized_prompt[0])
|
|
|
45 |
return_tensors="pt"
|
46 |
).to("cuda")
|
47 |
|
|
|
|
|
48 |
torch.manual_seed(random.randint(0, 2 ** 32 - 1))
|
49 |
|
50 |
time_start = time.time()
|
|
|
58 |
)
|
59 |
time_end = time.time()
|
60 |
|
|
|
|
|
61 |
response = self.tokenizer.decode(out[0][len(tokenized_prompt[0]):])
|
62 |
|
63 |
num_new_tokens = len(out[0]) - len(tokenized_prompt[0])
|