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

Support maximizing average loglik instead of sum loglik #36

Open
wiseodd opened this issue Jul 1, 2024 · 0 comments
Open

Support maximizing average loglik instead of sum loglik #36

wiseodd opened this issue Jul 1, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@wiseodd
Copy link
Collaborator

wiseodd commented Jul 1, 2024

Huggingface by default uses length_penalty = 1.0 => the objective of the tree search is average loglik, instead of sum.

https://github.com/huggingface/transformers/blob/6c1d0b069de22d7ed8aa83f733c25045eea0585d/src/transformers/generation/beam_search.py#L964-L965

@wiseodd wiseodd added the enhancement New feature or request label Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants