Add new SentenceTransformer model
Browse files- 1_Pooling/config.json +10 -0
- README.md +501 -0
- config.json +26 -0
- config_sentence_transformers.json +10 -0
- model.safetensors +3 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +37 -0
- tokenizer.json +0 -0
- tokenizer_config.json +65 -0
- vocab.txt +0 -0
1_Pooling/config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"word_embedding_dimension": 312,
|
3 |
+
"pooling_mode_cls_token": false,
|
4 |
+
"pooling_mode_mean_tokens": true,
|
5 |
+
"pooling_mode_max_tokens": false,
|
6 |
+
"pooling_mode_mean_sqrt_len_tokens": false,
|
7 |
+
"pooling_mode_weightedmean_tokens": false,
|
8 |
+
"pooling_mode_lasttoken": false,
|
9 |
+
"include_prompt": true
|
10 |
+
}
|
README.md
ADDED
@@ -0,0 +1,501 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- sentence-transformers
|
4 |
+
- sentence-similarity
|
5 |
+
- feature-extraction
|
6 |
+
- generated_from_trainer
|
7 |
+
- dataset_size:200000
|
8 |
+
- loss:MSELoss
|
9 |
+
base_model: nreimers/TinyBERT_L-4_H-312_v2
|
10 |
+
widget:
|
11 |
+
- source_sentence: At an outdoor event in an Asian-themed area, a crowd congregates
|
12 |
+
as one person in a yellow Chinese dragon costume confronts the camera.
|
13 |
+
sentences:
|
14 |
+
- Boy dressed in blue holds a toy.
|
15 |
+
- the animal is running
|
16 |
+
- Two young asian men are squatting.
|
17 |
+
- source_sentence: A man with a shopping cart is studying the shelves in a supermarket
|
18 |
+
aisle.
|
19 |
+
sentences:
|
20 |
+
- The children are watching TV at home.
|
21 |
+
- Three young boys one is holding a camera and another is holding a green toy all
|
22 |
+
are wearing t-shirt and smiling.
|
23 |
+
- A large group of people are gathered outside of a brick building lit with spotlights.
|
24 |
+
- source_sentence: The door is open.
|
25 |
+
sentences:
|
26 |
+
- There are three men in this picture, two are on motorbikes, one of the men has
|
27 |
+
a large piece of furniture on the back of his bike, the other is about to be handed
|
28 |
+
a piece of paper by a man in a white shirt.
|
29 |
+
- People are playing music.
|
30 |
+
- A girl is using an apple laptop with her headphones in her ears.
|
31 |
+
- source_sentence: A small group of children are standing in a classroom and one of
|
32 |
+
them has a foot in a trashcan, which also has a rope leading out of it.
|
33 |
+
sentences:
|
34 |
+
- Children are swimming at the beach.
|
35 |
+
- Women are celebrating at a bar.
|
36 |
+
- Some men with jerseys are in a bar, watching a soccer match.
|
37 |
+
- source_sentence: A black dog is drinking next to a brown and white dog that is looking
|
38 |
+
at an orange ball in the lake, whilst a horse and rider passes behind.
|
39 |
+
sentences:
|
40 |
+
- There are two people running around a track in lane three and the one wearing
|
41 |
+
a blue shirt with a green thing over the eyes is just barely ahead of the guy
|
42 |
+
wearing an orange shirt and sunglasses.
|
43 |
+
- A girl is sitting
|
44 |
+
- the guy is dead
|
45 |
+
pipeline_tag: sentence-similarity
|
46 |
+
library_name: sentence-transformers
|
47 |
+
metrics:
|
48 |
+
- pearson_cosine
|
49 |
+
- spearman_cosine
|
50 |
+
- negative_mse
|
51 |
+
co2_eq_emissions:
|
52 |
+
emissions: 3.4513310599379015
|
53 |
+
energy_consumed: 0.008879118347571923
|
54 |
+
source: codecarbon
|
55 |
+
training_type: fine-tuning
|
56 |
+
on_cloud: false
|
57 |
+
cpu_model: 13th Gen Intel(R) Core(TM) i7-13700K
|
58 |
+
ram_total_size: 31.777088165283203
|
59 |
+
hours_used: 0.053
|
60 |
+
hardware_used: 1 x NVIDIA GeForce RTX 3090
|
61 |
+
model-index:
|
62 |
+
- name: SentenceTransformer based on nreimers/TinyBERT_L-4_H-312_v2
|
63 |
+
results:
|
64 |
+
- task:
|
65 |
+
type: semantic-similarity
|
66 |
+
name: Semantic Similarity
|
67 |
+
dataset:
|
68 |
+
name: sts dev
|
69 |
+
type: sts-dev
|
70 |
+
metrics:
|
71 |
+
- type: pearson_cosine
|
72 |
+
value: 0.8020427163636963
|
73 |
+
name: Pearson Cosine
|
74 |
+
- type: spearman_cosine
|
75 |
+
value: 0.8162119531251948
|
76 |
+
name: Spearman Cosine
|
77 |
+
- task:
|
78 |
+
type: knowledge-distillation
|
79 |
+
name: Knowledge Distillation
|
80 |
+
dataset:
|
81 |
+
name: Unknown
|
82 |
+
type: unknown
|
83 |
+
metrics:
|
84 |
+
- type: negative_mse
|
85 |
+
value: -50.39951801300049
|
86 |
+
name: Negative Mse
|
87 |
+
- task:
|
88 |
+
type: semantic-similarity
|
89 |
+
name: Semantic Similarity
|
90 |
+
dataset:
|
91 |
+
name: sts test
|
92 |
+
type: sts-test
|
93 |
+
metrics:
|
94 |
+
- type: pearson_cosine
|
95 |
+
value: 0.7493791518293895
|
96 |
+
name: Pearson Cosine
|
97 |
+
- type: spearman_cosine
|
98 |
+
value: 0.752488836028113
|
99 |
+
name: Spearman Cosine
|
100 |
+
---
|
101 |
+
|
102 |
+
# SentenceTransformer based on nreimers/TinyBERT_L-4_H-312_v2
|
103 |
+
|
104 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [nreimers/TinyBERT_L-4_H-312_v2](https://huggingface.co/nreimers/TinyBERT_L-4_H-312_v2). It maps sentences & paragraphs to a 312-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
105 |
+
|
106 |
+
## Model Details
|
107 |
+
|
108 |
+
### Model Description
|
109 |
+
- **Model Type:** Sentence Transformer
|
110 |
+
- **Base model:** [nreimers/TinyBERT_L-4_H-312_v2](https://huggingface.co/nreimers/TinyBERT_L-4_H-312_v2) <!-- at revision d782507ee95c6565fe5924fcd6090999055e8db6 -->
|
111 |
+
- **Maximum Sequence Length:** 512 tokens
|
112 |
+
- **Output Dimensionality:** 312 dimensions
|
113 |
+
- **Similarity Function:** Cosine Similarity
|
114 |
+
<!-- - **Training Dataset:** Unknown -->
|
115 |
+
<!-- - **Language:** Unknown -->
|
116 |
+
<!-- - **License:** Unknown -->
|
117 |
+
|
118 |
+
### Model Sources
|
119 |
+
|
120 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
121 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
122 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
123 |
+
|
124 |
+
### Full Model Architecture
|
125 |
+
|
126 |
+
```
|
127 |
+
SentenceTransformer(
|
128 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
|
129 |
+
(1): Pooling({'word_embedding_dimension': 312, '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})
|
130 |
+
)
|
131 |
+
```
|
132 |
+
|
133 |
+
## Usage
|
134 |
+
|
135 |
+
### Direct Usage (Sentence Transformers)
|
136 |
+
|
137 |
+
First install the Sentence Transformers library:
|
138 |
+
|
139 |
+
```bash
|
140 |
+
pip install -U sentence-transformers
|
141 |
+
```
|
142 |
+
|
143 |
+
Then you can load this model and run inference.
|
144 |
+
```python
|
145 |
+
from sentence_transformers import SentenceTransformer
|
146 |
+
|
147 |
+
# Download from the 🤗 Hub
|
148 |
+
model = SentenceTransformer("tomaarsen/TinyBERT_L-4_H-312_v2-distilled-from-stsb-roberta-base-v2-new")
|
149 |
+
# Run inference
|
150 |
+
sentences = [
|
151 |
+
'A black dog is drinking next to a brown and white dog that is looking at an orange ball in the lake, whilst a horse and rider passes behind.',
|
152 |
+
'There are two people running around a track in lane three and the one wearing a blue shirt with a green thing over the eyes is just barely ahead of the guy wearing an orange shirt and sunglasses.',
|
153 |
+
'the guy is dead',
|
154 |
+
]
|
155 |
+
embeddings = model.encode(sentences)
|
156 |
+
print(embeddings.shape)
|
157 |
+
# [3, 312]
|
158 |
+
|
159 |
+
# Get the similarity scores for the embeddings
|
160 |
+
similarities = model.similarity(embeddings, embeddings)
|
161 |
+
print(similarities.shape)
|
162 |
+
# [3, 3]
|
163 |
+
```
|
164 |
+
|
165 |
+
<!--
|
166 |
+
### Direct Usage (Transformers)
|
167 |
+
|
168 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
169 |
+
|
170 |
+
</details>
|
171 |
+
-->
|
172 |
+
|
173 |
+
<!--
|
174 |
+
### Downstream Usage (Sentence Transformers)
|
175 |
+
|
176 |
+
You can finetune this model on your own dataset.
|
177 |
+
|
178 |
+
<details><summary>Click to expand</summary>
|
179 |
+
|
180 |
+
</details>
|
181 |
+
-->
|
182 |
+
|
183 |
+
<!--
|
184 |
+
### Out-of-Scope Use
|
185 |
+
|
186 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
187 |
+
-->
|
188 |
+
|
189 |
+
## Evaluation
|
190 |
+
|
191 |
+
### Metrics
|
192 |
+
|
193 |
+
#### Semantic Similarity
|
194 |
+
|
195 |
+
* Datasets: `sts-dev` and `sts-test`
|
196 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
197 |
+
|
198 |
+
| Metric | sts-dev | sts-test |
|
199 |
+
|:--------------------|:-----------|:-----------|
|
200 |
+
| pearson_cosine | 0.802 | 0.7494 |
|
201 |
+
| **spearman_cosine** | **0.8162** | **0.7525** |
|
202 |
+
|
203 |
+
#### Knowledge Distillation
|
204 |
+
|
205 |
+
* Evaluated with [<code>MSEEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.MSEEvaluator)
|
206 |
+
|
207 |
+
| Metric | Value |
|
208 |
+
|:-----------------|:-------------|
|
209 |
+
| **negative_mse** | **-50.3995** |
|
210 |
+
|
211 |
+
<!--
|
212 |
+
## Bias, Risks and Limitations
|
213 |
+
|
214 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
215 |
+
-->
|
216 |
+
|
217 |
+
<!--
|
218 |
+
### Recommendations
|
219 |
+
|
220 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
221 |
+
-->
|
222 |
+
|
223 |
+
## Training Details
|
224 |
+
|
225 |
+
### Training Dataset
|
226 |
+
|
227 |
+
#### Unnamed Dataset
|
228 |
+
|
229 |
+
* Size: 200,000 training samples
|
230 |
+
* Columns: <code>sentence</code> and <code>label</code>
|
231 |
+
* Approximate statistics based on the first 1000 samples:
|
232 |
+
| | sentence | label |
|
233 |
+
|:--------|:----------------------------------------------------------------------------------|:-------------------------------------|
|
234 |
+
| type | string | list |
|
235 |
+
| details | <ul><li>min: 4 tokens</li><li>mean: 12.24 tokens</li><li>max: 52 tokens</li></ul> | <ul><li>size: 312 elements</li></ul> |
|
236 |
+
* Samples:
|
237 |
+
| sentence | label |
|
238 |
+
|:---------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------|
|
239 |
+
| <code>A person on a horse jumps over a broken down airplane.</code> | <code>[-0.05779948830604553, 0.7306336760520935, -2.7011518478393555, 1.7303822040557861, 1.379652500152588, ...]</code> |
|
240 |
+
| <code>Children smiling and waving at camera</code> | <code>[-2.939552068710327, 2.887307643890381, 7.378897666931152, 5.352669715881348, -2.55843448638916, ...]</code> |
|
241 |
+
| <code>A boy is jumping on skateboard in the middle of a red bridge.</code> | <code>[2.7139971256256104, 3.2107176780700684, 1.0811409950256348, 6.389298439025879, -0.5123305320739746, ...]</code> |
|
242 |
+
* Loss: [<code>MSELoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#mseloss)
|
243 |
+
|
244 |
+
### Evaluation Dataset
|
245 |
+
|
246 |
+
#### Unnamed Dataset
|
247 |
+
|
248 |
+
* Size: 10,000 evaluation samples
|
249 |
+
* Columns: <code>sentence</code> and <code>label</code>
|
250 |
+
* Approximate statistics based on the first 1000 samples:
|
251 |
+
| | sentence | label |
|
252 |
+
|:--------|:----------------------------------------------------------------------------------|:-------------------------------------|
|
253 |
+
| type | string | list |
|
254 |
+
| details | <ul><li>min: 5 tokens</li><li>mean: 13.23 tokens</li><li>max: 57 tokens</li></ul> | <ul><li>size: 312 elements</li></ul> |
|
255 |
+
* Samples:
|
256 |
+
| sentence | label |
|
257 |
+
|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------|
|
258 |
+
| <code>Two women are embracing while holding to go packages.</code> | <code>[-5.986438751220703, -2.4999303817749023, 2.2099857330322266, -2.048459529876709, 1.1695001125335693, ...]</code> |
|
259 |
+
| <code>Two young children in blue jerseys, one with the number 9 and one with the number 2 are standing on wooden steps in a bathroom and washing their hands in a sink.</code> | <code>[-1.8326359987258911, 0.5514901876449585, 2.561642646789551, 3.8372995853424072, -3.0104174613952637, ...]</code> |
|
260 |
+
| <code>A man selling donuts to a customer during a world exhibition event held in the city of Angeles</code> | <code>[3.0850987434387207, 3.353701591491699, -0.2763029932975769, -2.3397164344787598, 3.109376907348633, ...]</code> |
|
261 |
+
* Loss: [<code>MSELoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#mseloss)
|
262 |
+
|
263 |
+
### Training Hyperparameters
|
264 |
+
#### Non-Default Hyperparameters
|
265 |
+
|
266 |
+
- `eval_strategy`: steps
|
267 |
+
- `per_device_train_batch_size`: 64
|
268 |
+
- `per_device_eval_batch_size`: 64
|
269 |
+
- `learning_rate`: 0.0001
|
270 |
+
- `num_train_epochs`: 1
|
271 |
+
- `warmup_ratio`: 0.1
|
272 |
+
- `fp16`: True
|
273 |
+
- `load_best_model_at_end`: True
|
274 |
+
|
275 |
+
#### All Hyperparameters
|
276 |
+
<details><summary>Click to expand</summary>
|
277 |
+
|
278 |
+
- `overwrite_output_dir`: False
|
279 |
+
- `do_predict`: False
|
280 |
+
- `eval_strategy`: steps
|
281 |
+
- `prediction_loss_only`: True
|
282 |
+
- `per_device_train_batch_size`: 64
|
283 |
+
- `per_device_eval_batch_size`: 64
|
284 |
+
- `per_gpu_train_batch_size`: None
|
285 |
+
- `per_gpu_eval_batch_size`: None
|
286 |
+
- `gradient_accumulation_steps`: 1
|
287 |
+
- `eval_accumulation_steps`: None
|
288 |
+
- `torch_empty_cache_steps`: None
|
289 |
+
- `learning_rate`: 0.0001
|
290 |
+
- `weight_decay`: 0.0
|
291 |
+
- `adam_beta1`: 0.9
|
292 |
+
- `adam_beta2`: 0.999
|
293 |
+
- `adam_epsilon`: 1e-08
|
294 |
+
- `max_grad_norm`: 1.0
|
295 |
+
- `num_train_epochs`: 1
|
296 |
+
- `max_steps`: -1
|
297 |
+
- `lr_scheduler_type`: linear
|
298 |
+
- `lr_scheduler_kwargs`: {}
|
299 |
+
- `warmup_ratio`: 0.1
|
300 |
+
- `warmup_steps`: 0
|
301 |
+
- `log_level`: passive
|
302 |
+
- `log_level_replica`: warning
|
303 |
+
- `log_on_each_node`: True
|
304 |
+
- `logging_nan_inf_filter`: True
|
305 |
+
- `save_safetensors`: True
|
306 |
+
- `save_on_each_node`: False
|
307 |
+
- `save_only_model`: False
|
308 |
+
- `restore_callback_states_from_checkpoint`: False
|
309 |
+
- `no_cuda`: False
|
310 |
+
- `use_cpu`: False
|
311 |
+
- `use_mps_device`: False
|
312 |
+
- `seed`: 42
|
313 |
+
- `data_seed`: None
|
314 |
+
- `jit_mode_eval`: False
|
315 |
+
- `use_ipex`: False
|
316 |
+
- `bf16`: False
|
317 |
+
- `fp16`: True
|
318 |
+
- `fp16_opt_level`: O1
|
319 |
+
- `half_precision_backend`: auto
|
320 |
+
- `bf16_full_eval`: False
|
321 |
+
- `fp16_full_eval`: False
|
322 |
+
- `tf32`: None
|
323 |
+
- `local_rank`: 0
|
324 |
+
- `ddp_backend`: None
|
325 |
+
- `tpu_num_cores`: None
|
326 |
+
- `tpu_metrics_debug`: False
|
327 |
+
- `debug`: []
|
328 |
+
- `dataloader_drop_last`: False
|
329 |
+
- `dataloader_num_workers`: 0
|
330 |
+
- `dataloader_prefetch_factor`: None
|
331 |
+
- `past_index`: -1
|
332 |
+
- `disable_tqdm`: False
|
333 |
+
- `remove_unused_columns`: True
|
334 |
+
- `label_names`: None
|
335 |
+
- `load_best_model_at_end`: True
|
336 |
+
- `ignore_data_skip`: False
|
337 |
+
- `fsdp`: []
|
338 |
+
- `fsdp_min_num_params`: 0
|
339 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
340 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
341 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
342 |
+
- `deepspeed`: None
|
343 |
+
- `label_smoothing_factor`: 0.0
|
344 |
+
- `optim`: adamw_torch
|
345 |
+
- `optim_args`: None
|
346 |
+
- `adafactor`: False
|
347 |
+
- `group_by_length`: False
|
348 |
+
- `length_column_name`: length
|
349 |
+
- `ddp_find_unused_parameters`: None
|
350 |
+
- `ddp_bucket_cap_mb`: None
|
351 |
+
- `ddp_broadcast_buffers`: False
|
352 |
+
- `dataloader_pin_memory`: True
|
353 |
+
- `dataloader_persistent_workers`: False
|
354 |
+
- `skip_memory_metrics`: True
|
355 |
+
- `use_legacy_prediction_loop`: False
|
356 |
+
- `push_to_hub`: False
|
357 |
+
- `resume_from_checkpoint`: None
|
358 |
+
- `hub_model_id`: None
|
359 |
+
- `hub_strategy`: every_save
|
360 |
+
- `hub_private_repo`: None
|
361 |
+
- `hub_always_push`: False
|
362 |
+
- `gradient_checkpointing`: False
|
363 |
+
- `gradient_checkpointing_kwargs`: None
|
364 |
+
- `include_inputs_for_metrics`: False
|
365 |
+
- `include_for_metrics`: []
|
366 |
+
- `eval_do_concat_batches`: True
|
367 |
+
- `fp16_backend`: auto
|
368 |
+
- `push_to_hub_model_id`: None
|
369 |
+
- `push_to_hub_organization`: None
|
370 |
+
- `mp_parameters`:
|
371 |
+
- `auto_find_batch_size`: False
|
372 |
+
- `full_determinism`: False
|
373 |
+
- `torchdynamo`: None
|
374 |
+
- `ray_scope`: last
|
375 |
+
- `ddp_timeout`: 1800
|
376 |
+
- `torch_compile`: False
|
377 |
+
- `torch_compile_backend`: None
|
378 |
+
- `torch_compile_mode`: None
|
379 |
+
- `dispatch_batches`: None
|
380 |
+
- `split_batches`: None
|
381 |
+
- `include_tokens_per_second`: False
|
382 |
+
- `include_num_input_tokens_seen`: False
|
383 |
+
- `neftune_noise_alpha`: None
|
384 |
+
- `optim_target_modules`: None
|
385 |
+
- `batch_eval_metrics`: False
|
386 |
+
- `eval_on_start`: False
|
387 |
+
- `use_liger_kernel`: False
|
388 |
+
- `eval_use_gather_object`: False
|
389 |
+
- `average_tokens_across_devices`: False
|
390 |
+
- `prompts`: None
|
391 |
+
- `batch_sampler`: batch_sampler
|
392 |
+
- `multi_dataset_batch_sampler`: proportional
|
393 |
+
|
394 |
+
</details>
|
395 |
+
|
396 |
+
### Training Logs
|
397 |
+
| Epoch | Step | Training Loss | Validation Loss | sts-dev_spearman_cosine | negative_mse | sts-test_spearman_cosine |
|
398 |
+
|:--------:|:--------:|:-------------:|:---------------:|:-----------------------:|:------------:|:------------------------:|
|
399 |
+
| 0.032 | 100 | 0.885 | - | - | - | - |
|
400 |
+
| 0.064 | 200 | 0.7985 | - | - | - | - |
|
401 |
+
| 0.096 | 300 | 0.6881 | - | - | - | - |
|
402 |
+
| 0.128 | 400 | 0.6088 | - | - | - | - |
|
403 |
+
| 0.16 | 500 | 0.5608 | 0.6318 | 0.7526 | -63.1827 | - |
|
404 |
+
| 0.192 | 600 | 0.5278 | - | - | - | - |
|
405 |
+
| 0.224 | 700 | 0.5031 | - | - | - | - |
|
406 |
+
| 0.256 | 800 | 0.4854 | - | - | - | - |
|
407 |
+
| 0.288 | 900 | 0.4659 | - | - | - | - |
|
408 |
+
| 0.32 | 1000 | 0.4514 | 0.5661 | 0.7928 | -56.6129 | - |
|
409 |
+
| 0.352 | 1100 | 0.4373 | - | - | - | - |
|
410 |
+
| 0.384 | 1200 | 0.427 | - | - | - | - |
|
411 |
+
| 0.416 | 1300 | 0.4181 | - | - | - | - |
|
412 |
+
| 0.448 | 1400 | 0.41 | - | - | - | - |
|
413 |
+
| 0.48 | 1500 | 0.4053 | 0.5370 | 0.8043 | -53.6980 | - |
|
414 |
+
| 0.512 | 1600 | 0.3934 | - | - | - | - |
|
415 |
+
| 0.544 | 1700 | 0.3905 | - | - | - | - |
|
416 |
+
| 0.576 | 1800 | 0.3848 | - | - | - | - |
|
417 |
+
| 0.608 | 1900 | 0.3787 | - | - | - | - |
|
418 |
+
| 0.64 | 2000 | 0.3734 | 0.5192 | 0.8099 | -51.9208 | - |
|
419 |
+
| 0.672 | 2100 | 0.3715 | - | - | - | - |
|
420 |
+
| 0.704 | 2200 | 0.3694 | - | - | - | - |
|
421 |
+
| 0.736 | 2300 | 0.3665 | - | - | - | - |
|
422 |
+
| 0.768 | 2400 | 0.3615 | - | - | - | - |
|
423 |
+
| 0.8 | 2500 | 0.3576 | 0.5101 | 0.8147 | -51.0102 | - |
|
424 |
+
| 0.832 | 2600 | 0.3547 | - | - | - | - |
|
425 |
+
| 0.864 | 2700 | 0.3542 | - | - | - | - |
|
426 |
+
| 0.896 | 2800 | 0.3521 | - | - | - | - |
|
427 |
+
| 0.928 | 2900 | 0.352 | - | - | - | - |
|
428 |
+
| **0.96** | **3000** | **0.3525** | **0.504** | **0.8162** | **-50.3995** | **-** |
|
429 |
+
| 0.992 | 3100 | 0.3491 | - | - | - | - |
|
430 |
+
| -1 | -1 | - | - | - | - | 0.7525 |
|
431 |
+
|
432 |
+
* The bold row denotes the saved checkpoint.
|
433 |
+
|
434 |
+
### Environmental Impact
|
435 |
+
Carbon emissions were measured using [CodeCarbon](https://github.com/mlco2/codecarbon).
|
436 |
+
- **Energy Consumed**: 0.009 kWh
|
437 |
+
- **Carbon Emitted**: 0.003 kg of CO2
|
438 |
+
- **Hours Used**: 0.053 hours
|
439 |
+
|
440 |
+
### Training Hardware
|
441 |
+
- **On Cloud**: No
|
442 |
+
- **GPU Model**: 1 x NVIDIA GeForce RTX 3090
|
443 |
+
- **CPU Model**: 13th Gen Intel(R) Core(TM) i7-13700K
|
444 |
+
- **RAM Size**: 31.78 GB
|
445 |
+
|
446 |
+
### Framework Versions
|
447 |
+
- Python: 3.11.6
|
448 |
+
- Sentence Transformers: 3.5.0.dev0
|
449 |
+
- Transformers: 4.49.0
|
450 |
+
- PyTorch: 2.6.0+cu124
|
451 |
+
- Accelerate: 1.5.1
|
452 |
+
- Datasets: 3.3.2
|
453 |
+
- Tokenizers: 0.21.0
|
454 |
+
|
455 |
+
## Citation
|
456 |
+
|
457 |
+
### BibTeX
|
458 |
+
|
459 |
+
#### Sentence Transformers
|
460 |
+
```bibtex
|
461 |
+
@inproceedings{reimers-2019-sentence-bert,
|
462 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
463 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
464 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
465 |
+
month = "11",
|
466 |
+
year = "2019",
|
467 |
+
publisher = "Association for Computational Linguistics",
|
468 |
+
url = "https://arxiv.org/abs/1908.10084",
|
469 |
+
}
|
470 |
+
```
|
471 |
+
|
472 |
+
#### MSELoss
|
473 |
+
```bibtex
|
474 |
+
@inproceedings{reimers-2020-multilingual-sentence-bert,
|
475 |
+
title = "Making Monolingual Sentence Embeddings Multilingual using Knowledge Distillation",
|
476 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
477 |
+
booktitle = "Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing",
|
478 |
+
month = "11",
|
479 |
+
year = "2020",
|
480 |
+
publisher = "Association for Computational Linguistics",
|
481 |
+
url = "https://arxiv.org/abs/2004.09813",
|
482 |
+
}
|
483 |
+
```
|
484 |
+
|
485 |
+
<!--
|
486 |
+
## Glossary
|
487 |
+
|
488 |
+
*Clearly define terms in order to be accessible across audiences.*
|
489 |
+
-->
|
490 |
+
|
491 |
+
<!--
|
492 |
+
## Model Card Authors
|
493 |
+
|
494 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
495 |
+
-->
|
496 |
+
|
497 |
+
<!--
|
498 |
+
## Model Card Contact
|
499 |
+
|
500 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
501 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "output/model-distillation-2025-03-21_12-55-56/final",
|
3 |
+
"architectures": [
|
4 |
+
"BertModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"gradient_checkpointing": false,
|
9 |
+
"hidden_act": "gelu",
|
10 |
+
"hidden_dropout_prob": 0.1,
|
11 |
+
"hidden_size": 312,
|
12 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 1200,
|
14 |
+
"layer_norm_eps": 1e-12,
|
15 |
+
"max_position_embeddings": 512,
|
16 |
+
"model_type": "bert",
|
17 |
+
"num_attention_heads": 12,
|
18 |
+
"num_hidden_layers": 4,
|
19 |
+
"pad_token_id": 0,
|
20 |
+
"position_embedding_type": "absolute",
|
21 |
+
"torch_dtype": "float32",
|
22 |
+
"transformers_version": "4.49.0",
|
23 |
+
"type_vocab_size": 2,
|
24 |
+
"use_cache": true,
|
25 |
+
"vocab_size": 30522
|
26 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "3.5.0.dev0",
|
4 |
+
"transformers": "4.49.0",
|
5 |
+
"pytorch": "2.6.0+cu124"
|
6 |
+
},
|
7 |
+
"prompts": {},
|
8 |
+
"default_prompt_name": null,
|
9 |
+
"similarity_fn_name": "cosine"
|
10 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:167725f9c083a0a0765eaa73d04e8f3ded884be89672fcbbe5482db9c1d1ea33
|
3 |
+
size 57408776
|
modules.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[
|
2 |
+
{
|
3 |
+
"idx": 0,
|
4 |
+
"name": "0",
|
5 |
+
"path": "",
|
6 |
+
"type": "sentence_transformers.models.Transformer"
|
7 |
+
},
|
8 |
+
{
|
9 |
+
"idx": 1,
|
10 |
+
"name": "1",
|
11 |
+
"path": "1_Pooling",
|
12 |
+
"type": "sentence_transformers.models.Pooling"
|
13 |
+
}
|
14 |
+
]
|
sentence_bert_config.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"max_seq_length": 512,
|
3 |
+
"do_lower_case": false
|
4 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": {
|
3 |
+
"content": "[CLS]",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"mask_token": {
|
10 |
+
"content": "[MASK]",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": {
|
17 |
+
"content": "[PAD]",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"sep_token": {
|
24 |
+
"content": "[SEP]",
|
25 |
+
"lstrip": false,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
},
|
30 |
+
"unk_token": {
|
31 |
+
"content": "[UNK]",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": false,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
}
|
37 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "[PAD]",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"100": {
|
12 |
+
"content": "[UNK]",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"101": {
|
20 |
+
"content": "[CLS]",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"102": {
|
28 |
+
"content": "[SEP]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"103": {
|
36 |
+
"content": "[MASK]",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
}
|
43 |
+
},
|
44 |
+
"clean_up_tokenization_spaces": true,
|
45 |
+
"cls_token": "[CLS]",
|
46 |
+
"do_basic_tokenize": true,
|
47 |
+
"do_lower_case": true,
|
48 |
+
"extra_special_tokens": {},
|
49 |
+
"mask_token": "[MASK]",
|
50 |
+
"max_length": 512,
|
51 |
+
"model_max_length": 512,
|
52 |
+
"never_split": null,
|
53 |
+
"pad_to_multiple_of": null,
|
54 |
+
"pad_token": "[PAD]",
|
55 |
+
"pad_token_type_id": 0,
|
56 |
+
"padding_side": "right",
|
57 |
+
"sep_token": "[SEP]",
|
58 |
+
"stride": 0,
|
59 |
+
"strip_accents": null,
|
60 |
+
"tokenize_chinese_chars": true,
|
61 |
+
"tokenizer_class": "BertTokenizer",
|
62 |
+
"truncation_side": "right",
|
63 |
+
"truncation_strategy": "longest_first",
|
64 |
+
"unk_token": "[UNK]"
|
65 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|