huggingface / text-embeddings-inference

A blazing fast inference solution for text embeddings models
https://huggingface.co/docs/text-embeddings-inference/quick_tour
Apache License 2.0
2.88k stars 184 forks source link

add support bge-reranker-v2.5-gemma-lightweight #368

Open ziozzang opened 3 months ago

ziozzang commented 3 months ago

Model description

bge-reranker-v2.5-gemma-lightweight 's performance is better bge-m3 :)

Please support model.

Open source status

Provide useful links for the implementation

https://huggingface.co/BAAI/bge-reranker-v2.5-gemma2-lightweight

RocketRider commented 3 months ago

Did just run into this issue as well. Would be great if we could support this new model.

Also the embedding model: https://huggingface.co/BAAI/bge-multilingual-gemma2

colexbruhn commented 3 months ago

Chiming in to express interest as well. This model is great!

It might require adding a few extra runtime args for layer cutoff, compression, etc. Also maybe the ability to choose prompts at inference time?

You can use bge-reranker-v2.5-gemma2-lightweight with the following different prompts:

  • Predict whether passage B contains an answer to query A.
  • Predict whether passages A and B have the same meaning.
  • Predict whether queries A and B are asking the same thing.
  • Predict whether argument A and counterargument B express contradictory opinions.

Really cool stuff, hoping this can get picked up!