Closed awasthiabhijeet closed 1 year ago
args.n_samples
is the number of solutions you want to generate for each prompt however you can't always use it as num_return_sequences
since it might OOM for large models for example, which is why we introduced the other argument args.batch_size
that defines the effective number of sequences that you ask your model to generate, this is done until you we reach args.n_samples
that the user requested defined by n_copies
here
Thank you for the explanation, @loubnabnl !
Looking at the implementation, it seems
batch_size
is playing the role ofnum_samples
.For instance, here, the comment says that:
Similarly, I do not find
args.num_samples
being passed anywhere in calls tomodel.generate()
. Infact, calls tomodel.generate()
in utils.py setnum_return_sequences=batch_size
.In contrast, main.py describes batch size as
Is this a bug?
CC: @loubnabnl