SFR-Embedding-2 R
Salesforce/SFR-Embedding-2_R
published Jun 2024 · updated Feb 2025
SFR-Embedding-2 R is a text embedding model from Salesforce Research that generates high-quality vector representations for retrieval and classification tasks.
specs
| Task | Text Embedding |
| Architecture | Transformer-based embedding model |
| Parameters | Not specified |
| License | Research purposes only |
about this model
Salesforce/SFR-Embedding-2_R is a text embedding model that produces dense vector representations optimized for information retrieval and semantic search tasks. Developed by Salesforce Research, it uses a multi-stage training approach to achieve strong performance across diverse embedding benchmarks.
Key Capabilities
The model accepts a query paired with a one-sentence task instruction and supports input sequences up to 4,096 tokens. For retrieval, only queries require an instruction prefix; documents can be passed as-is. This instruction-following architecture enables fine-grained control over the embedding behavior for different downstream tasks.
Benchmark Performance
On the MTEB classification suite, SFR-Embedding-2_R achieves 92.72% accuracy on AmazonCounterfactualClassification, 97.31% on AmazonPolarityClassification, and 61.04% on AmazonReviewsClassification. For retrieval on the ArguAna dataset, it obtains an NDCG@10 of 62.34, MAP@10 of 53.91, Recall@10 of 89.05%, and Precision@1 of 37.77%. In clustering tasks, it reports a v-measure of 54.02 on ArxivClusteringP2P and 48.82 on ArxivClusteringS2S.
Additional Details
The model is tagged as a feature-extraction pipeline and is compatible with both transformers and sentence-transformers libraries. It was created on 2024-06-14 and has accumulated over 3.9 million all-time downloads.
Ethical considerations: This release is intended for research purposes only. Users should evaluate accuracy, safety, and fairness before deploying in high-risk applications. Refer to Salesforce’s acceptable use policies for further guidance.
best for
- ·Semantic search and passage retrieval
- ·Text classification with embedding-based methods
- ·Clustering large document collections
FAQ
The model supports a maximum sequence length of 4096 tokens.
Each query must include a task instruction using the format: 'Instruct: {task_description}\nQuery: {query}'. Documents do not need an instruction prefix.
The model is released for research purposes only, with no specific license for commercial use.
Use the gigarouter OpenAI-compatible endpoint with your API key, sending your text as input to generate embeddings.
The model supports both the transformers library and sentence-transformers library.
We're benchmarking and onboarding SFR-Embedding-2 R as a hosted, OpenAI-compatible API. Sign in for free credit and be ready when it lands, or tell us you want it and we'll prioritize it.