-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
beam search ranked by ppl instead of probability #87
Comments
doh! Sorry, can you elaborate? I was under the impression that |
Hi, the nn.LanguageModelCriterion is optimized by minimizing -logprobs/#total_number_wds within a batch. I would consider it as log_ppl. However, during beam search, we are choosing top K beams with highest logprobs: |
When I create the things I end up sorting, I create them on L218 as
so in fact the |
@lichengunc I think you're right. I also achieve higher performance after sorting with ppl. |
The code is trained on minimizing log_perplexity, but the beam search is ranked by log_probs.
A simple test on my side shows ranking by log_perplexity in beam search could give higher bleu, rouge, and meteor scores, which is more consistent with the optimization function.
The text was updated successfully, but these errors were encountered: