skip to content
gigarouter gigarouter
models / embeddings · coming soon

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.

est. price
~$0.008
/ 1M tokens · estimated, set at launch
API providers
0
downloads / mo
1M
license
cc-by-nc-4.0

specs

TaskText Embedding
ArchitectureTransformer-based embedding model
ParametersNot specified
LicenseResearch 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

FAQ

What is the maximum input length for SFR-Embedding-2 R?

The model supports a maximum sequence length of 4096 tokens.

How do I format queries for this model?

Each query must include a task instruction using the format: 'Instruct: {task_description}\nQuery: {query}'. Documents do not need an instruction prefix.

What is the license for SFR-Embedding-2 R?

The model is released for research purposes only, with no specific license for commercial use.

How can I call this model via the gigarouter API?

Use the gigarouter OpenAI-compatible endpoint with your API key, sending your text as input to generate embeddings.

What libraries are supported for running this model?

The model supports both the transformers library and sentence-transformers library.

not yet live

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.

related embeddings models

compare all →