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: allow kwargs in init for RerankingWrapper #1676

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

Conversation

Samoed
Copy link
Collaborator

@Samoed Samoed commented Jan 1, 2025

Checklist

  • Run tests locally to make sure nothing is broken using make test.
  • Run the formatter to format the code using make lint.

Closes #1671

  • When running from the CLI, the device is passed to the model, but RerankingWrapper didn’t account for it.
  • In reranking tasks, there are no instructions for each sentence, so None is appended to the end of the query.
  • The predict function initially expected query, passage, and instruction every time, but now it checks the number of parameters passed.

Copy link
Collaborator

@isaac-chung isaac-chung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command mentioned in the issue was mteb run -m jhu-clsp/FollowIR-7B -t TwitterHjerneRetrieval. Could you please run it and see whether the same error still shows up?

mteb/models/rerankers_custom.py Show resolved Hide resolved
@Samoed
Copy link
Collaborator Author

Samoed commented Jan 1, 2025

I tried running jinaai/jina-reranker-v2-base-multilingual, and it initially gave the same issues, but now it's running fine. Here's the result: TwitterHjerneRetrieval.json.

TwitterHjerneRetrieval is a retrieval task, so maybe we don't want to run it. I also fixed some additional errors. @orionw, could you take a look at the changes?

@Samoed Samoed requested a review from orionw January 1, 2025 20:49
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.

Reranker models do not work with cli
2 participants