This repository has been archived by the owner on Jul 21, 2024. It is now read-only.
Releases: synacktraa/swiftrank
Releases · synacktraa/swiftrank
1.3.0
What's New:
- Deploy
swiftrank
as an API service for seamless integration into your workflow. - Resolved bugs in CLI integration and
invoke_with_score
method. - Added unit testing.
1.2.0
SwiftRank version 1.2.0
What's New:
- Introduction of
ReRankPipeline.from_model_id
class method for simplified pipeline setup. invoke
method which used to yield dictionary object with scores and contexts has been splitted into two different methods:invoke
method: returns a list of reranked contexts.invoke_with_score
method: returns a list of tuples containing scores and corresponding contexts.
- Models are now retrieved from the Huggingface account of the FlashRank project owner.
- Expanded compatibility to include class instances and
pydantic.BaseModel
objects alongside dictionary objects as context inputs.
v1.0.0
SwiftRank version 1.0.0
What's New:
- Process complex data input (
json
,yaml
,jsonl
) from terminal. - Custom parser with JQ like schema for pre-processing, context-processing and post-processing input.
- Better error handling.
SwiftRank v0.1.1
Initial Release
Features
🌟 Light Weight:
- No Torch or Transformers: Operable solely on CPU.
- Boasts the tiniest reranking model in the world, ~4MB.
⚡ Ultra Fast:
- Reranking efficiency depends on the total token count in contexts and queries, plus the depth of the model (number of layers).
- For illustration, the duration for the process using the standard model is exemplified in the following test:
🎯 Based on SoTA Cross-encoders and other models:
- How good are Zero-shot rerankers? => Reference.
- Supported Models :-
ms-marco-TinyBERT-L-2-v2
(default)ms-marco-MiniLM-L-12-v2
ms-marco-MultiBERT-L-12
(Multi-lingual, supports 100+ languages)rank-T5-flan
(Best non cross-encoder reranker)
- Why only sleeker models? Reranking is the final leg of larger retrieval pipelines, idea is to avoid any extra overhead especially for user-facing scenarios. To that end models with really small footprint that doesn't need any specialised hardware and yet offer competitive performance are chosen. Feel free to raise issues to add support for a new models as you see fit.
🔧 Versatile Configuration:
- Implements a structured pipeline for the reranking process.
Ranker
andTokenizer
instances are passed to create the pipeline. - Supports complex dictionary objects handling.
- Includes a customizable threshold parameter to filter contexts, ensuring only those with a value equal to or exceeding the threshold are selected.
⌨️ Terminal Integration:
- Pipe your output into
swiftrank
cli tool and get reranked output