Instructions to use BAAI/bge-en-icl with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use BAAI/bge-en-icl with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("BAAI/bge-en-icl") 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-en-icl with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="BAAI/bge-en-icl")# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("BAAI/bge-en-icl") model = AutoModel.from_pretrained("BAAI/bge-en-icl") - Notebooks
- Google Colab
- Kaggle
Code to reproduce MTEB results
Hello, can you share the code how to reproduce some of the MTEB results with bge-en-icl?
I wonder how examples are selected to add in the instruction prompt for each individual datasets? Are they hand selected?
thanks a lot. Is it the same example for every query for the same dataset? Can you share some insights how they were selected? Have you selected them by random?
@nv-bschifferer , yes, we use the same examples for different queries in the same dataset. For the task that has a training split in mteb hf repo, we randomly sample a few examples from the training split. If there is no training split, we use chatgpt to generate some examples for this task.
Hello, can you share the prompts and examples for reproducing the BEIR results? The link above is no longer valid.
Ok. The new link is here https://github.com/FlagOpen/FlagEmbedding/tree/master/research/llm_dense_retriever/examples/bge-en-icl/MTEB
But what are the prompts used in these tasks? I only saw example queries and responses there.
Hello, can you share the prompts and examples for reproducing the BEIR results? The link above is no longer valid.
Ok. The new link is here https://github.com/FlagOpen/FlagEmbedding/tree/master/research/llm_dense_retriever/examples/bge-en-icl/MTEB
But what are the prompts used in these tasks? I only saw example queries and responses there.
The link is here: https://github.com/FlagOpen/FlagEmbedding/blob/master/FlagEmbedding/evaluation/mteb/prompts.py