Feature Extraction
sentence-transformers
PyTorch
ONNX
Safetensors
Transformers
English
bert
sentence-similarity
mteb
Eval Results (legacy)
Eval Results
text-embeddings-inference
Instructions to use BAAI/bge-large-en-v1.5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use BAAI/bge-large-en-v1.5 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("BAAI/bge-large-en-v1.5") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Transformers
How to use BAAI/bge-large-en-v1.5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="BAAI/bge-large-en-v1.5")# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("BAAI/bge-large-en-v1.5") model = AutoModel.from_pretrained("BAAI/bge-large-en-v1.5", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
When should I use this instruction for RAG retrival tasks?
#11
by kk3dmax - opened
task = 'Represent this sentence for searching relevant passages'
when should I use this instruction for RAG retrival tasks, here are 3 options:
option 1 - use it only at buiding vector store stage;
option 2 - use it only at retrieve vector store stage;
option 3 - use it at both buiding and retrieval vector store stages.
option 2. You only need to add instruction to the query.