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

Evaluate "Offline" Models #167

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Evaluate "Offline" Models #167

wants to merge 6 commits into from

Conversation

arendu
Copy link

@arendu arendu commented Mar 19, 2024

Currently, beir evaluates a model by calling its encode_queries and encoder_corpus functions. These in turn call the forward methods of the model.

This works great for pytorch-based models, but not for models from other deep-learning frameworks.

To circumvent this issue, I've introduced a "general" offline model which is a static numpy array of query and corpus representations along with a mapping of desired corpus-ids for each query-id.

Thus, any model from any framework can dump its representations for queries and corpus in a numpy format which can then be evaluated using this PR.

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