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

[hotfix] Quantization patch; fix semantic_search_faiss/semantic_search_usearch rescoring #2558

Merged
merged 2 commits into from Mar 26, 2024

Conversation

tomaarsen
Copy link
Collaborator

Hello!

Pull Request overview

  • Fix semantic_search_faiss/semantic_search_usearch rescoring
  • Fix incorrect sorting in semantic_search_recommended.py

Details

Fix semantic_search_faiss/semantic_search_usearch rescoring

In these helper methods, the rescoring would update the corpus indices based on the new scores, but the returned scores corresponded to the original ranking, not the new one. As a result, the returned score for the first sample would not strictly have to be the highest, even if it should be.

This has been resolved now.

Fix incorrect sorting in semantic_search_recommended.py

The rescoring results were sorted the wrong way around: low to high rather than high to low. This resulted in worse performance than should be expected. This is also resolved with this PR.

  • Tom Aarsen

@tomaarsen tomaarsen merged commit a46251f into UKPLab:master Mar 26, 2024
9 checks passed
@tomaarsen tomaarsen deleted the quantization/patch branch March 26, 2024 07:10
tomaarsen added a commit that referenced this pull request Mar 26, 2024
…rch_usearch rescoring (#2558)

* Correctly update the scores after rescoring

* Sort scores from high to low in recommended example
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.

None yet

1 participant