Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diversity in beam search #1352

Open
ayseozgun opened this issue Jul 31, 2023 · 0 comments
Open

Diversity in beam search #1352

ayseozgun opened this issue Jul 31, 2023 · 0 comments

Comments

@ayseozgun
Copy link

Hello,

I want to create 5 different outputs by using flan-t5-xxl.
Here is my generate code:

"outputs = model.generate(input_ids, max_new_tokens=300,
num_beams=5,
num_return_sequences=5,
num_beam_groups=5,
diversity_penalty=5.0,
no_repeat_ngram_size=2)"
I read num_beam_groups and diversity_penalty parameters should affect the output diversity, but when I run this code, the outputs are still so similar each other. I also tried to change the values of the parameters (like num_beams=8 num_beam_groups=2, 4), still I have diversity problem.

Can you please help me?
Thanks in advance,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant