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

[fix] Ensure that the embeddings from hard negative mining are normalized #2944

Merged

Conversation

tomaarsen
Copy link
Collaborator

Hello!

Pull Request overview

  • Ensure that the embeddings from hard negative mining are normalized

Details

If you use use_faiss in mine_hard_negatives, then FAISS expects normalized embeddings. However, the models aren't necessarily normalized. This results in nan for larger datasets and really large scores for smaller datasets. This PR should resolve that by enforcing that all embeddings are normalized in mine_hard_negatives.

  • Tom Aarsen

@tomaarsen tomaarsen merged commit 7290448 into UKPLab:master Sep 19, 2024
11 checks passed
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

Successfully merging this pull request may close these issues.

1 participant