GeoReranker
The GeoReranker model is a critical component in Retrieval-Augmented Generation (RAG) systems, designed to refine the initial retrieval results by reordering candidate documents based on their semantic relevance to the query. Different from embedding model, reranker uses question and document as input and directly output similarity instead of embedding. You can get a relevance score by inputting query and passage to the reranker. And the score can be mapped to a float value in [0,1] by sigmoid function.
๐For full documentation, see: https://github.com/GeoGPT-Research-Project/GeoGPT-RAG
Quickstart
To load the GeoReranker model with HuggingFace, use the following snippet:
from FlagEmbedding import FlagReranker
model_name_or_path = 'GeoGPT/GeoReranker'
reranker = FlagReranker(model_name_or_path, use_fp16=True) # Setting use_fp16 to True speeds up computation with a slight performance degradation
score = reranker.compute_score(['query', 'passage'])
# You can map the scores into 0-1 by set "normalize=True", which will apply sigmoid function to the score
score = reranker.compute_score(['query', 'passage'], normalize=True)
scores = reranker.compute_score([['what is panda?', 'hi'], ['what is panda?', 'The giant panda (Ailuropoda melanoleuca), sometimes called a panda bear or simply panda, is a bear species endemic to China.']])
# You can map the scores into 0-1 by set "normalize=True", which will apply sigmoid function to the score
scores = reranker.compute_score([['what is panda?', 'hi'], ['what is panda?', 'The giant panda (Ailuropoda melanoleuca), sometimes called a panda bear or simply panda, is a bear species endemic to China.']], normalize=True)
License and Uses
GeoReranker is licensed under the MIT License. GeoReranker is trained on the foundation of BGE-M3, which is licensed under the MIT License. It is your responsibility to ensure that your use of GeoReranker adheres to the terms of both the GeoReranker model and its upstream dependency, BGE-M3.
The model is not intended for use in any manner that violates applicable laws or regulations, nor for any activities prohibited by the license agreement. Additionally, it should not be used in languages other than those explicitly supported, as outlined in this model card.
Limitations
GeoReranker is trained on English datasets, and performance may be suboptimal for other languages.
- Downloads last month
- 40
Model tree for GeoGPT-Research-Project/GeoReranker
Base model
BAAI/bge-m3