Skip to content

Commit

Permalink
off by one (#724)
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobSzwejbka authored May 8, 2024
1 parent 155d484 commit 23610c7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,11 +615,7 @@ def _main(
# arbitrarily large number as chat mode goes until max_seq length
# or user exits
num_samples = generator_args.num_samples if not generator_args.chat_mode else 100000
i = (
-1
) # long loop and Im scared someone will add a continue in it, so start at -1 and increment at the start
while i < num_samples:
i += 1
for i in range(num_samples):
device_sync(device=builder_args.device)
if i >= 0 and generator_args.chat_mode:
prompt = input("User: ")
Expand Down

0 comments on commit 23610c7

Please sign in to comment.