-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
Description
Testing with Llama-3 70B, was seeing duplicate generations.
I traced it to this code in predict.py:
for completion in completions:
if all((completion.get(key, "") != "") for key in field_names):
finished_completions.append(completion)
continue
finished_completions.append(
extend_generation(completion, field_names, stage, max_depth, original_example),
)
Not exactly sure why the "if" check fails incorrectly.
I fixed it by doing this:
for completion in completions:
extend_gen = False
for key in field_names:
if key not in completion:
extend_gen = True
break
if extend_gen:
finished_completions.append(
extend_generation(completion, field_names, stage, max_depth, original_example),
)
else:
finished_completions.append(completion)