Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
---
|
| 2 |
tags:
|
| 3 |
- sentence-transformers
|
|
@@ -27,40 +28,7 @@ model-index:
|
|
| 27 |
name: Spearman Cosine
|
| 28 |
---
|
| 29 |
|
| 30 |
-
#
|
| 31 |
-
|
| 32 |
-
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2). It maps sentences & paragraphs to a 32-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
| 33 |
-
|
| 34 |
-
## Model Details
|
| 35 |
-
|
| 36 |
-
### Model Description
|
| 37 |
-
- **Model Type:** Sentence Transformer
|
| 38 |
-
- **Base model:** [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) <!-- at revision c9745ed1d9f207416be6d2e6f8de32d1f16199bf -->
|
| 39 |
-
- **Maximum Sequence Length:** 128 tokens
|
| 40 |
-
- **Output Dimensionality:** 32 dimensions
|
| 41 |
-
- **Similarity Function:** Cosine Similarity
|
| 42 |
-
<!-- - **Training Dataset:** Unknown -->
|
| 43 |
-
<!-- - **Language:** Unknown -->
|
| 44 |
-
<!-- - **License:** Unknown -->
|
| 45 |
-
|
| 46 |
-
### Model Sources
|
| 47 |
-
|
| 48 |
-
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
| 49 |
-
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
| 50 |
-
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
| 51 |
-
|
| 52 |
-
### Full Model Architecture
|
| 53 |
-
|
| 54 |
-
```
|
| 55 |
-
SentenceTransformer(
|
| 56 |
-
(0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: BertModel
|
| 57 |
-
(1): Pooling({'word_embedding_dimension': 32, '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})
|
| 58 |
-
)
|
| 59 |
-
```
|
| 60 |
-
|
| 61 |
-
## Usage
|
| 62 |
-
|
| 63 |
-
### Direct Usage (Sentence Transformers)
|
| 64 |
|
| 65 |
First install the Sentence Transformers library:
|
| 66 |
|
|
@@ -95,90 +63,3 @@ print(similarities)
|
|
| 95 |
# [0.2864, 0.2265, 1.0000]])
|
| 96 |
```
|
| 97 |
|
| 98 |
-
<!--
|
| 99 |
-
### Direct Usage (Transformers)
|
| 100 |
-
|
| 101 |
-
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 102 |
-
|
| 103 |
-
</details>
|
| 104 |
-
-->
|
| 105 |
-
|
| 106 |
-
<!--
|
| 107 |
-
### Downstream Usage (Sentence Transformers)
|
| 108 |
-
|
| 109 |
-
You can finetune this model on your own dataset.
|
| 110 |
-
|
| 111 |
-
<details><summary>Click to expand</summary>
|
| 112 |
-
|
| 113 |
-
</details>
|
| 114 |
-
-->
|
| 115 |
-
|
| 116 |
-
<!--
|
| 117 |
-
### Out-of-Scope Use
|
| 118 |
-
|
| 119 |
-
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 120 |
-
-->
|
| 121 |
-
|
| 122 |
-
## Evaluation
|
| 123 |
-
|
| 124 |
-
### Metrics
|
| 125 |
-
|
| 126 |
-
#### Semantic Similarity
|
| 127 |
-
|
| 128 |
-
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
| 129 |
-
|
| 130 |
-
| Metric | Value |
|
| 131 |
-
|:--------------------|:-----------|
|
| 132 |
-
| pearson_cosine | 0.6752 |
|
| 133 |
-
| **spearman_cosine** | **0.7044** |
|
| 134 |
-
|
| 135 |
-
<!--
|
| 136 |
-
## Bias, Risks and Limitations
|
| 137 |
-
|
| 138 |
-
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 139 |
-
-->
|
| 140 |
-
|
| 141 |
-
<!--
|
| 142 |
-
### Recommendations
|
| 143 |
-
|
| 144 |
-
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 145 |
-
-->
|
| 146 |
-
|
| 147 |
-
## Training Details
|
| 148 |
-
|
| 149 |
-
### Training Logs
|
| 150 |
-
| Epoch | Step | spearman_cosine |
|
| 151 |
-
|:-----:|:----:|:---------------:|
|
| 152 |
-
| -1 | -1 | 0.7044 |
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
### Framework Versions
|
| 156 |
-
- Python: 3.10.10
|
| 157 |
-
- Sentence Transformers: 4.1.0
|
| 158 |
-
- Transformers: 4.51.3
|
| 159 |
-
- PyTorch: 2.7.0+cu128
|
| 160 |
-
- Accelerate:
|
| 161 |
-
- Datasets: 3.5.1
|
| 162 |
-
- Tokenizers: 0.21.1
|
| 163 |
-
|
| 164 |
-
## Citation
|
| 165 |
-
|
| 166 |
-
### BibTeX
|
| 167 |
-
|
| 168 |
-
<!--
|
| 169 |
-
## Glossary
|
| 170 |
-
|
| 171 |
-
*Clearly define terms in order to be accessible across audiences.*
|
| 172 |
-
-->
|
| 173 |
-
|
| 174 |
-
<!--
|
| 175 |
-
## Model Card Authors
|
| 176 |
-
|
| 177 |
-
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 178 |
-
-->
|
| 179 |
-
|
| 180 |
-
<!--
|
| 181 |
-
## Model Card Contact
|
| 182 |
-
|
| 183 |
-
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 184 |
-
-->
|
|
|
|
| 1 |
+
|
| 2 |
---
|
| 3 |
tags:
|
| 4 |
- sentence-transformers
|
|
|
|
| 28 |
name: Spearman Cosine
|
| 29 |
---
|
| 30 |
|
| 31 |
+
# Super small embedding model (only 4MB!)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
First install the Sentence Transformers library:
|
| 34 |
|
|
|
|
| 63 |
# [0.2864, 0.2265, 1.0000]])
|
| 64 |
```
|
| 65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|