Naveen20o1
commited on
Commit
•
092d1ab
1
Parent(s):
5c9c595
Add new SentenceTransformer model.
Browse files- 1_Pooling/config.json +10 -0
- README.md +518 -0
- config.json +26 -0
- config_sentence_transformers.json +10 -0
- model.safetensors +3 -0
- modules.json +20 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +37 -0
- tokenizer.json +0 -0
- tokenizer_config.json +64 -0
- vocab.txt +0 -0
1_Pooling/config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"word_embedding_dimension": 384,
|
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,518 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: []
|
3 |
+
library_name: sentence-transformers
|
4 |
+
tags:
|
5 |
+
- sentence-transformers
|
6 |
+
- sentence-similarity
|
7 |
+
- feature-extraction
|
8 |
+
- generated_from_trainer
|
9 |
+
- dataset_size:900
|
10 |
+
- loss:CoSENTLoss
|
11 |
+
base_model: sentence-transformers/all-MiniLM-L6-v2
|
12 |
+
datasets: []
|
13 |
+
metrics:
|
14 |
+
- pearson_cosine
|
15 |
+
- spearman_cosine
|
16 |
+
- pearson_manhattan
|
17 |
+
- spearman_manhattan
|
18 |
+
- pearson_euclidean
|
19 |
+
- spearman_euclidean
|
20 |
+
- pearson_dot
|
21 |
+
- spearman_dot
|
22 |
+
- pearson_max
|
23 |
+
- spearman_max
|
24 |
+
widget:
|
25 |
+
- source_sentence: display
|
26 |
+
sentences:
|
27 |
+
- Geographical
|
28 |
+
- Communication
|
29 |
+
- Artifact
|
30 |
+
- source_sentence: expense
|
31 |
+
sentences:
|
32 |
+
- Artifact
|
33 |
+
- Time
|
34 |
+
- Geographical
|
35 |
+
- source_sentence: area
|
36 |
+
sentences:
|
37 |
+
- Communication
|
38 |
+
- Organization
|
39 |
+
- Quantity
|
40 |
+
- source_sentence: test_result
|
41 |
+
sentences:
|
42 |
+
- Time
|
43 |
+
- Geographical
|
44 |
+
- Time
|
45 |
+
- source_sentence: legal_guardian
|
46 |
+
sentences:
|
47 |
+
- Artifact
|
48 |
+
- Person
|
49 |
+
- Person
|
50 |
+
pipeline_tag: sentence-similarity
|
51 |
+
model-index:
|
52 |
+
- name: SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
|
53 |
+
results:
|
54 |
+
- task:
|
55 |
+
type: semantic-similarity
|
56 |
+
name: Semantic Similarity
|
57 |
+
dataset:
|
58 |
+
name: sts dev
|
59 |
+
type: sts-dev
|
60 |
+
metrics:
|
61 |
+
- type: pearson_cosine
|
62 |
+
value: 0.8510927039014685
|
63 |
+
name: Pearson Cosine
|
64 |
+
- type: spearman_cosine
|
65 |
+
value: 0.8372741864830964
|
66 |
+
name: Spearman Cosine
|
67 |
+
- type: pearson_manhattan
|
68 |
+
value: 0.8233071371304348
|
69 |
+
name: Pearson Manhattan
|
70 |
+
- type: spearman_manhattan
|
71 |
+
value: 0.8391989547278852
|
72 |
+
name: Spearman Manhattan
|
73 |
+
- type: pearson_euclidean
|
74 |
+
value: 0.8236213734557936
|
75 |
+
name: Pearson Euclidean
|
76 |
+
- type: spearman_euclidean
|
77 |
+
value: 0.8372741864830964
|
78 |
+
name: Spearman Euclidean
|
79 |
+
- type: pearson_dot
|
80 |
+
value: 0.8510927021851241
|
81 |
+
name: Pearson Dot
|
82 |
+
- type: spearman_dot
|
83 |
+
value: 0.8372741864830964
|
84 |
+
name: Spearman Dot
|
85 |
+
- type: pearson_max
|
86 |
+
value: 0.8510927039014685
|
87 |
+
name: Pearson Max
|
88 |
+
- type: spearman_max
|
89 |
+
value: 0.8391989547278852
|
90 |
+
name: Spearman Max
|
91 |
+
- task:
|
92 |
+
type: semantic-similarity
|
93 |
+
name: Semantic Similarity
|
94 |
+
dataset:
|
95 |
+
name: sts dev test
|
96 |
+
type: sts-dev_test
|
97 |
+
metrics:
|
98 |
+
- type: pearson_cosine
|
99 |
+
value: 0.8296374742898318
|
100 |
+
name: Pearson Cosine
|
101 |
+
- type: spearman_cosine
|
102 |
+
value: 0.8280786712108251
|
103 |
+
name: Spearman Cosine
|
104 |
+
- type: pearson_manhattan
|
105 |
+
value: 0.8056178202972799
|
106 |
+
name: Pearson Manhattan
|
107 |
+
- type: spearman_manhattan
|
108 |
+
value: 0.8280786712108251
|
109 |
+
name: Spearman Manhattan
|
110 |
+
- type: pearson_euclidean
|
111 |
+
value: 0.811720698434899
|
112 |
+
name: Pearson Euclidean
|
113 |
+
- type: spearman_euclidean
|
114 |
+
value: 0.8280786712108251
|
115 |
+
name: Spearman Euclidean
|
116 |
+
- type: pearson_dot
|
117 |
+
value: 0.829637493696392
|
118 |
+
name: Pearson Dot
|
119 |
+
- type: spearman_dot
|
120 |
+
value: 0.8280786712108251
|
121 |
+
name: Spearman Dot
|
122 |
+
- type: pearson_max
|
123 |
+
value: 0.829637493696392
|
124 |
+
name: Pearson Max
|
125 |
+
- type: spearman_max
|
126 |
+
value: 0.8280786712108251
|
127 |
+
name: Spearman Max
|
128 |
+
---
|
129 |
+
|
130 |
+
# SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
|
131 |
+
|
132 |
+
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 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
133 |
+
|
134 |
+
## Model Details
|
135 |
+
|
136 |
+
### Model Description
|
137 |
+
- **Model Type:** Sentence Transformer
|
138 |
+
- **Base model:** [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) <!-- at revision 8b3219a92973c328a8e22fadcfa821b5dc75636a -->
|
139 |
+
- **Maximum Sequence Length:** 256 tokens
|
140 |
+
- **Output Dimensionality:** 384 tokens
|
141 |
+
- **Similarity Function:** Cosine Similarity
|
142 |
+
<!-- - **Training Dataset:** Unknown -->
|
143 |
+
<!-- - **Language:** Unknown -->
|
144 |
+
<!-- - **License:** Unknown -->
|
145 |
+
|
146 |
+
### Model Sources
|
147 |
+
|
148 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
149 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
150 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
151 |
+
|
152 |
+
### Full Model Architecture
|
153 |
+
|
154 |
+
```
|
155 |
+
SentenceTransformer(
|
156 |
+
(0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: BertModel
|
157 |
+
(1): Pooling({'word_embedding_dimension': 384, '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})
|
158 |
+
(2): Normalize()
|
159 |
+
)
|
160 |
+
```
|
161 |
+
|
162 |
+
## Usage
|
163 |
+
|
164 |
+
### Direct Usage (Sentence Transformers)
|
165 |
+
|
166 |
+
First install the Sentence Transformers library:
|
167 |
+
|
168 |
+
```bash
|
169 |
+
pip install -U sentence-transformers
|
170 |
+
```
|
171 |
+
|
172 |
+
Then you can load this model and run inference.
|
173 |
+
```python
|
174 |
+
from sentence_transformers import SentenceTransformer
|
175 |
+
|
176 |
+
# Download from the 🤗 Hub
|
177 |
+
model = SentenceTransformer("Naveen20o1/all_MiniLM_L6_nav1")
|
178 |
+
# Run inference
|
179 |
+
sentences = [
|
180 |
+
'legal_guardian',
|
181 |
+
'Person',
|
182 |
+
'Person',
|
183 |
+
]
|
184 |
+
embeddings = model.encode(sentences)
|
185 |
+
print(embeddings.shape)
|
186 |
+
# [3, 384]
|
187 |
+
|
188 |
+
# Get the similarity scores for the embeddings
|
189 |
+
similarities = model.similarity(embeddings, embeddings)
|
190 |
+
print(similarities.shape)
|
191 |
+
# [3, 3]
|
192 |
+
```
|
193 |
+
|
194 |
+
<!--
|
195 |
+
### Direct Usage (Transformers)
|
196 |
+
|
197 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
198 |
+
|
199 |
+
</details>
|
200 |
+
-->
|
201 |
+
|
202 |
+
<!--
|
203 |
+
### Downstream Usage (Sentence Transformers)
|
204 |
+
|
205 |
+
You can finetune this model on your own dataset.
|
206 |
+
|
207 |
+
<details><summary>Click to expand</summary>
|
208 |
+
|
209 |
+
</details>
|
210 |
+
-->
|
211 |
+
|
212 |
+
<!--
|
213 |
+
### Out-of-Scope Use
|
214 |
+
|
215 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
216 |
+
-->
|
217 |
+
|
218 |
+
## Evaluation
|
219 |
+
|
220 |
+
### Metrics
|
221 |
+
|
222 |
+
#### Semantic Similarity
|
223 |
+
* Dataset: `sts-dev`
|
224 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
225 |
+
|
226 |
+
| Metric | Value |
|
227 |
+
|:--------------------|:-----------|
|
228 |
+
| pearson_cosine | 0.8511 |
|
229 |
+
| **spearman_cosine** | **0.8373** |
|
230 |
+
| pearson_manhattan | 0.8233 |
|
231 |
+
| spearman_manhattan | 0.8392 |
|
232 |
+
| pearson_euclidean | 0.8236 |
|
233 |
+
| spearman_euclidean | 0.8373 |
|
234 |
+
| pearson_dot | 0.8511 |
|
235 |
+
| spearman_dot | 0.8373 |
|
236 |
+
| pearson_max | 0.8511 |
|
237 |
+
| spearman_max | 0.8392 |
|
238 |
+
|
239 |
+
#### Semantic Similarity
|
240 |
+
* Dataset: `sts-dev_test`
|
241 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
242 |
+
|
243 |
+
| Metric | Value |
|
244 |
+
|:--------------------|:-----------|
|
245 |
+
| pearson_cosine | 0.8296 |
|
246 |
+
| **spearman_cosine** | **0.8281** |
|
247 |
+
| pearson_manhattan | 0.8056 |
|
248 |
+
| spearman_manhattan | 0.8281 |
|
249 |
+
| pearson_euclidean | 0.8117 |
|
250 |
+
| spearman_euclidean | 0.8281 |
|
251 |
+
| pearson_dot | 0.8296 |
|
252 |
+
| spearman_dot | 0.8281 |
|
253 |
+
| pearson_max | 0.8296 |
|
254 |
+
| spearman_max | 0.8281 |
|
255 |
+
|
256 |
+
<!--
|
257 |
+
## Bias, Risks and Limitations
|
258 |
+
|
259 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
260 |
+
-->
|
261 |
+
|
262 |
+
<!--
|
263 |
+
### Recommendations
|
264 |
+
|
265 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
266 |
+
-->
|
267 |
+
|
268 |
+
## Training Details
|
269 |
+
|
270 |
+
### Training Dataset
|
271 |
+
|
272 |
+
#### Unnamed Dataset
|
273 |
+
|
274 |
+
|
275 |
+
* Size: 900 training samples
|
276 |
+
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
|
277 |
+
* Approximate statistics based on the first 1000 samples:
|
278 |
+
| | sentence1 | sentence2 | score |
|
279 |
+
|:--------|:--------------------------------------------------------------------------------|:-------------------------------------------------------------------------------|:---------------------------------------------------------------|
|
280 |
+
| type | string | string | float |
|
281 |
+
| details | <ul><li>min: 3 tokens</li><li>mean: 4.31 tokens</li><li>max: 7 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 3.0 tokens</li><li>max: 3 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.49</li><li>max: 1.0</li></ul> |
|
282 |
+
* Samples:
|
283 |
+
| sentence1 | sentence2 | score |
|
284 |
+
|:--------------------------------|:--------------------------|:-----------------|
|
285 |
+
| <code>reach</code> | <code>Quantity</code> | <code>1.0</code> |
|
286 |
+
| <code>manufacture_date</code> | <code>Time</code> | <code>1.0</code> |
|
287 |
+
| <code>participant_number</code> | <code>Geographical</code> | <code>0.0</code> |
|
288 |
+
* Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
|
289 |
+
```json
|
290 |
+
{
|
291 |
+
"scale": 20.0,
|
292 |
+
"similarity_fct": "pairwise_cos_sim"
|
293 |
+
}
|
294 |
+
```
|
295 |
+
|
296 |
+
### Evaluation Dataset
|
297 |
+
|
298 |
+
#### Unnamed Dataset
|
299 |
+
|
300 |
+
|
301 |
+
* Size: 60 evaluation samples
|
302 |
+
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
|
303 |
+
* Approximate statistics based on the first 1000 samples:
|
304 |
+
| | sentence1 | sentence2 | score |
|
305 |
+
|:--------|:---------------------------------------------------------------------------------|:-------------------------------------------------------------------------------|:--------------------------------------------------------------|
|
306 |
+
| type | string | string | float |
|
307 |
+
| details | <ul><li>min: 3 tokens</li><li>mean: 4.42 tokens</li><li>max: 10 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 3.0 tokens</li><li>max: 3 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.5</li><li>max: 1.0</li></ul> |
|
308 |
+
* Samples:
|
309 |
+
| sentence1 | sentence2 | score |
|
310 |
+
|:-----------------------------|:---------------------------|:-----------------|
|
311 |
+
| <code>tax_amount</code> | <code>Communication</code> | <code>0.0</code> |
|
312 |
+
| <code>territory</code> | <code>Geographical</code> | <code>1.0</code> |
|
313 |
+
| <code>employment_date</code> | <code>Geographical</code> | <code>0.0</code> |
|
314 |
+
* Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
|
315 |
+
```json
|
316 |
+
{
|
317 |
+
"scale": 20.0,
|
318 |
+
"similarity_fct": "pairwise_cos_sim"
|
319 |
+
}
|
320 |
+
```
|
321 |
+
|
322 |
+
### Training Hyperparameters
|
323 |
+
#### Non-Default Hyperparameters
|
324 |
+
|
325 |
+
- `eval_strategy`: steps
|
326 |
+
- `per_device_train_batch_size`: 16
|
327 |
+
- `per_device_eval_batch_size`: 16
|
328 |
+
- `learning_rate`: 2e-05
|
329 |
+
- `num_train_epochs`: 11
|
330 |
+
- `warmup_ratio`: 0.1
|
331 |
+
- `fp16`: True
|
332 |
+
|
333 |
+
#### All Hyperparameters
|
334 |
+
<details><summary>Click to expand</summary>
|
335 |
+
|
336 |
+
- `overwrite_output_dir`: False
|
337 |
+
- `do_predict`: False
|
338 |
+
- `eval_strategy`: steps
|
339 |
+
- `prediction_loss_only`: True
|
340 |
+
- `per_device_train_batch_size`: 16
|
341 |
+
- `per_device_eval_batch_size`: 16
|
342 |
+
- `per_gpu_train_batch_size`: None
|
343 |
+
- `per_gpu_eval_batch_size`: None
|
344 |
+
- `gradient_accumulation_steps`: 1
|
345 |
+
- `eval_accumulation_steps`: None
|
346 |
+
- `learning_rate`: 2e-05
|
347 |
+
- `weight_decay`: 0.0
|
348 |
+
- `adam_beta1`: 0.9
|
349 |
+
- `adam_beta2`: 0.999
|
350 |
+
- `adam_epsilon`: 1e-08
|
351 |
+
- `max_grad_norm`: 1.0
|
352 |
+
- `num_train_epochs`: 11
|
353 |
+
- `max_steps`: -1
|
354 |
+
- `lr_scheduler_type`: linear
|
355 |
+
- `lr_scheduler_kwargs`: {}
|
356 |
+
- `warmup_ratio`: 0.1
|
357 |
+
- `warmup_steps`: 0
|
358 |
+
- `log_level`: passive
|
359 |
+
- `log_level_replica`: warning
|
360 |
+
- `log_on_each_node`: True
|
361 |
+
- `logging_nan_inf_filter`: True
|
362 |
+
- `save_safetensors`: True
|
363 |
+
- `save_on_each_node`: False
|
364 |
+
- `save_only_model`: False
|
365 |
+
- `restore_callback_states_from_checkpoint`: False
|
366 |
+
- `no_cuda`: False
|
367 |
+
- `use_cpu`: False
|
368 |
+
- `use_mps_device`: False
|
369 |
+
- `seed`: 42
|
370 |
+
- `data_seed`: None
|
371 |
+
- `jit_mode_eval`: False
|
372 |
+
- `use_ipex`: False
|
373 |
+
- `bf16`: False
|
374 |
+
- `fp16`: True
|
375 |
+
- `fp16_opt_level`: O1
|
376 |
+
- `half_precision_backend`: auto
|
377 |
+
- `bf16_full_eval`: False
|
378 |
+
- `fp16_full_eval`: False
|
379 |
+
- `tf32`: None
|
380 |
+
- `local_rank`: 0
|
381 |
+
- `ddp_backend`: None
|
382 |
+
- `tpu_num_cores`: None
|
383 |
+
- `tpu_metrics_debug`: False
|
384 |
+
- `debug`: []
|
385 |
+
- `dataloader_drop_last`: False
|
386 |
+
- `dataloader_num_workers`: 0
|
387 |
+
- `dataloader_prefetch_factor`: None
|
388 |
+
- `past_index`: -1
|
389 |
+
- `disable_tqdm`: False
|
390 |
+
- `remove_unused_columns`: True
|
391 |
+
- `label_names`: None
|
392 |
+
- `load_best_model_at_end`: False
|
393 |
+
- `ignore_data_skip`: False
|
394 |
+
- `fsdp`: []
|
395 |
+
- `fsdp_min_num_params`: 0
|
396 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
397 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
398 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
399 |
+
- `deepspeed`: None
|
400 |
+
- `label_smoothing_factor`: 0.0
|
401 |
+
- `optim`: adamw_torch
|
402 |
+
- `optim_args`: None
|
403 |
+
- `adafactor`: False
|
404 |
+
- `group_by_length`: False
|
405 |
+
- `length_column_name`: length
|
406 |
+
- `ddp_find_unused_parameters`: None
|
407 |
+
- `ddp_bucket_cap_mb`: None
|
408 |
+
- `ddp_broadcast_buffers`: False
|
409 |
+
- `dataloader_pin_memory`: True
|
410 |
+
- `dataloader_persistent_workers`: False
|
411 |
+
- `skip_memory_metrics`: True
|
412 |
+
- `use_legacy_prediction_loop`: False
|
413 |
+
- `push_to_hub`: False
|
414 |
+
- `resume_from_checkpoint`: None
|
415 |
+
- `hub_model_id`: None
|
416 |
+
- `hub_strategy`: every_save
|
417 |
+
- `hub_private_repo`: False
|
418 |
+
- `hub_always_push`: False
|
419 |
+
- `gradient_checkpointing`: False
|
420 |
+
- `gradient_checkpointing_kwargs`: None
|
421 |
+
- `include_inputs_for_metrics`: False
|
422 |
+
- `eval_do_concat_batches`: True
|
423 |
+
- `fp16_backend`: auto
|
424 |
+
- `push_to_hub_model_id`: None
|
425 |
+
- `push_to_hub_organization`: None
|
426 |
+
- `mp_parameters`:
|
427 |
+
- `auto_find_batch_size`: False
|
428 |
+
- `full_determinism`: False
|
429 |
+
- `torchdynamo`: None
|
430 |
+
- `ray_scope`: last
|
431 |
+
- `ddp_timeout`: 1800
|
432 |
+
- `torch_compile`: False
|
433 |
+
- `torch_compile_backend`: None
|
434 |
+
- `torch_compile_mode`: None
|
435 |
+
- `dispatch_batches`: None
|
436 |
+
- `split_batches`: None
|
437 |
+
- `include_tokens_per_second`: False
|
438 |
+
- `include_num_input_tokens_seen`: False
|
439 |
+
- `neftune_noise_alpha`: None
|
440 |
+
- `optim_target_modules`: None
|
441 |
+
- `batch_eval_metrics`: False
|
442 |
+
- `batch_sampler`: batch_sampler
|
443 |
+
- `multi_dataset_batch_sampler`: proportional
|
444 |
+
|
445 |
+
</details>
|
446 |
+
|
447 |
+
### Training Logs
|
448 |
+
| Epoch | Step | Training Loss | loss | sts-dev_spearman_cosine | sts-dev_test_spearman_cosine |
|
449 |
+
|:-------:|:----:|:-------------:|:------:|:-----------------------:|:----------------------------:|
|
450 |
+
| 0.8772 | 50 | 3.4043 | - | - | - |
|
451 |
+
| 1.7544 | 100 | 1.7413 | 1.4082 | 0.8373 | - |
|
452 |
+
| 2.6316 | 150 | 0.6863 | - | - | - |
|
453 |
+
| 3.5088 | 200 | 0.4264 | 0.6584 | 0.8392 | - |
|
454 |
+
| 4.3860 | 250 | 0.0927 | - | - | - |
|
455 |
+
| 5.2632 | 300 | 0.1547 | 0.5512 | 0.8411 | - |
|
456 |
+
| 6.1404 | 350 | 0.042 | - | - | - |
|
457 |
+
| 7.0175 | 400 | 0.0422 | 0.5881 | 0.8392 | - |
|
458 |
+
| 7.8947 | 450 | 0.0484 | - | - | - |
|
459 |
+
| 8.7719 | 500 | 0.0506 | 0.6854 | 0.8353 | - |
|
460 |
+
| 9.6491 | 550 | 0.0105 | - | - | - |
|
461 |
+
| 10.5263 | 600 | 0.0039 | 0.6157 | 0.8373 | - |
|
462 |
+
| 11.0 | 627 | - | - | - | 0.8281 |
|
463 |
+
|
464 |
+
|
465 |
+
### Framework Versions
|
466 |
+
- Python: 3.10.12
|
467 |
+
- Sentence Transformers: 3.0.1
|
468 |
+
- Transformers: 4.41.2
|
469 |
+
- PyTorch: 2.3.0+cu121
|
470 |
+
- Accelerate: 0.31.0
|
471 |
+
- Datasets: 2.20.0
|
472 |
+
- Tokenizers: 0.19.1
|
473 |
+
|
474 |
+
## Citation
|
475 |
+
|
476 |
+
### BibTeX
|
477 |
+
|
478 |
+
#### Sentence Transformers
|
479 |
+
```bibtex
|
480 |
+
@inproceedings{reimers-2019-sentence-bert,
|
481 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
482 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
483 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
484 |
+
month = "11",
|
485 |
+
year = "2019",
|
486 |
+
publisher = "Association for Computational Linguistics",
|
487 |
+
url = "https://arxiv.org/abs/1908.10084",
|
488 |
+
}
|
489 |
+
```
|
490 |
+
|
491 |
+
#### CoSENTLoss
|
492 |
+
```bibtex
|
493 |
+
@online{kexuefm-8847,
|
494 |
+
title={CoSENT: A more efficient sentence vector scheme than Sentence-BERT},
|
495 |
+
author={Su Jianlin},
|
496 |
+
year={2022},
|
497 |
+
month={Jan},
|
498 |
+
url={https://kexue.fm/archives/8847},
|
499 |
+
}
|
500 |
+
```
|
501 |
+
|
502 |
+
<!--
|
503 |
+
## Glossary
|
504 |
+
|
505 |
+
*Clearly define terms in order to be accessible across audiences.*
|
506 |
+
-->
|
507 |
+
|
508 |
+
<!--
|
509 |
+
## Model Card Authors
|
510 |
+
|
511 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
512 |
+
-->
|
513 |
+
|
514 |
+
<!--
|
515 |
+
## Model Card Contact
|
516 |
+
|
517 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
518 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "sentence-transformers/all-MiniLM-L6-v2",
|
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": 384,
|
12 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 1536,
|
14 |
+
"layer_norm_eps": 1e-12,
|
15 |
+
"max_position_embeddings": 512,
|
16 |
+
"model_type": "bert",
|
17 |
+
"num_attention_heads": 12,
|
18 |
+
"num_hidden_layers": 6,
|
19 |
+
"pad_token_id": 0,
|
20 |
+
"position_embedding_type": "absolute",
|
21 |
+
"torch_dtype": "float32",
|
22 |
+
"transformers_version": "4.41.2",
|
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.0.1",
|
4 |
+
"transformers": "4.41.2",
|
5 |
+
"pytorch": "2.3.0+cu121"
|
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:9629afc57336a577d864a1d39e93b01a346a69f1cea7bd24c86df9ad6da23606
|
3 |
+
size 90864192
|
modules.json
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
{
|
15 |
+
"idx": 2,
|
16 |
+
"name": "2",
|
17 |
+
"path": "2_Normalize",
|
18 |
+
"type": "sentence_transformers.models.Normalize"
|
19 |
+
}
|
20 |
+
]
|
sentence_bert_config.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"max_seq_length": 256,
|
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,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"mask_token": "[MASK]",
|
49 |
+
"max_length": 128,
|
50 |
+
"model_max_length": 256,
|
51 |
+
"never_split": null,
|
52 |
+
"pad_to_multiple_of": null,
|
53 |
+
"pad_token": "[PAD]",
|
54 |
+
"pad_token_type_id": 0,
|
55 |
+
"padding_side": "right",
|
56 |
+
"sep_token": "[SEP]",
|
57 |
+
"stride": 0,
|
58 |
+
"strip_accents": null,
|
59 |
+
"tokenize_chinese_chars": true,
|
60 |
+
"tokenizer_class": "BertTokenizer",
|
61 |
+
"truncation_side": "right",
|
62 |
+
"truncation_strategy": "longest_first",
|
63 |
+
"unk_token": "[UNK]"
|
64 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|