Spaces:
Runtime error
Runtime error
yuhaofeng-shiba
commited on
Commit
•
7b48d93
1
Parent(s):
b35cff2
Update generate.py
Browse files- generate.py +0 -1
generate.py
CHANGED
@@ -95,7 +95,6 @@ class LmGeneration:
|
|
95 |
continue_exsample = [i for i in range(batch)]
|
96 |
with torch.no_grad():
|
97 |
for cur_pos in range(start_pos, total_len):
|
98 |
-
print(cur_pos)
|
99 |
logits = self.model.forward(tokens[continue_exsample, prev_pos:cur_pos], prev_pos, continue_exsample).float()
|
100 |
next_token_scores = apply_top_k(logits, top_k=args.top_k)
|
101 |
next_token_scores = apply_top_p(next_token_scores, args.top_p)
|
|
|
95 |
continue_exsample = [i for i in range(batch)]
|
96 |
with torch.no_grad():
|
97 |
for cur_pos in range(start_pos, total_len):
|
|
|
98 |
logits = self.model.forward(tokens[continue_exsample, prev_pos:cur_pos], prev_pos, continue_exsample).float()
|
99 |
next_token_scores = apply_top_k(logits, top_k=args.top_k)
|
100 |
next_token_scores = apply_top_p(next_token_scores, args.top_p)
|