Closed liuxianyi closed 4 months ago
num_beams
is related to beam search and determines how many candidate sequences are considered at each step of the generation process. A higher value can lead to better quality outputs but requires more computational resources.do_sample
decides whether the generation process should randomly sample from the probability distribution of next tokens, or just choose the highest probability next token at each step.You can refer to https://huggingface.co/docs/transformers/generation_strategies for more details.
what is the
num_beams
anddo_sample
? when composed, how will they take effect?