---
language:
- en
license: apache-2.0
tags:
- sentence-transformers
- sparse-encoder
- sparse
- splade
- generated_from_trainer
- dataset_size:99000
- loss:SpladeLoss
- loss:SparseDistillKLDivLoss
- loss:FlopsLoss
base_model: Luyu/co-condenser-marco
widget:
- text: 'The ejection fraction may decrease if: 1 You have weakness of your heart
muscle, such as dilated cardiomyopathy, which can be caused by a heart muscle
problem, familial (genetic) cardiomyopathy, or systemic illnesses. 2 A heart
attack has damaged your heart. You have problems with your heart''s valves.'
- text: "One thing we avoided: Lots of alternative slime recipes swap Borax for liquid\
\ starch, shampoo, body wash, hand soap, contact lens solution, or laundry detergent.\
\ Those may seem benign â\x80\x94 and they might be â\x80\x94 but many of them\
\ contain derivatives or relatives of sodium borate too."
- text: how do i get my mvr in pa
- text: English is a language whose vocabulary is the composite of a surprising range
of influences. We have pillaged words from Latin, Greek, Dutch, Arabic, Old Norse,
Spanish, Italian, Hindi, and more besides to make English what it is today.
- text: Weed Eater was a string trimmer company founded in 1971 in Houston, Texas
by George C. Ballas, Sr. , the inventor of the device. The idea for the Weed Eater
trimmer came to him from the spinning nylon bristles of an automatic car wash.He
thought that he could come up with a similar technique to protect the bark on
trees that he was trimming around. His company was eventually bought by Emerson
Electric and merged with Poulan.Poulan/Weed Eater was later purchased by Electrolux,
which spun off the outdoors division as Husqvarna AB in 2006.Inventor Ballas was
the father of champion ballroom dancer Corky Ballas and the grandfather of Dancing
with the Stars dancer Mark Ballas.George Ballas died on June 25, 2011.he idea
for the Weed Eater trimmer came to him from the spinning nylon bristles of an
automatic car wash. He thought that he could come up with a similar technique
to protect the bark on trees that he was trimming around. His company was eventually
bought by Emerson Electric and merged with Poulan.
pipeline_tag: feature-extraction
library_name: sentence-transformers
metrics:
- 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
- query_active_dims
- query_sparsity_ratio
- corpus_active_dims
- corpus_sparsity_ratio
co2_eq_emissions:
emissions: 73.87900982296586
energy_consumed: 0.19006593694646762
source: codecarbon
training_type: fine-tuning
on_cloud: false
cpu_model: 13th Gen Intel(R) Core(TM) i7-13700K
ram_total_size: 31.777088165283203
hours_used: 0.531
hardware_used: 1 x NVIDIA GeForce RTX 3090
model-index:
- name: CoCondenser finetuned on MS MARCO
results:
- task:
type: sparse-information-retrieval
name: Sparse Information Retrieval
dataset:
name: NanoMSMARCO
type: NanoMSMARCO
metrics:
- type: dot_accuracy@1
value: 0.38
name: Dot Accuracy@1
- type: dot_accuracy@3
value: 0.66
name: Dot Accuracy@3
- type: dot_accuracy@5
value: 0.78
name: Dot Accuracy@5
- type: dot_accuracy@10
value: 0.84
name: Dot Accuracy@10
- type: dot_precision@1
value: 0.38
name: Dot Precision@1
- type: dot_precision@3
value: 0.22
name: Dot Precision@3
- type: dot_precision@5
value: 0.15600000000000003
name: Dot Precision@5
- type: dot_precision@10
value: 0.08399999999999999
name: Dot Precision@10
- type: dot_recall@1
value: 0.38
name: Dot Recall@1
- type: dot_recall@3
value: 0.66
name: Dot Recall@3
- type: dot_recall@5
value: 0.78
name: Dot Recall@5
- type: dot_recall@10
value: 0.84
name: Dot Recall@10
- type: dot_ndcg@10
value: 0.6078319139663582
name: Dot Ndcg@10
- type: dot_mrr@10
value: 0.5333015873015872
name: Dot Mrr@10
- type: dot_map@100
value: 0.5429181880921011
name: Dot Map@100
- type: query_active_dims
value: 24.360000610351562
name: Query Active Dims
- type: query_sparsity_ratio
value: 0.9992018871433604
name: Query Sparsity Ratio
- type: corpus_active_dims
value: 264.70611572265625
name: Corpus Active Dims
- type: corpus_sparsity_ratio
value: 0.9913273666298847
name: Corpus Sparsity Ratio
- task:
type: sparse-information-retrieval
name: Sparse Information Retrieval
dataset:
name: NanoNFCorpus
type: NanoNFCorpus
metrics:
- type: dot_accuracy@1
value: 0.48
name: Dot Accuracy@1
- type: dot_accuracy@3
value: 0.62
name: Dot Accuracy@3
- type: dot_accuracy@5
value: 0.62
name: Dot Accuracy@5
- type: dot_accuracy@10
value: 0.66
name: Dot Accuracy@10
- type: dot_precision@1
value: 0.48
name: Dot Precision@1
- type: dot_precision@3
value: 0.36666666666666664
name: Dot Precision@3
- type: dot_precision@5
value: 0.324
name: Dot Precision@5
- type: dot_precision@10
value: 0.27
name: Dot Precision@10
- type: dot_recall@1
value: 0.06223547543970161
name: Dot Recall@1
- type: dot_recall@3
value: 0.09468182448150209
name: Dot Recall@3
- type: dot_recall@5
value: 0.11080815285177574
name: Dot Recall@5
- type: dot_recall@10
value: 0.13852886366526052
name: Dot Recall@10
- type: dot_ndcg@10
value: 0.349956209575989
name: Dot Ndcg@10
- type: dot_mrr@10
value: 0.5455555555555555
name: Dot Mrr@10
- type: dot_map@100
value: 0.16563763914899593
name: Dot Map@100
- type: query_active_dims
value: 19.760000228881836
name: Query Active Dims
- type: query_sparsity_ratio
value: 0.999352598118443
name: Query Sparsity Ratio
- type: corpus_active_dims
value: 498.65423583984375
name: Corpus Active Dims
- type: corpus_sparsity_ratio
value: 0.983662465243436
name: Corpus Sparsity Ratio
- task:
type: sparse-information-retrieval
name: Sparse Information Retrieval
dataset:
name: NanoNQ
type: NanoNQ
metrics:
- type: dot_accuracy@1
value: 0.48
name: Dot Accuracy@1
- type: dot_accuracy@3
value: 0.68
name: Dot Accuracy@3
- type: dot_accuracy@5
value: 0.78
name: Dot Accuracy@5
- type: dot_accuracy@10
value: 0.86
name: Dot Accuracy@10
- type: dot_precision@1
value: 0.48
name: Dot Precision@1
- type: dot_precision@3
value: 0.2333333333333333
name: Dot Precision@3
- type: dot_precision@5
value: 0.16399999999999998
name: Dot Precision@5
- type: dot_precision@10
value: 0.092
name: Dot Precision@10
- type: dot_recall@1
value: 0.45
name: Dot Recall@1
- type: dot_recall@3
value: 0.65
name: Dot Recall@3
- type: dot_recall@5
value: 0.74
name: Dot Recall@5
- type: dot_recall@10
value: 0.82
name: Dot Recall@10
- type: dot_ndcg@10
value: 0.6400973977443337
name: Dot Ndcg@10
- type: dot_mrr@10
value: 0.5997460317460317
name: Dot Mrr@10
- type: dot_map@100
value: 0.5785145426544593
name: Dot Map@100
- type: query_active_dims
value: 27.8799991607666
name: Query Active Dims
- type: query_sparsity_ratio
value: 0.9990865605412238
name: Query Sparsity Ratio
- type: corpus_active_dims
value: 300.7279052734375
name: Corpus Active Dims
- type: corpus_sparsity_ratio
value: 0.9901471756348392
name: Corpus Sparsity Ratio
- task:
type: sparse-nano-beir
name: Sparse Nano BEIR
dataset:
name: NanoBEIR mean
type: NanoBEIR_mean
metrics:
- type: dot_accuracy@1
value: 0.4466666666666666
name: Dot Accuracy@1
- type: dot_accuracy@3
value: 0.6533333333333333
name: Dot Accuracy@3
- type: dot_accuracy@5
value: 0.7266666666666666
name: Dot Accuracy@5
- type: dot_accuracy@10
value: 0.7866666666666666
name: Dot Accuracy@10
- type: dot_precision@1
value: 0.4466666666666666
name: Dot Precision@1
- type: dot_precision@3
value: 0.2733333333333333
name: Dot Precision@3
- type: dot_precision@5
value: 0.21466666666666667
name: Dot Precision@5
- type: dot_precision@10
value: 0.14866666666666664
name: Dot Precision@10
- type: dot_recall@1
value: 0.2974118251465672
name: Dot Recall@1
- type: dot_recall@3
value: 0.4682272748271674
name: Dot Recall@3
- type: dot_recall@5
value: 0.5436027176172585
name: Dot Recall@5
- type: dot_recall@10
value: 0.5995096212217534
name: Dot Recall@10
- type: dot_ndcg@10
value: 0.5326285070955602
name: Dot Ndcg@10
- type: dot_mrr@10
value: 0.5595343915343914
name: Dot Mrr@10
- type: dot_map@100
value: 0.4290234566318521
name: Dot Map@100
- type: query_active_dims
value: 24.0
name: Query Active Dims
- type: query_sparsity_ratio
value: 0.9992136819343425
name: Query Sparsity Ratio
- type: corpus_active_dims
value: 331.6402350607146
name: Corpus Active Dims
- type: corpus_sparsity_ratio
value: 0.9891343871613684
name: Corpus Sparsity Ratio
---
# CoCondenser finetuned on MS MARCO
This is a [SPLADE Sparse Encoder](https://www.sbert.net/docs/sparse_encoder/usage/usage.html) model finetuned from [Luyu/co-condenser-marco](https://huggingface.co/Luyu/co-condenser-marco) using the [sentence-transformers](https://www.SBERT.net) library. It maps sentences & paragraphs to a 30522-dimensional sparse vector space and can be used for semantic search and sparse retrieval.
## Model Details
### Model Description
- **Model Type:** SPLADE Sparse Encoder
- **Base model:** [Luyu/co-condenser-marco](https://huggingface.co/Luyu/co-condenser-marco)
- **Maximum Sequence Length:** 512 tokens
- **Output Dimensionality:** 30522 dimensions
- **Similarity Function:** Dot Product
- **Language:** en
- **License:** apache-2.0
### Model Sources
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
- **Documentation:** [Sparse Encoder Documentation](https://www.sbert.net/docs/sparse_encoder/usage/usage.html)
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
- **Hugging Face:** [Sparse Encoders on Hugging Face](https://huggingface.co/models?library=sentence-transformers&other=sparse-encoder)
### Full Model Architecture
```
SparseEncoder(
(0): MLMTransformer({'max_seq_length': 512, 'do_lower_case': False, 'architecture': 'BertForMaskedLM'})
(1): SpladePooling({'pooling_strategy': 'max', 'activation_function': 'relu', 'word_embedding_dimension': 30522})
)
```
## 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 SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("tomaarsen/splade-cocondenser-msmarco-kldiv-minilm-temp-3-3")
# Run inference
queries = [
"who started gladiator lacrosse",
]
documents = [
'Weed Eater was a string trimmer company founded in 1971 in Houston, Texas by George C. Ballas, Sr. , the inventor of the device. The idea for the Weed Eater trimmer came to him from the spinning nylon bristles of an automatic car wash.He thought that he could come up with a similar technique to protect the bark on trees that he was trimming around. His company was eventually bought by Emerson Electric and merged with Poulan.Poulan/Weed Eater was later purchased by Electrolux, which spun off the outdoors division as Husqvarna AB in 2006.Inventor Ballas was the father of champion ballroom dancer Corky Ballas and the grandfather of Dancing with the Stars dancer Mark Ballas.George Ballas died on June 25, 2011.he idea for the Weed Eater trimmer came to him from the spinning nylon bristles of an automatic car wash. He thought that he could come up with a similar technique to protect the bark on trees that he was trimming around. His company was eventually bought by Emerson Electric and merged with Poulan.',
"The earliest types of gladiator were named after Rome's enemies of that time: the Samnite, Thracian and Gaul. The Samnite, heavily armed, elegantly helmed and probably the most popular type, was renamed Secutor and the Gaul renamed Murmillo, once these former enemies had been conquered then absorbed into Rome's Empire.",
'Summit Hill, PA. Sponsored Topics. Summit Hill is a borough in Carbon County, Pennsylvania, United States. The population was 2,974 at the 2000 census. Summit Hill is located at 40°49â\x80²39â\x80³N 75°51â\x80²57â\x80³W / 40.8275°N 75.86583°W / 40.8275; -75.86583 (40.827420, -75.865892).',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[16.1470, 27.7565, 12.2730]])
```
## Evaluation
### Metrics
#### Sparse Information Retrieval
* Datasets: `NanoMSMARCO`, `NanoNFCorpus` and `NanoNQ`
* Evaluated with [SparseInformationRetrievalEvaluator](https://sbert.net/docs/package_reference/sparse_encoder/evaluation.html#sentence_transformers.sparse_encoder.evaluation.SparseInformationRetrievalEvaluator)
| Metric | NanoMSMARCO | NanoNFCorpus | NanoNQ |
|:----------------------|:------------|:-------------|:-----------|
| dot_accuracy@1 | 0.38 | 0.48 | 0.48 |
| dot_accuracy@3 | 0.66 | 0.62 | 0.68 |
| dot_accuracy@5 | 0.78 | 0.62 | 0.78 |
| dot_accuracy@10 | 0.84 | 0.66 | 0.86 |
| dot_precision@1 | 0.38 | 0.48 | 0.48 |
| dot_precision@3 | 0.22 | 0.3667 | 0.2333 |
| dot_precision@5 | 0.156 | 0.324 | 0.164 |
| dot_precision@10 | 0.084 | 0.27 | 0.092 |
| dot_recall@1 | 0.38 | 0.0622 | 0.45 |
| dot_recall@3 | 0.66 | 0.0947 | 0.65 |
| dot_recall@5 | 0.78 | 0.1108 | 0.74 |
| dot_recall@10 | 0.84 | 0.1385 | 0.82 |
| **dot_ndcg@10** | **0.6078** | **0.35** | **0.6401** |
| dot_mrr@10 | 0.5333 | 0.5456 | 0.5997 |
| dot_map@100 | 0.5429 | 0.1656 | 0.5785 |
| query_active_dims | 24.36 | 19.76 | 27.88 |
| query_sparsity_ratio | 0.9992 | 0.9994 | 0.9991 |
| corpus_active_dims | 264.7061 | 498.6542 | 300.7279 |
| corpus_sparsity_ratio | 0.9913 | 0.9837 | 0.9901 |
#### Sparse Nano BEIR
* Dataset: `NanoBEIR_mean`
* Evaluated with [SparseNanoBEIREvaluator](https://sbert.net/docs/package_reference/sparse_encoder/evaluation.html#sentence_transformers.sparse_encoder.evaluation.SparseNanoBEIREvaluator) with these parameters:
```json
{
"dataset_names": [
"msmarco",
"nfcorpus",
"nq"
]
}
```
| Metric | Value |
|:----------------------|:-----------|
| dot_accuracy@1 | 0.4467 |
| dot_accuracy@3 | 0.6533 |
| dot_accuracy@5 | 0.7267 |
| dot_accuracy@10 | 0.7867 |
| dot_precision@1 | 0.4467 |
| dot_precision@3 | 0.2733 |
| dot_precision@5 | 0.2147 |
| dot_precision@10 | 0.1487 |
| dot_recall@1 | 0.2974 |
| dot_recall@3 | 0.4682 |
| dot_recall@5 | 0.5436 |
| dot_recall@10 | 0.5995 |
| **dot_ndcg@10** | **0.5326** |
| dot_mrr@10 | 0.5595 |
| dot_map@100 | 0.429 |
| query_active_dims | 24.0 |
| query_sparsity_ratio | 0.9992 |
| corpus_active_dims | 331.6402 |
| corpus_sparsity_ratio | 0.9891 |
## Training Details
### Training Dataset
#### Unnamed Dataset
* Size: 99,000 training samples
* Columns: query, positive, negative, and label
* Approximate statistics based on the first 1000 samples:
| | query | positive | negative | label |
|:--------|:--------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:-----------------------------------|
| type | string | string | string | list |
| details |
rtn tv network | Home Shopping Network. Home Shopping Network (HSN) is an American broadcast, basic cable and satellite television network that is owned by HSN, Inc. (NASDAQ: HSNI), which also owns catalog company Cornerstone Brands. Based in St. Petersburg, Florida, United States, the home shopping channel has former and current sister channels in several other countries. | The Public Switched Telephone Network - The public switched telephone network (PSTN) is the international network of circuit-switched telephones. Learn more about PSTN at HowStuffWorks. x | [-1.0804121494293213, -5.908488750457764] |
| how did president nixon react to the watergate investigation? | The Watergate scandal was a major political scandal that occurred in the United States during the early 1970s, following a break-in by five men at the Democratic National Committee headquarters at the Watergate office complex in Washington, D.C. on June 17, 1972, and President Richard Nixon's administration's subsequent attempt to cover up its involvement. After the five burglars were caught and the conspiracy was discovered, Watergate was investigated by the United States Congress. Meanwhile, N | The release of the tape was ordered by the Supreme Court on July 24, 1974, in a case known as United States v. Nixon. The courtâs decision was unanimous. President Nixon released the tape on August 5. It was one of three conversations he had with Haldeman six days after the Watergate break-in. The tapes prove that he ordered a cover-up of the Watergate burglary. The Smoking Gun tape reveals that Nixon ordered the FBI to abandon its investigation of the break-in. [Read moreâ¦] | [4.117279052734375, 3.191757917404175] |
| what is a summary offense in pennsylvania | We provide cost effective house arrest and electronic monitoring services to magisterial district court systems throughout Pennsylvania including York, Harrisburg, Philadelphia and Allentown.In addition, we also serve the York County, Lancaster County and Chester County.e provide cost effective house arrest and electronic monitoring services to magisterial district court systems throughout Pennsylvania including York, Harrisburg, Philadelphia and Allentown. | In order to be convicted of Simple Assault, one must cause bodily injury. To be convicted of Aggravated Assault, one must cause serious bodily injury. From my research, Pennsylvania law defines bodily injury as the impairment of physical condition or substantial pain. | [-8.954689025878906, -1.3361705541610718] |
* Loss: [SpladeLoss](https://sbert.net/docs/package_reference/sparse_encoder/losses.html#spladeloss) with these parameters:
```json
{
"loss": "SparseDistillKLDivLoss",
"lambda_corpus": 0.0005,
"lambda_query": 0.0005
}
```
### Evaluation Dataset
#### Unnamed Dataset
* Size: 1,000 evaluation samples
* Columns: query, positive, negative, and label
* Approximate statistics based on the first 1000 samples:
| | query | positive | negative | label |
|:--------|:---------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:-----------------------------------|
| type | string | string | string | list |
| details | how long to cook roast beef for | Roasting times for beef. Preheat your oven to 160°C (325°F) and use these cooking times to prepare a roast that's moist, tender and delicious. Your roast should be covered with foil for the first half of the roasting time to prevent drying the outer layer.3 to 5lb Joint 1½ to 2 hours.reheat your oven to 160°C (325°F) and use these cooking times to prepare a roast that's moist, tender and delicious. Your roast should be covered with foil for the first half of the roasting time to prevent drying the outer layer. | Estimating Cooking Time for Large Beef Roasts. If you roast at a steady 325F (160C), subtract 2 minutes or so per pound. If the roast is refrigerated just before going into the oven, add 2 or 3 minutes per pound. WARNING NOTES: Remember, the rib roast will continue to cook as it sets. | [6.501978874206543, 8.214995384216309] |
| definition of fire inspection | Learn how to do a monthly fire extinguisher inspection in your workplace. Departments must assign an individual to inspect monthly the extinguishers in or adjacent to the department's facilities.1 Read Fire Extinguisher Types and Maintenance for more information.earn how to do a monthly fire extinguisher inspection in your workplace. Departments must assign an individual to inspect monthly the extinguishers in or adjacent to the department's facilities. | reconnaissance by fire-a method of reconnaissance in which fire is placed on a suspected enemy position in order to cause the enemy to disclose his presence by moving or returning fire. reconnaissance in force-an offensive operation designed to discover or test the enemy's strength (or to obtain other information). mission undertaken to obtain, by visual observation or other detection methods, information about the activities and resources of an enemy or potential enemy, or to secure data concerning the meteorological, hydrographic, or geographic characteristics of a particular area. | [-0.38299351930618286, -0.9372650384902954] |
| how many stores does family dollar have | Property Spotlight: New Retail Center at Hamilton & Warner - Outlots Available!! Family Dollar is closing stores following a disappointing second quarter. Family Dollar Stores Inc. wonât just be cutting prices in an attempt to boost its business â itâll be closing stores as well. The Matthews, N.C.-based discount retailer plans to shutter 370 under-performing shops, according to the Charlotte Business Journal. | Glassdoor has 1,976 Family Dollar Stores reviews submitted anonymously by Family Dollar Stores employees. Read employee reviews and ratings on Glassdoor to decide if Family Dollar Stores is right for you. | [4.726407527923584, 8.284608840942383] |
* Loss: [SpladeLoss](https://sbert.net/docs/package_reference/sparse_encoder/losses.html#spladeloss) with these parameters:
```json
{
"loss": "SparseDistillKLDivLoss",
"lambda_corpus": 0.0005,
"lambda_query": 0.0005
}
```
### Training Hyperparameters
#### Non-Default Hyperparameters
- `eval_strategy`: steps
- `per_device_train_batch_size`: 16
- `per_device_eval_batch_size`: 16
- `learning_rate`: 2e-05
- `num_train_epochs`: 1
- `warmup_ratio`: 0.1
- `fp16`: True
- `batch_sampler`: no_duplicates
#### All Hyperparameters