AnthonyPeng
commited on
Commit
•
94dffde
1
Parent(s):
efbcbf2
Add new SentenceTransformer model.
Browse files- 1_Pooling/config.json +10 -0
- README.md +449 -0
- config.json +24 -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 +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +55 -0
- vocab.txt +0 -0
1_Pooling/config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"word_embedding_dimension": 768,
|
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,449 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
tags:
|
5 |
+
- sentence-transformers
|
6 |
+
- sentence-similarity
|
7 |
+
- feature-extraction
|
8 |
+
- generated_from_trainer
|
9 |
+
- dataset_size:5749
|
10 |
+
- loss:CosineSimilarityLoss
|
11 |
+
base_model: distilbert/distilbert-base-uncased
|
12 |
+
widget:
|
13 |
+
- source_sentence: A chef is preparing some food.
|
14 |
+
sentences:
|
15 |
+
- Five birds stand on the snow.
|
16 |
+
- A chef prepared a meal.
|
17 |
+
- There is no 'still' that is not relative to some other object.
|
18 |
+
- source_sentence: A woman is adding oil on fishes.
|
19 |
+
sentences:
|
20 |
+
- Large cruise ship floating on the water.
|
21 |
+
- It refers to the maximum f-stop (which is defined as the ratio of focal length
|
22 |
+
to effective aperture diameter).
|
23 |
+
- The woman is cutting potatoes.
|
24 |
+
- source_sentence: The player shoots the winning points.
|
25 |
+
sentences:
|
26 |
+
- Minimum wage laws hurt the least skilled, least productive the most.
|
27 |
+
- The basketball player is about to score points for his team.
|
28 |
+
- Three televisions, on on the floor, the other two on a box.
|
29 |
+
- source_sentence: Stars form in star-formation regions, which itself develop from
|
30 |
+
molecular clouds.
|
31 |
+
sentences:
|
32 |
+
- Although I believe Searle is mistaken, I don't think you have found the problem.
|
33 |
+
- It may be possible for a solar system like ours to exist outside of a galaxy.
|
34 |
+
- A blond-haired child performing on the trumpet in front of a house while his younger
|
35 |
+
brother watches.
|
36 |
+
- source_sentence: While Queen may refer to both Queen regent (sovereign) or Queen
|
37 |
+
consort, the King has always been the sovereign.
|
38 |
+
sentences:
|
39 |
+
- At first, I thought this is a bit of a tricky question.
|
40 |
+
- A man plays the guitar.
|
41 |
+
- There is a very good reason not to refer to the Queen's spouse as "King" - because
|
42 |
+
they aren't the King.
|
43 |
+
datasets:
|
44 |
+
- sentence-transformers/stsb
|
45 |
+
pipeline_tag: sentence-similarity
|
46 |
+
library_name: sentence-transformers
|
47 |
+
metrics:
|
48 |
+
- pearson_cosine
|
49 |
+
- spearman_cosine
|
50 |
+
- pearson_manhattan
|
51 |
+
- spearman_manhattan
|
52 |
+
- pearson_euclidean
|
53 |
+
- spearman_euclidean
|
54 |
+
- pearson_dot
|
55 |
+
- spearman_dot
|
56 |
+
- pearson_max
|
57 |
+
- spearman_max
|
58 |
+
model-index:
|
59 |
+
- name: SentenceTransformer based on distilbert/distilbert-base-uncased
|
60 |
+
results:
|
61 |
+
- task:
|
62 |
+
type: semantic-similarity
|
63 |
+
name: Semantic Similarity
|
64 |
+
dataset:
|
65 |
+
name: sts test
|
66 |
+
type: sts-test
|
67 |
+
metrics:
|
68 |
+
- type: pearson_cosine
|
69 |
+
value: 0.8030410300406223
|
70 |
+
name: Pearson Cosine
|
71 |
+
- type: spearman_cosine
|
72 |
+
value: 0.7919852001519281
|
73 |
+
name: Spearman Cosine
|
74 |
+
- type: pearson_manhattan
|
75 |
+
value: 0.7844652264152261
|
76 |
+
name: Pearson Manhattan
|
77 |
+
- type: spearman_manhattan
|
78 |
+
value: 0.7731080752109497
|
79 |
+
name: Spearman Manhattan
|
80 |
+
- type: pearson_euclidean
|
81 |
+
value: 0.7850783107162547
|
82 |
+
name: Pearson Euclidean
|
83 |
+
- type: spearman_euclidean
|
84 |
+
value: 0.773598209415488
|
85 |
+
name: Spearman Euclidean
|
86 |
+
- type: pearson_dot
|
87 |
+
value: 0.7110638215846973
|
88 |
+
name: Pearson Dot
|
89 |
+
- type: spearman_dot
|
90 |
+
value: 0.703724781215264
|
91 |
+
name: Spearman Dot
|
92 |
+
- type: pearson_max
|
93 |
+
value: 0.8030410300406223
|
94 |
+
name: Pearson Max
|
95 |
+
- type: spearman_max
|
96 |
+
value: 0.7919852001519281
|
97 |
+
name: Spearman Max
|
98 |
+
---
|
99 |
+
|
100 |
+
# SentenceTransformer based on distilbert/distilbert-base-uncased
|
101 |
+
|
102 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [distilbert/distilbert-base-uncased](https://huggingface.co/distilbert/distilbert-base-uncased) on the [stsb](https://huggingface.co/datasets/sentence-transformers/stsb) dataset. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
103 |
+
|
104 |
+
## Model Details
|
105 |
+
|
106 |
+
### Model Description
|
107 |
+
- **Model Type:** Sentence Transformer
|
108 |
+
- **Base model:** [distilbert/distilbert-base-uncased](https://huggingface.co/distilbert/distilbert-base-uncased) <!-- at revision 12040accade4e8a0f71eabdb258fecc2e7e948be -->
|
109 |
+
- **Maximum Sequence Length:** 512 tokens
|
110 |
+
- **Output Dimensionality:** 768 tokens
|
111 |
+
- **Similarity Function:** Cosine Similarity
|
112 |
+
- **Training Dataset:**
|
113 |
+
- [stsb](https://huggingface.co/datasets/sentence-transformers/stsb)
|
114 |
+
- **Language:** en
|
115 |
+
<!-- - **License:** Unknown -->
|
116 |
+
|
117 |
+
### Model Sources
|
118 |
+
|
119 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
120 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
121 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
122 |
+
|
123 |
+
### Full Model Architecture
|
124 |
+
|
125 |
+
```
|
126 |
+
SentenceTransformer(
|
127 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: DistilBertModel
|
128 |
+
(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})
|
129 |
+
)
|
130 |
+
```
|
131 |
+
|
132 |
+
## Usage
|
133 |
+
|
134 |
+
### Direct Usage (Sentence Transformers)
|
135 |
+
|
136 |
+
First install the Sentence Transformers library:
|
137 |
+
|
138 |
+
```bash
|
139 |
+
pip install -U sentence-transformers
|
140 |
+
```
|
141 |
+
|
142 |
+
Then you can load this model and run inference.
|
143 |
+
```python
|
144 |
+
from sentence_transformers import SentenceTransformer
|
145 |
+
|
146 |
+
# Download from the 🤗 Hub
|
147 |
+
model = SentenceTransformer("AnthonyPeng/distilbert-base-uncased-sts")
|
148 |
+
# Run inference
|
149 |
+
sentences = [
|
150 |
+
'While Queen may refer to both Queen regent (sovereign) or Queen consort, the King has always been the sovereign.',
|
151 |
+
'There is a very good reason not to refer to the Queen\'s spouse as "King" - because they aren\'t the King.',
|
152 |
+
'A man plays the guitar.',
|
153 |
+
]
|
154 |
+
embeddings = model.encode(sentences)
|
155 |
+
print(embeddings.shape)
|
156 |
+
# [3, 768]
|
157 |
+
|
158 |
+
# Get the similarity scores for the embeddings
|
159 |
+
similarities = model.similarity(embeddings, embeddings)
|
160 |
+
print(similarities.shape)
|
161 |
+
# [3, 3]
|
162 |
+
```
|
163 |
+
|
164 |
+
<!--
|
165 |
+
### Direct Usage (Transformers)
|
166 |
+
|
167 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
168 |
+
|
169 |
+
</details>
|
170 |
+
-->
|
171 |
+
|
172 |
+
<!--
|
173 |
+
### Downstream Usage (Sentence Transformers)
|
174 |
+
|
175 |
+
You can finetune this model on your own dataset.
|
176 |
+
|
177 |
+
<details><summary>Click to expand</summary>
|
178 |
+
|
179 |
+
</details>
|
180 |
+
-->
|
181 |
+
|
182 |
+
<!--
|
183 |
+
### Out-of-Scope Use
|
184 |
+
|
185 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
186 |
+
-->
|
187 |
+
|
188 |
+
## Evaluation
|
189 |
+
|
190 |
+
### Metrics
|
191 |
+
|
192 |
+
#### Semantic Similarity
|
193 |
+
* Dataset: `sts-test`
|
194 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
195 |
+
|
196 |
+
| Metric | Value |
|
197 |
+
|:--------------------|:----------|
|
198 |
+
| pearson_cosine | 0.803 |
|
199 |
+
| **spearman_cosine** | **0.792** |
|
200 |
+
| pearson_manhattan | 0.7845 |
|
201 |
+
| spearman_manhattan | 0.7731 |
|
202 |
+
| pearson_euclidean | 0.7851 |
|
203 |
+
| spearman_euclidean | 0.7736 |
|
204 |
+
| pearson_dot | 0.7111 |
|
205 |
+
| spearman_dot | 0.7037 |
|
206 |
+
| pearson_max | 0.803 |
|
207 |
+
| spearman_max | 0.792 |
|
208 |
+
|
209 |
+
<!--
|
210 |
+
## Bias, Risks and Limitations
|
211 |
+
|
212 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
213 |
+
-->
|
214 |
+
|
215 |
+
<!--
|
216 |
+
### Recommendations
|
217 |
+
|
218 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
219 |
+
-->
|
220 |
+
|
221 |
+
## Training Details
|
222 |
+
|
223 |
+
### Training Dataset
|
224 |
+
|
225 |
+
#### stsb
|
226 |
+
|
227 |
+
* Dataset: [stsb](https://huggingface.co/datasets/sentence-transformers/stsb) at [ab7a5ac](https://huggingface.co/datasets/sentence-transformers/stsb/tree/ab7a5ac0e35aa22088bdcf23e7fd99b220e53308)
|
228 |
+
* Size: 5,749 training samples
|
229 |
+
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
|
230 |
+
* Approximate statistics based on the first 1000 samples:
|
231 |
+
| | sentence1 | sentence2 | score |
|
232 |
+
|:--------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------|
|
233 |
+
| type | string | string | float |
|
234 |
+
| details | <ul><li>min: 6 tokens</li><li>mean: 10.0 tokens</li><li>max: 28 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 9.95 tokens</li><li>max: 25 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.54</li><li>max: 1.0</li></ul> |
|
235 |
+
* Samples:
|
236 |
+
| sentence1 | sentence2 | score |
|
237 |
+
|:-----------------------------------------------------------|:----------------------------------------------------------------------|:------------------|
|
238 |
+
| <code>A plane is taking off.</code> | <code>An air plane is taking off.</code> | <code>1.0</code> |
|
239 |
+
| <code>A man is playing a large flute.</code> | <code>A man is playing a flute.</code> | <code>0.76</code> |
|
240 |
+
| <code>A man is spreading shreded cheese on a pizza.</code> | <code>A man is spreading shredded cheese on an uncooked pizza.</code> | <code>0.76</code> |
|
241 |
+
* Loss: [<code>CosineSimilarityLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosinesimilarityloss) with these parameters:
|
242 |
+
```json
|
243 |
+
{
|
244 |
+
"loss_fct": "torch.nn.modules.loss.MSELoss"
|
245 |
+
}
|
246 |
+
```
|
247 |
+
|
248 |
+
### Evaluation Dataset
|
249 |
+
|
250 |
+
#### stsb
|
251 |
+
|
252 |
+
* Dataset: [stsb](https://huggingface.co/datasets/sentence-transformers/stsb) at [ab7a5ac](https://huggingface.co/datasets/sentence-transformers/stsb/tree/ab7a5ac0e35aa22088bdcf23e7fd99b220e53308)
|
253 |
+
* Size: 1,500 evaluation samples
|
254 |
+
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
|
255 |
+
* Approximate statistics based on the first 1000 samples:
|
256 |
+
| | sentence1 | sentence2 | score |
|
257 |
+
|:--------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|
|
258 |
+
| type | string | string | float |
|
259 |
+
| details | <ul><li>min: 5 tokens</li><li>mean: 15.1 tokens</li><li>max: 45 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 15.11 tokens</li><li>max: 53 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.47</li><li>max: 1.0</li></ul> |
|
260 |
+
* Samples:
|
261 |
+
| sentence1 | sentence2 | score |
|
262 |
+
|:--------------------------------------------------|:------------------------------------------------------|:------------------|
|
263 |
+
| <code>A man with a hard hat is dancing.</code> | <code>A man wearing a hard hat is dancing.</code> | <code>1.0</code> |
|
264 |
+
| <code>A young child is riding a horse.</code> | <code>A child is riding a horse.</code> | <code>0.95</code> |
|
265 |
+
| <code>A man is feeding a mouse to a snake.</code> | <code>The man is feeding a mouse to the snake.</code> | <code>1.0</code> |
|
266 |
+
* Loss: [<code>CosineSimilarityLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosinesimilarityloss) with these parameters:
|
267 |
+
```json
|
268 |
+
{
|
269 |
+
"loss_fct": "torch.nn.modules.loss.MSELoss"
|
270 |
+
}
|
271 |
+
```
|
272 |
+
|
273 |
+
### Training Hyperparameters
|
274 |
+
#### Non-Default Hyperparameters
|
275 |
+
|
276 |
+
- `eval_strategy`: steps
|
277 |
+
- `per_device_train_batch_size`: 16
|
278 |
+
- `per_device_eval_batch_size`: 16
|
279 |
+
- `num_train_epochs`: 1
|
280 |
+
- `warmup_ratio`: 0.1
|
281 |
+
- `fp16`: True
|
282 |
+
|
283 |
+
#### All Hyperparameters
|
284 |
+
<details><summary>Click to expand</summary>
|
285 |
+
|
286 |
+
- `overwrite_output_dir`: False
|
287 |
+
- `do_predict`: False
|
288 |
+
- `eval_strategy`: steps
|
289 |
+
- `prediction_loss_only`: True
|
290 |
+
- `per_device_train_batch_size`: 16
|
291 |
+
- `per_device_eval_batch_size`: 16
|
292 |
+
- `per_gpu_train_batch_size`: None
|
293 |
+
- `per_gpu_eval_batch_size`: None
|
294 |
+
- `gradient_accumulation_steps`: 1
|
295 |
+
- `eval_accumulation_steps`: None
|
296 |
+
- `torch_empty_cache_steps`: None
|
297 |
+
- `learning_rate`: 5e-05
|
298 |
+
- `weight_decay`: 0.0
|
299 |
+
- `adam_beta1`: 0.9
|
300 |
+
- `adam_beta2`: 0.999
|
301 |
+
- `adam_epsilon`: 1e-08
|
302 |
+
- `max_grad_norm`: 1.0
|
303 |
+
- `num_train_epochs`: 1
|
304 |
+
- `max_steps`: -1
|
305 |
+
- `lr_scheduler_type`: linear
|
306 |
+
- `lr_scheduler_kwargs`: {}
|
307 |
+
- `warmup_ratio`: 0.1
|
308 |
+
- `warmup_steps`: 0
|
309 |
+
- `log_level`: passive
|
310 |
+
- `log_level_replica`: warning
|
311 |
+
- `log_on_each_node`: True
|
312 |
+
- `logging_nan_inf_filter`: True
|
313 |
+
- `save_safetensors`: True
|
314 |
+
- `save_on_each_node`: False
|
315 |
+
- `save_only_model`: False
|
316 |
+
- `restore_callback_states_from_checkpoint`: False
|
317 |
+
- `no_cuda`: False
|
318 |
+
- `use_cpu`: False
|
319 |
+
- `use_mps_device`: False
|
320 |
+
- `seed`: 42
|
321 |
+
- `data_seed`: None
|
322 |
+
- `jit_mode_eval`: False
|
323 |
+
- `use_ipex`: False
|
324 |
+
- `bf16`: False
|
325 |
+
- `fp16`: True
|
326 |
+
- `fp16_opt_level`: O1
|
327 |
+
- `half_precision_backend`: auto
|
328 |
+
- `bf16_full_eval`: False
|
329 |
+
- `fp16_full_eval`: False
|
330 |
+
- `tf32`: None
|
331 |
+
- `local_rank`: 0
|
332 |
+
- `ddp_backend`: None
|
333 |
+
- `tpu_num_cores`: None
|
334 |
+
- `tpu_metrics_debug`: False
|
335 |
+
- `debug`: []
|
336 |
+
- `dataloader_drop_last`: True
|
337 |
+
- `dataloader_num_workers`: 0
|
338 |
+
- `dataloader_prefetch_factor`: None
|
339 |
+
- `past_index`: -1
|
340 |
+
- `disable_tqdm`: False
|
341 |
+
- `remove_unused_columns`: True
|
342 |
+
- `label_names`: None
|
343 |
+
- `load_best_model_at_end`: False
|
344 |
+
- `ignore_data_skip`: False
|
345 |
+
- `fsdp`: []
|
346 |
+
- `fsdp_min_num_params`: 0
|
347 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
348 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
349 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
350 |
+
- `deepspeed`: None
|
351 |
+
- `label_smoothing_factor`: 0.0
|
352 |
+
- `optim`: adamw_torch
|
353 |
+
- `optim_args`: None
|
354 |
+
- `adafactor`: False
|
355 |
+
- `group_by_length`: False
|
356 |
+
- `length_column_name`: length
|
357 |
+
- `ddp_find_unused_parameters`: None
|
358 |
+
- `ddp_bucket_cap_mb`: None
|
359 |
+
- `ddp_broadcast_buffers`: False
|
360 |
+
- `dataloader_pin_memory`: True
|
361 |
+
- `dataloader_persistent_workers`: False
|
362 |
+
- `skip_memory_metrics`: True
|
363 |
+
- `use_legacy_prediction_loop`: False
|
364 |
+
- `push_to_hub`: False
|
365 |
+
- `resume_from_checkpoint`: None
|
366 |
+
- `hub_model_id`: None
|
367 |
+
- `hub_strategy`: every_save
|
368 |
+
- `hub_private_repo`: False
|
369 |
+
- `hub_always_push`: False
|
370 |
+
- `gradient_checkpointing`: False
|
371 |
+
- `gradient_checkpointing_kwargs`: None
|
372 |
+
- `include_inputs_for_metrics`: False
|
373 |
+
- `eval_do_concat_batches`: True
|
374 |
+
- `fp16_backend`: auto
|
375 |
+
- `push_to_hub_model_id`: None
|
376 |
+
- `push_to_hub_organization`: None
|
377 |
+
- `mp_parameters`:
|
378 |
+
- `auto_find_batch_size`: False
|
379 |
+
- `full_determinism`: False
|
380 |
+
- `torchdynamo`: None
|
381 |
+
- `ray_scope`: last
|
382 |
+
- `ddp_timeout`: 1800
|
383 |
+
- `torch_compile`: False
|
384 |
+
- `torch_compile_backend`: None
|
385 |
+
- `torch_compile_mode`: None
|
386 |
+
- `dispatch_batches`: None
|
387 |
+
- `split_batches`: None
|
388 |
+
- `include_tokens_per_second`: False
|
389 |
+
- `include_num_input_tokens_seen`: False
|
390 |
+
- `neftune_noise_alpha`: None
|
391 |
+
- `optim_target_modules`: None
|
392 |
+
- `batch_eval_metrics`: False
|
393 |
+
- `eval_on_start`: False
|
394 |
+
- `use_liger_kernel`: False
|
395 |
+
- `eval_use_gather_object`: False
|
396 |
+
- `batch_sampler`: batch_sampler
|
397 |
+
- `multi_dataset_batch_sampler`: proportional
|
398 |
+
|
399 |
+
</details>
|
400 |
+
|
401 |
+
### Training Logs
|
402 |
+
| Epoch | Step | sts-test_spearman_cosine |
|
403 |
+
|:-----:|:----:|:------------------------:|
|
404 |
+
| 1.0 | 89 | 0.7920 |
|
405 |
+
|
406 |
+
|
407 |
+
### Framework Versions
|
408 |
+
- Python: 3.10.15
|
409 |
+
- Sentence Transformers: 3.2.0.dev0
|
410 |
+
- Transformers: 4.45.2
|
411 |
+
- PyTorch: 2.4.1
|
412 |
+
- Accelerate: 1.0.1
|
413 |
+
- Datasets: 3.0.1
|
414 |
+
- Tokenizers: 0.20.1
|
415 |
+
|
416 |
+
## Citation
|
417 |
+
|
418 |
+
### BibTeX
|
419 |
+
|
420 |
+
#### Sentence Transformers
|
421 |
+
```bibtex
|
422 |
+
@inproceedings{reimers-2019-sentence-bert,
|
423 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
424 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
425 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
426 |
+
month = "11",
|
427 |
+
year = "2019",
|
428 |
+
publisher = "Association for Computational Linguistics",
|
429 |
+
url = "https://arxiv.org/abs/1908.10084",
|
430 |
+
}
|
431 |
+
```
|
432 |
+
|
433 |
+
<!--
|
434 |
+
## Glossary
|
435 |
+
|
436 |
+
*Clearly define terms in order to be accessible across audiences.*
|
437 |
+
-->
|
438 |
+
|
439 |
+
<!--
|
440 |
+
## Model Card Authors
|
441 |
+
|
442 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
443 |
+
-->
|
444 |
+
|
445 |
+
<!--
|
446 |
+
## Model Card Contact
|
447 |
+
|
448 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
449 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "distilbert-base-uncased",
|
3 |
+
"activation": "gelu",
|
4 |
+
"architectures": [
|
5 |
+
"DistilBertModel"
|
6 |
+
],
|
7 |
+
"attention_dropout": 0.1,
|
8 |
+
"dim": 768,
|
9 |
+
"dropout": 0.1,
|
10 |
+
"hidden_dim": 3072,
|
11 |
+
"initializer_range": 0.02,
|
12 |
+
"max_position_embeddings": 512,
|
13 |
+
"model_type": "distilbert",
|
14 |
+
"n_heads": 12,
|
15 |
+
"n_layers": 6,
|
16 |
+
"pad_token_id": 0,
|
17 |
+
"qa_dropout": 0.1,
|
18 |
+
"seq_classif_dropout": 0.2,
|
19 |
+
"sinusoidal_pos_embds": false,
|
20 |
+
"tie_weights_": true,
|
21 |
+
"torch_dtype": "float32",
|
22 |
+
"transformers_version": "4.45.2",
|
23 |
+
"vocab_size": 30522
|
24 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "3.2.0.dev0",
|
4 |
+
"transformers": "4.45.2",
|
5 |
+
"pytorch": "2.4.1"
|
6 |
+
},
|
7 |
+
"prompts": {},
|
8 |
+
"default_prompt_name": null,
|
9 |
+
"similarity_fn_name": null
|
10 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8b17fc0afa98a94908742c1525fe0746984841ac5d781f7c64c2a1765aa27b1a
|
3 |
+
size 265462608
|
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,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": "[CLS]",
|
3 |
+
"mask_token": "[MASK]",
|
4 |
+
"pad_token": "[PAD]",
|
5 |
+
"sep_token": "[SEP]",
|
6 |
+
"unk_token": "[UNK]"
|
7 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": false,
|
45 |
+
"cls_token": "[CLS]",
|
46 |
+
"do_lower_case": true,
|
47 |
+
"mask_token": "[MASK]",
|
48 |
+
"model_max_length": 512,
|
49 |
+
"pad_token": "[PAD]",
|
50 |
+
"sep_token": "[SEP]",
|
51 |
+
"strip_accents": null,
|
52 |
+
"tokenize_chinese_chars": true,
|
53 |
+
"tokenizer_class": "DistilBertTokenizer",
|
54 |
+
"unk_token": "[UNK]"
|
55 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|