---
base_model: srikarvar/e5-cogcache-small
datasets: []
language:
- en
library_name: sentence-transformers
license: apache-2.0
metrics:
- cosine_accuracy@1
- cosine_accuracy@3
- cosine_accuracy@5
- cosine_accuracy@10
- cosine_precision@1
- cosine_precision@3
- cosine_precision@5
- cosine_precision@10
- cosine_recall@1
- cosine_recall@3
- cosine_recall@5
- cosine_recall@10
- cosine_ndcg@10
- cosine_mrr@10
- cosine_map@100
- dot_accuracy@1
- dot_accuracy@3
- dot_accuracy@5
- dot_accuracy@10
- dot_precision@1
- dot_precision@3
- dot_precision@5
- dot_precision@10
- dot_recall@1
- dot_recall@3
- dot_recall@5
- dot_recall@10
- dot_ndcg@10
- dot_mrr@10
- dot_map@100
pipeline_tag: sentence-similarity
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:246
- loss:MultipleNegativesRankingLoss
widget:
- source_sentence: What is the time now?
sentences:
- Signs of COVID-19 infection
- Signs indicating anxiety disorder
- What's the time?
- source_sentence: What is the largest desert in the world?
sentences:
- Painter of the Mona Lisa
- Name of the biggest desert
- Name the capital of Germany
- source_sentence: How to open a bank account in the UK?
sentences:
- Guide to opening a bank account in the UK
- Who's the writer of "To Kill a Mockingbird"?
- What are the ingredients of a pizza
- source_sentence: Can you help me with my homework?
sentences:
- I need help with my homework
- Effective ways to learn a new language
- Can you explain the process of photosynthesis?
- source_sentence: What is the best way to save money?
sentences:
- Methods for saving money efficiently
- Which city is the capital of France?
- Bitcoin price update
model-index:
- name: e5 cogcache small refined
results:
- task:
type: information-retrieval
name: Information Retrieval
dataset:
name: e5 cogcache small refined
type: e5-cogcache-small-refined
metrics:
- type: cosine_accuracy@1
value: 0.35714285714285715
name: Cosine Accuracy@1
- type: cosine_accuracy@3
value: 0.8928571428571429
name: Cosine Accuracy@3
- type: cosine_accuracy@5
value: 1.0
name: Cosine Accuracy@5
- type: cosine_accuracy@10
value: 1.0
name: Cosine Accuracy@10
- type: cosine_precision@1
value: 0.35714285714285715
name: Cosine Precision@1
- type: cosine_precision@3
value: 0.29761904761904756
name: Cosine Precision@3
- type: cosine_precision@5
value: 0.20000000000000004
name: Cosine Precision@5
- type: cosine_precision@10
value: 0.10000000000000002
name: Cosine Precision@10
- type: cosine_recall@1
value: 0.35714285714285715
name: Cosine Recall@1
- type: cosine_recall@3
value: 0.8928571428571429
name: Cosine Recall@3
- type: cosine_recall@5
value: 1.0
name: Cosine Recall@5
- type: cosine_recall@10
value: 1.0
name: Cosine Recall@10
- type: cosine_ndcg@10
value: 0.6976351587432169
name: Cosine Ndcg@10
- type: cosine_mrr@10
value: 0.5964285714285715
name: Cosine Mrr@10
- type: cosine_map@100
value: 0.5964285714285714
name: Cosine Map@100
- type: dot_accuracy@1
value: 0.35714285714285715
name: Dot Accuracy@1
- type: dot_accuracy@3
value: 0.8928571428571429
name: Dot Accuracy@3
- type: dot_accuracy@5
value: 1.0
name: Dot Accuracy@5
- type: dot_accuracy@10
value: 1.0
name: Dot Accuracy@10
- type: dot_precision@1
value: 0.35714285714285715
name: Dot Precision@1
- type: dot_precision@3
value: 0.29761904761904756
name: Dot Precision@3
- type: dot_precision@5
value: 0.20000000000000004
name: Dot Precision@5
- type: dot_precision@10
value: 0.10000000000000002
name: Dot Precision@10
- type: dot_recall@1
value: 0.35714285714285715
name: Dot Recall@1
- type: dot_recall@3
value: 0.8928571428571429
name: Dot Recall@3
- type: dot_recall@5
value: 1.0
name: Dot Recall@5
- type: dot_recall@10
value: 1.0
name: Dot Recall@10
- type: dot_ndcg@10
value: 0.6976351587432169
name: Dot Ndcg@10
- type: dot_mrr@10
value: 0.5964285714285715
name: Dot Mrr@10
- type: dot_map@100
value: 0.5964285714285714
name: Dot Map@100
- type: cosine_accuracy@1
value: 0.39285714285714285
name: Cosine Accuracy@1
- type: cosine_accuracy@3
value: 0.8571428571428571
name: Cosine Accuracy@3
- type: cosine_accuracy@5
value: 1.0
name: Cosine Accuracy@5
- type: cosine_accuracy@10
value: 1.0
name: Cosine Accuracy@10
- type: cosine_precision@1
value: 0.39285714285714285
name: Cosine Precision@1
- type: cosine_precision@3
value: 0.28571428571428564
name: Cosine Precision@3
- type: cosine_precision@5
value: 0.20000000000000004
name: Cosine Precision@5
- type: cosine_precision@10
value: 0.10000000000000002
name: Cosine Precision@10
- type: cosine_recall@1
value: 0.39285714285714285
name: Cosine Recall@1
- type: cosine_recall@3
value: 0.8571428571428571
name: Cosine Recall@3
- type: cosine_recall@5
value: 1.0
name: Cosine Recall@5
- type: cosine_recall@10
value: 1.0
name: Cosine Recall@10
- type: cosine_ndcg@10
value: 0.7176925270162473
name: Cosine Ndcg@10
- type: cosine_mrr@10
value: 0.6232142857142857
name: Cosine Mrr@10
- type: cosine_map@100
value: 0.6232142857142857
name: Cosine Map@100
- type: dot_accuracy@1
value: 0.39285714285714285
name: Dot Accuracy@1
- type: dot_accuracy@3
value: 0.8571428571428571
name: Dot Accuracy@3
- type: dot_accuracy@5
value: 1.0
name: Dot Accuracy@5
- type: dot_accuracy@10
value: 1.0
name: Dot Accuracy@10
- type: dot_precision@1
value: 0.39285714285714285
name: Dot Precision@1
- type: dot_precision@3
value: 0.28571428571428564
name: Dot Precision@3
- type: dot_precision@5
value: 0.20000000000000004
name: Dot Precision@5
- type: dot_precision@10
value: 0.10000000000000002
name: Dot Precision@10
- type: dot_recall@1
value: 0.39285714285714285
name: Dot Recall@1
- type: dot_recall@3
value: 0.8571428571428571
name: Dot Recall@3
- type: dot_recall@5
value: 1.0
name: Dot Recall@5
- type: dot_recall@10
value: 1.0
name: Dot Recall@10
- type: dot_ndcg@10
value: 0.7176925270162473
name: Dot Ndcg@10
- type: dot_mrr@10
value: 0.6232142857142857
name: Dot Mrr@10
- type: dot_map@100
value: 0.6232142857142857
name: Dot Map@100
---
# e5 cogcache small refined
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [srikarvar/e5-cogcache-small](https://huggingface.co/srikarvar/e5-cogcache-small). It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
## Model Details
### Model Description
- **Model Type:** Sentence Transformer
- **Base model:** [srikarvar/e5-cogcache-small](https://huggingface.co/srikarvar/e5-cogcache-small)
- **Maximum Sequence Length:** 512 tokens
- **Output Dimensionality:** 384 tokens
- **Similarity Function:** Cosine Similarity
- **Language:** en
- **License:** apache-2.0
### Model Sources
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
### Full Model Architecture
```
SentenceTransformer(
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
(1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
(2): Normalize()
)
```
## Usage
### Direct Usage (Sentence Transformers)
First install the Sentence Transformers library:
```bash
pip install -U sentence-transformers
```
Then you can load this model and run inference.
```python
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("srikarvar/e5-cogcache-small-refined")
# Run inference
sentences = [
'What is the best way to save money?',
'Methods for saving money efficiently',
'Which city is the capital of France?',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
```
## Evaluation
### Metrics
#### Information Retrieval
* Dataset: `e5-cogcache-small-refined`
* Evaluated with [InformationRetrievalEvaluator
](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
| Metric | Value |
|:--------------------|:-----------|
| cosine_accuracy@1 | 0.3571 |
| cosine_accuracy@3 | 0.8929 |
| cosine_accuracy@5 | 1.0 |
| cosine_accuracy@10 | 1.0 |
| cosine_precision@1 | 0.3571 |
| cosine_precision@3 | 0.2976 |
| cosine_precision@5 | 0.2 |
| cosine_precision@10 | 0.1 |
| cosine_recall@1 | 0.3571 |
| cosine_recall@3 | 0.8929 |
| cosine_recall@5 | 1.0 |
| cosine_recall@10 | 1.0 |
| cosine_ndcg@10 | 0.6976 |
| cosine_mrr@10 | 0.5964 |
| **cosine_map@100** | **0.5964** |
| dot_accuracy@1 | 0.3571 |
| dot_accuracy@3 | 0.8929 |
| dot_accuracy@5 | 1.0 |
| dot_accuracy@10 | 1.0 |
| dot_precision@1 | 0.3571 |
| dot_precision@3 | 0.2976 |
| dot_precision@5 | 0.2 |
| dot_precision@10 | 0.1 |
| dot_recall@1 | 0.3571 |
| dot_recall@3 | 0.8929 |
| dot_recall@5 | 1.0 |
| dot_recall@10 | 1.0 |
| dot_ndcg@10 | 0.6976 |
| dot_mrr@10 | 0.5964 |
| dot_map@100 | 0.5964 |
#### Information Retrieval
* Dataset: `e5-cogcache-small-refined`
* Evaluated with [InformationRetrievalEvaluator
](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
| Metric | Value |
|:--------------------|:-----------|
| cosine_accuracy@1 | 0.3929 |
| cosine_accuracy@3 | 0.8571 |
| cosine_accuracy@5 | 1.0 |
| cosine_accuracy@10 | 1.0 |
| cosine_precision@1 | 0.3929 |
| cosine_precision@3 | 0.2857 |
| cosine_precision@5 | 0.2 |
| cosine_precision@10 | 0.1 |
| cosine_recall@1 | 0.3929 |
| cosine_recall@3 | 0.8571 |
| cosine_recall@5 | 1.0 |
| cosine_recall@10 | 1.0 |
| cosine_ndcg@10 | 0.7177 |
| cosine_mrr@10 | 0.6232 |
| **cosine_map@100** | **0.6232** |
| dot_accuracy@1 | 0.3929 |
| dot_accuracy@3 | 0.8571 |
| dot_accuracy@5 | 1.0 |
| dot_accuracy@10 | 1.0 |
| dot_precision@1 | 0.3929 |
| dot_precision@3 | 0.2857 |
| dot_precision@5 | 0.2 |
| dot_precision@10 | 0.1 |
| dot_recall@1 | 0.3929 |
| dot_recall@3 | 0.8571 |
| dot_recall@5 | 1.0 |
| dot_recall@10 | 1.0 |
| dot_ndcg@10 | 0.7177 |
| dot_mrr@10 | 0.6232 |
| dot_map@100 | 0.6232 |
## Training Details
### Training Dataset
#### Unnamed Dataset
* Size: 246 training samples
* Columns: anchor
and positive
* Approximate statistics based on the first 1000 samples:
| | anchor | positive |
|:--------|:---------------------------------------------------------------------------------|:--------------------------------------------------------------------------------|
| type | string | string |
| details |
How to open a bank account?
| Procedure for opening a bank account
|
| Who wrote 'Pride and Prejudice'?
| Author of 'Pride and Prejudice'
|
| What is the capital of Canada?
| Canada's capital city
|
* Loss: [MultipleNegativesRankingLoss
](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
```
### Training Hyperparameters
#### Non-Default Hyperparameters
- `eval_strategy`: steps
- `per_device_train_batch_size`: 16
- `per_device_eval_batch_size`: 16
- `num_train_epochs`: 1
- `warmup_ratio`: 0.1
- `batch_sampler`: no_duplicates
#### All Hyperparameters