Update README.md
Browse files
README.md
CHANGED
@@ -6,7 +6,11 @@ tags:
|
|
6 |
- feature-extraction
|
7 |
- sentence-similarity
|
8 |
- transformers
|
9 |
-
|
|
|
|
|
|
|
|
|
10 |
---
|
11 |
|
12 |
# BEE-spoke-data/mega-small-embed-syntheticSTS-16384
|
@@ -15,7 +19,16 @@ This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentence
|
|
15 |
|
16 |
<!--- Describe your model here -->
|
17 |
|
18 |
-
## Usage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed:
|
21 |
|
@@ -36,7 +49,7 @@ print(embeddings)
|
|
36 |
|
37 |
|
38 |
|
39 |
-
|
40 |
Without [sentence-transformers](https://www.SBERT.net), you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings.
|
41 |
|
42 |
```python
|
@@ -72,59 +85,22 @@ print("Sentence embeddings:")
|
|
72 |
print(sentence_embeddings)
|
73 |
```
|
74 |
|
75 |
-
|
76 |
-
|
77 |
-
## Evaluation Results
|
78 |
-
|
79 |
-
<!--- Describe how your model was evaluated -->
|
80 |
-
|
81 |
-
For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name=BEE-spoke-data/mega-small-embed-syntheticSTS-16384)
|
82 |
-
|
83 |
-
|
84 |
## Training
|
85 |
The model was trained with the parameters:
|
86 |
|
87 |
-
**DataLoader**:
|
88 |
-
|
89 |
-
`sentence_transformers.datasets.NoDuplicatesDataLoader.NoDuplicatesDataLoader` of length 8663 with parameters:
|
90 |
-
```
|
91 |
-
{'batch_size': 32}
|
92 |
-
```
|
93 |
|
94 |
**Loss**:
|
95 |
|
96 |
`sentence_transformers.losses.MatryoshkaLoss.MatryoshkaLoss` with parameters:
|
97 |
```
|
98 |
-
{'loss': '
|
99 |
```
|
100 |
|
101 |
-
|
102 |
-
```
|
103 |
-
{
|
104 |
-
"epochs": 1,
|
105 |
-
"evaluation_steps": 216,
|
106 |
-
"evaluator": "sentence_transformers.evaluation.EmbeddingSimilarityEvaluator.EmbeddingSimilarityEvaluator",
|
107 |
-
"max_grad_norm": 1,
|
108 |
-
"optimizer_class": "<class 'torch.optim.adamw.AdamW'>",
|
109 |
-
"optimizer_params": {
|
110 |
-
"lr": 2e-05
|
111 |
-
},
|
112 |
-
"scheduler": "WarmupLinear",
|
113 |
-
"steps_per_epoch": null,
|
114 |
-
"warmup_steps": 867,
|
115 |
-
"weight_decay": 0.01
|
116 |
-
}
|
117 |
-
```
|
118 |
-
|
119 |
|
120 |
-
## Full Model Architecture
|
121 |
```
|
122 |
SentenceTransformer(
|
123 |
-
(0): Transformer({'max_seq_length':
|
124 |
(1): Pooling({'word_embedding_dimension': 768, '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})
|
125 |
)
|
126 |
-
```
|
127 |
-
|
128 |
-
## Citing & Authors
|
129 |
-
|
130 |
-
<!--- Describe where people can find more information -->
|
|
|
6 |
- feature-extraction
|
7 |
- sentence-similarity
|
8 |
- transformers
|
9 |
+
license: artistic-2.0
|
10 |
+
datasets:
|
11 |
+
- pszemraj/synthetic-text-similarity
|
12 |
+
language:
|
13 |
+
- en
|
14 |
---
|
15 |
|
16 |
# BEE-spoke-data/mega-small-embed-syntheticSTS-16384
|
|
|
19 |
|
20 |
<!--- Describe your model here -->
|
21 |
|
22 |
+
## Usage
|
23 |
+
|
24 |
+
|
25 |
+
Regardless of method, you will need to have this specific fork of transformers installed unless you want to get errors related to padding:
|
26 |
+
|
27 |
+
```sh
|
28 |
+
pip install -U git+https://github.com/pszemraj/transformers.git@mega-upgrades --force-reinstall --no-deps
|
29 |
+
```
|
30 |
+
|
31 |
+
### Usage (Sentence-Transformers)
|
32 |
|
33 |
Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed:
|
34 |
|
|
|
49 |
|
50 |
|
51 |
|
52 |
+
### Usage (HuggingFace Transformers)
|
53 |
Without [sentence-transformers](https://www.SBERT.net), you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings.
|
54 |
|
55 |
```python
|
|
|
85 |
print(sentence_embeddings)
|
86 |
```
|
87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
## Training
|
89 |
The model was trained with the parameters:
|
90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
|
92 |
**Loss**:
|
93 |
|
94 |
`sentence_transformers.losses.MatryoshkaLoss.MatryoshkaLoss` with parameters:
|
95 |
```
|
96 |
+
{'loss': 'CosineSimilarityLoss', 'matryoshka_dims': [768, 512, 256, 128, 64], 'matryoshka_weights': [1, 1, 1, 1, 1], 'n_dims_per_step': -1}
|
97 |
```
|
98 |
|
99 |
+
**arch**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
|
|
|
101 |
```
|
102 |
SentenceTransformer(
|
103 |
+
(0): Transformer({'max_seq_length': 16384, 'do_lower_case': False}) with Transformer model: MegaModel
|
104 |
(1): Pooling({'word_embedding_dimension': 768, '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})
|
105 |
)
|
106 |
+
```
|
|
|
|
|
|
|
|