Repository navigation
Replies: 3 comments
|
Note: we're using Chonkie under similar reasoning, but it does still seem to be under active development. It's MIT licensed, FWIW. |
0 replies
|
TODO: Articulate support for e.g. OpenAI-API-style rerankers such as https://huggingface.co/lightblue/lb-reranker-0.5B-v1.0 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I want our hybrid retriever system to support reranker models. Rather that implement all the various approaches (e.g. Cohere API vs cross-encoders from HuggingFace) I'm looking to just use the Answer.ai rerankers library. This follows practice I've used successfully in my consulting. I did have a moment of doubt when I noticed that the rerankers lib hasn't been updated in some six months, but I think it's OK. The library was updated to be lightweight and dependency-free by default, making it relatively stable, and it still supports a wide range of models through HuggingFace integration. Worst case if it truly falls stale, it's Apache 2.0 licensed, so we can vendor it into OgbujiPT.
I also wanted to put it through the paces with a very new HF-based reranker, and in particular zeroentropy/zerank-2. The code below demonstrates that AnswerDotAI/rerankers still works fine for this, so I think we're in good shape.
Note: ZeRank-2 seems really nice:
It does give a lot of warnings suggesting a fine-tune, but I leave that to the end user. Also, Batch processing fails, but I think we can work around that.
zerank2_via_rerankers_crossencoders.py
Setup (assuming OgbujiPT>=0.10.0 itself is installed):
pip install "rerankers[transformers]" python zerank2_via_rerankers_crossencoders.pyAll reactions