Feature Extraction
sentence-transformers
Safetensors
Transformers
codexembed2b
code
retrieval
custom_code
Instructions to use Salesforce/SFR-Embedding-Code-2B_R with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Salesforce/SFR-Embedding-Code-2B_R with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Salesforce/SFR-Embedding-Code-2B_R", trust_remote_code=True) 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 Salesforce/SFR-Embedding-Code-2B_R with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="Salesforce/SFR-Embedding-Code-2B_R", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Salesforce/SFR-Embedding-Code-2B_R", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -17,6 +17,8 @@ This release is for research purposes only in support of an academic paper. Our
|
|
| 17 |
### License Statement:
|
| 18 |
Users need to make their own assessment regarding any obligations or responsibilities under the corresponding licenses or terms and conditions pertaining to the original datasets and data. This release is for research purposes only in support of an academic paper.
|
| 19 |
|
|
|
|
|
|
|
| 20 |
### Performance on CoIR Benchmark
|
| 21 |
| Model | Model Size | CoIR AVG (NDCG@10) |
|
| 22 |
|-----------------------|------------|---------------------|
|
|
|
|
| 17 |
### License Statement:
|
| 18 |
Users need to make their own assessment regarding any obligations or responsibilities under the corresponding licenses or terms and conditions pertaining to the original datasets and data. This release is for research purposes only in support of an academic paper.
|
| 19 |
|
| 20 |
+
This released model is a fine-tuned version of Gemma and Gemma is provided under and subject to the Gemma Terms of Use found at ai.google.dev/gemma/terms. Additionally, the use of this model is restricted as set forth in the Gemma Prohibited Use Policy at ai.google.dev/gemma/prohibited_use_policy ("Prohibited Use Policy"), which is hereby incorporated by reference into this Agreement.
|
| 21 |
+
|
| 22 |
### Performance on CoIR Benchmark
|
| 23 |
| Model | Model Size | CoIR AVG (NDCG@10) |
|
| 24 |
|-----------------------|------------|---------------------|
|