score_ranges 0~1?

#14
by duzhihua - opened
  1. use FlagReranker
    from FlagEmbedding import FlagReranker
    reranker = FlagReranker('BAAI/bge-reranker-large', use_fp16=True) # Setting use_fp16 to True speeds up computation with a slight performance degradation

score = reranker.compute_score(['query', 'passage'])
print(score)
--- 1.513292670249939

2.but use huggingface -> Model card -> Inference API
input:
I like you. I love you

output:
[
[
{
"label": "LABEL_0",
"score": 0.9471544623374939
}
]
]

Beijing Academy of Artificial Intelligence org

huggingface uses a sigmoid function to normlize the scores.
You can refer to this discusstion: https://huggingface.co/BAAI/bge-reranker-base/discussions/17

Sign up or log in to comment