Feature Extraction
Transformers
PyTorch
ONNX
Safetensors
English
Chinese
xlm-roberta
text-classification
mteb
Eval Results (legacy)
text-embeddings-inference
Instructions to use BAAI/bge-reranker-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BAAI/bge-reranker-large with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="BAAI/bge-reranker-large")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("BAAI/bge-reranker-large") model = AutoModelForSequenceClassification.from_pretrained("BAAI/bge-reranker-large") - Inference
- Notebooks
- Google Colab
- Kaggle
Output Score
#7
by mosama - opened
I believe the output score is obtained by global max pooling right? Can we have the score normalized between 0 and 1. That would really help a lot.
The score is computed via a linear layer over the last hidden state of CLS. You can use a sigmoid function to normalize the score: https://pytorch.org/docs/stable/generated/torch.sigmoid.html
+1呀,如果没有阈值的话,真的很难确定到底有没有匹配到相关的文档,不然把所有并不相关片段都扔给GPT也不合理。
I'm using
import torch
probabilities = torch.tanh(torch.tensor(scores))
and check if its greater than zero