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

Generation of the most likely answers #5

Open
seonwoo-min opened this issue Jun 14, 2023 · 0 comments
Open

Generation of the most likely answers #5

seonwoo-min opened this issue Jun 14, 2023 · 0 comments

Comments

@seonwoo-min
Copy link

Hi Lorenz,

Thanks for the great work and codes!
While I look through the codes, I notice a possible discrepancy between the paper and the codes.
The paper states that you used beam search with num_beams=5 and do_sample=True to obtain the most likely answers. On the other hand, the generate.py script is using the beam search with do_sample=False instead. Am I missing something here?

if args.decoding_method == 'beam_search':
most_likely_generation = model.generate(input_ids,
num_beams=5,
num_return_sequences=2,
do_sample=False,
max_length=input_ids.shape[1] +
max_length_of_generated_sequence,
eos_token_id=period_token_id,
bad_words_ids=question_framing_ids)
elif args.decoding_method == 'greedy':
most_likely_generation = model.generate(input_ids,
num_beams=1,
do_sample=False,
max_length=input_ids.shape[1] +
max_length_of_generated_sequence,
eos_token_id=period_token_id,
bad_words_ids=question_framing_ids)

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