Add new SentenceTransformer model.
Browse files- .gitattributes +1 -0
- 1_Pooling/config.json +10 -0
- README.md +524 -0
- config.json +28 -0
- config_sentence_transformers.json +10 -0
- model.safetensors +3 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- sentencepiece.bpe.model +3 -0
- special_tokens_map.json +51 -0
- tokenizer.json +3 -0
- tokenizer_config.json +54 -0
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
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,524 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
library_name: sentence-transformers
|
5 |
+
tags:
|
6 |
+
- sentence-transformers
|
7 |
+
- sentence-similarity
|
8 |
+
- feature-extraction
|
9 |
+
- dataset_size:100K<n<1M
|
10 |
+
- loss:CachedMultipleNegativesRankingLoss
|
11 |
+
base_model: Unbabel/xlm-roberta-comet-small
|
12 |
+
metrics:
|
13 |
+
- cosine_accuracy
|
14 |
+
- dot_accuracy
|
15 |
+
- manhattan_accuracy
|
16 |
+
- euclidean_accuracy
|
17 |
+
- max_accuracy
|
18 |
+
widget:
|
19 |
+
- source_sentence: There's a dock
|
20 |
+
sentences:
|
21 |
+
- There is a door.
|
22 |
+
- the animal is running
|
23 |
+
- The woman is singing.
|
24 |
+
- source_sentence: The boy scowls
|
25 |
+
sentences:
|
26 |
+
- A boy is blowing bubbles.
|
27 |
+
- He is playing a song.
|
28 |
+
- They are driving cars.
|
29 |
+
- source_sentence: A bird flying.
|
30 |
+
sentences:
|
31 |
+
- A butterfly flys freely.
|
32 |
+
- A dog carries a bone.
|
33 |
+
- Two dogs are playing.
|
34 |
+
- source_sentence: A woman sings.
|
35 |
+
sentences:
|
36 |
+
- The woman is singing.
|
37 |
+
- The man is in a city.
|
38 |
+
- there is a man in a pool.
|
39 |
+
- source_sentence: a baby smiling
|
40 |
+
sentences:
|
41 |
+
- A baby is unhappy.
|
42 |
+
- The dog has big ears.
|
43 |
+
- They are driving cars.
|
44 |
+
pipeline_tag: sentence-similarity
|
45 |
+
model-index:
|
46 |
+
- name: SentenceTransformer based on Unbabel/xlm-roberta-comet-small
|
47 |
+
results:
|
48 |
+
- task:
|
49 |
+
type: triplet
|
50 |
+
name: Triplet
|
51 |
+
dataset:
|
52 |
+
name: all nli dev
|
53 |
+
type: all-nli-dev
|
54 |
+
metrics:
|
55 |
+
- type: cosine_accuracy
|
56 |
+
value: 0.849
|
57 |
+
name: Cosine Accuracy
|
58 |
+
- type: dot_accuracy
|
59 |
+
value: 0.163
|
60 |
+
name: Dot Accuracy
|
61 |
+
- type: manhattan_accuracy
|
62 |
+
value: 0.837
|
63 |
+
name: Manhattan Accuracy
|
64 |
+
- type: euclidean_accuracy
|
65 |
+
value: 0.841
|
66 |
+
name: Euclidean Accuracy
|
67 |
+
- type: max_accuracy
|
68 |
+
value: 0.849
|
69 |
+
name: Max Accuracy
|
70 |
+
- task:
|
71 |
+
type: triplet
|
72 |
+
name: Triplet
|
73 |
+
dataset:
|
74 |
+
name: all nli test
|
75 |
+
type: all-nli-test
|
76 |
+
metrics:
|
77 |
+
- type: cosine_accuracy
|
78 |
+
value: 0.839
|
79 |
+
name: Cosine Accuracy
|
80 |
+
- type: dot_accuracy
|
81 |
+
value: 0.15
|
82 |
+
name: Dot Accuracy
|
83 |
+
- type: manhattan_accuracy
|
84 |
+
value: 0.827
|
85 |
+
name: Manhattan Accuracy
|
86 |
+
- type: euclidean_accuracy
|
87 |
+
value: 0.827
|
88 |
+
name: Euclidean Accuracy
|
89 |
+
- type: max_accuracy
|
90 |
+
value: 0.839
|
91 |
+
name: Max Accuracy
|
92 |
+
---
|
93 |
+
|
94 |
+
# SentenceTransformer based on Unbabel/xlm-roberta-comet-small
|
95 |
+
|
96 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Unbabel/xlm-roberta-comet-small](https://huggingface.co/Unbabel/xlm-roberta-comet-small) on the [sentence-transformers/all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) dataset. 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.
|
97 |
+
|
98 |
+
## Model Details
|
99 |
+
|
100 |
+
### Model Description
|
101 |
+
- **Model Type:** Sentence Transformer
|
102 |
+
- **Base model:** [Unbabel/xlm-roberta-comet-small](https://huggingface.co/Unbabel/xlm-roberta-comet-small) <!-- at revision df568a015df5cefbf2f449314b61ce9afb0cb593 -->
|
103 |
+
- **Maximum Sequence Length:** 512 tokens
|
104 |
+
- **Output Dimensionality:** 384 tokens
|
105 |
+
- **Similarity Function:** Cosine Similarity
|
106 |
+
- **Training Dataset:**
|
107 |
+
- [sentence-transformers/all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli)
|
108 |
+
- **Language:** en
|
109 |
+
<!-- - **License:** Unknown -->
|
110 |
+
|
111 |
+
### Model Sources
|
112 |
+
|
113 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
114 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
115 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
116 |
+
|
117 |
+
### Full Model Architecture
|
118 |
+
|
119 |
+
```
|
120 |
+
SentenceTransformer(
|
121 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: XLMRobertaModel
|
122 |
+
(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})
|
123 |
+
)
|
124 |
+
```
|
125 |
+
|
126 |
+
## Usage
|
127 |
+
|
128 |
+
### Direct Usage (Sentence Transformers)
|
129 |
+
|
130 |
+
First install the Sentence Transformers library:
|
131 |
+
|
132 |
+
```bash
|
133 |
+
pip install -U sentence-transformers
|
134 |
+
```
|
135 |
+
|
136 |
+
Then you can load this model and run inference.
|
137 |
+
```python
|
138 |
+
from sentence_transformers import SentenceTransformer
|
139 |
+
|
140 |
+
# Download from the 🤗 Hub
|
141 |
+
model = SentenceTransformer("mics-nlp/xlm-roberta-small-all-nli-triplet")
|
142 |
+
# Run inference
|
143 |
+
sentences = [
|
144 |
+
'a baby smiling',
|
145 |
+
'A baby is unhappy.',
|
146 |
+
'The dog has big ears.',
|
147 |
+
]
|
148 |
+
embeddings = model.encode(sentences)
|
149 |
+
print(embeddings.shape)
|
150 |
+
# [3, 384]
|
151 |
+
|
152 |
+
# Get the similarity scores for the embeddings
|
153 |
+
similarities = model.similarity(embeddings, embeddings)
|
154 |
+
print(similarities.shape)
|
155 |
+
# [3, 3]
|
156 |
+
```
|
157 |
+
|
158 |
+
<!--
|
159 |
+
### Direct Usage (Transformers)
|
160 |
+
|
161 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
162 |
+
|
163 |
+
</details>
|
164 |
+
-->
|
165 |
+
|
166 |
+
<!--
|
167 |
+
### Downstream Usage (Sentence Transformers)
|
168 |
+
|
169 |
+
You can finetune this model on your own dataset.
|
170 |
+
|
171 |
+
<details><summary>Click to expand</summary>
|
172 |
+
|
173 |
+
</details>
|
174 |
+
-->
|
175 |
+
|
176 |
+
<!--
|
177 |
+
### Out-of-Scope Use
|
178 |
+
|
179 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
180 |
+
-->
|
181 |
+
|
182 |
+
## Evaluation
|
183 |
+
|
184 |
+
### Metrics
|
185 |
+
|
186 |
+
#### Triplet
|
187 |
+
* Dataset: `all-nli-dev`
|
188 |
+
* Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
|
189 |
+
|
190 |
+
| Metric | Value |
|
191 |
+
|:-------------------|:----------|
|
192 |
+
| cosine_accuracy | 0.849 |
|
193 |
+
| dot_accuracy | 0.163 |
|
194 |
+
| manhattan_accuracy | 0.837 |
|
195 |
+
| euclidean_accuracy | 0.841 |
|
196 |
+
| **max_accuracy** | **0.849** |
|
197 |
+
|
198 |
+
#### Triplet
|
199 |
+
* Dataset: `all-nli-test`
|
200 |
+
* Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
|
201 |
+
|
202 |
+
| Metric | Value |
|
203 |
+
|:-------------------|:----------|
|
204 |
+
| cosine_accuracy | 0.839 |
|
205 |
+
| dot_accuracy | 0.15 |
|
206 |
+
| manhattan_accuracy | 0.827 |
|
207 |
+
| euclidean_accuracy | 0.827 |
|
208 |
+
| **max_accuracy** | **0.839** |
|
209 |
+
|
210 |
+
<!--
|
211 |
+
## Bias, Risks and Limitations
|
212 |
+
|
213 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
214 |
+
-->
|
215 |
+
|
216 |
+
<!--
|
217 |
+
### Recommendations
|
218 |
+
|
219 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
220 |
+
-->
|
221 |
+
|
222 |
+
## Training Details
|
223 |
+
|
224 |
+
### Training Dataset
|
225 |
+
|
226 |
+
#### sentence-transformers/all-nli
|
227 |
+
|
228 |
+
* Dataset: [sentence-transformers/all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) at [d482672](https://huggingface.co/datasets/sentence-transformers/all-nli/tree/d482672c8e74ce18da116f430137434ba2e52fab)
|
229 |
+
* Size: 100,000 training samples
|
230 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
231 |
+
* Approximate statistics based on the first 1000 samples:
|
232 |
+
| | anchor | positive | negative |
|
233 |
+
|:--------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
234 |
+
| type | string | string | string |
|
235 |
+
| details | <ul><li>min: 7 tokens</li><li>mean: 10.9 tokens</li><li>max: 52 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 13.62 tokens</li><li>max: 42 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 14.76 tokens</li><li>max: 55 tokens</li></ul> |
|
236 |
+
* Samples:
|
237 |
+
| anchor | positive | negative |
|
238 |
+
|:---------------------------------------------------------------------------|:-------------------------------------------------|:-----------------------------------------------------------|
|
239 |
+
| <code>A person on a horse jumps over a broken down airplane.</code> | <code>A person is outdoors, on a horse.</code> | <code>A person is at a diner, ordering an omelette.</code> |
|
240 |
+
| <code>Children smiling and waving at camera</code> | <code>There are children present</code> | <code>The kids are frowning</code> |
|
241 |
+
| <code>A boy is jumping on skateboard in the middle of a red bridge.</code> | <code>The boy does a skateboarding trick.</code> | <code>The boy skates down the sidewalk.</code> |
|
242 |
+
* Loss: [<code>CachedMultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cachedmultiplenegativesrankingloss) with these parameters:
|
243 |
+
```json
|
244 |
+
{
|
245 |
+
"scale": 20.0,
|
246 |
+
"similarity_fct": "cos_sim"
|
247 |
+
}
|
248 |
+
```
|
249 |
+
|
250 |
+
### Evaluation Dataset
|
251 |
+
|
252 |
+
#### sentence-transformers/all-nli
|
253 |
+
|
254 |
+
* Dataset: [sentence-transformers/all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) at [d482672](https://huggingface.co/datasets/sentence-transformers/all-nli/tree/d482672c8e74ce18da116f430137434ba2e52fab)
|
255 |
+
* Size: 1,000 evaluation samples
|
256 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
257 |
+
* Approximate statistics based on the first 1000 samples:
|
258 |
+
| | anchor | positive | negative |
|
259 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
260 |
+
| type | string | string | string |
|
261 |
+
| details | <ul><li>min: 6 tokens</li><li>mean: 20.31 tokens</li><li>max: 83 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 10.71 tokens</li><li>max: 35 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 11.39 tokens</li><li>max: 32 tokens</li></ul> |
|
262 |
+
* Samples:
|
263 |
+
| anchor | positive | negative |
|
264 |
+
|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------|:--------------------------------------------------------|
|
265 |
+
| <code>Two women are embracing while holding to go packages.</code> | <code>Two woman are holding packages.</code> | <code>The men are fighting outside a deli.</code> |
|
266 |
+
| <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>Two kids in numbered jerseys wash their hands.</code> | <code>Two kids in jackets walk to school.</code> |
|
267 |
+
| <code>A man selling donuts to a customer during a world exhibition event held in the city of Angeles</code> | <code>A man selling donuts to a customer.</code> | <code>A woman drinks her coffee in a small cafe.</code> |
|
268 |
+
* Loss: [<code>CachedMultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cachedmultiplenegativesrankingloss) with these parameters:
|
269 |
+
```json
|
270 |
+
{
|
271 |
+
"scale": 20.0,
|
272 |
+
"similarity_fct": "cos_sim"
|
273 |
+
}
|
274 |
+
```
|
275 |
+
|
276 |
+
### Training Hyperparameters
|
277 |
+
#### Non-Default Hyperparameters
|
278 |
+
|
279 |
+
- `eval_strategy`: steps
|
280 |
+
- `per_device_train_batch_size`: 16
|
281 |
+
- `per_device_eval_batch_size`: 16
|
282 |
+
- `num_train_epochs`: 1
|
283 |
+
- `warmup_ratio`: 0.1
|
284 |
+
- `bf16`: True
|
285 |
+
- `batch_sampler`: no_duplicates
|
286 |
+
|
287 |
+
#### All Hyperparameters
|
288 |
+
<details><summary>Click to expand</summary>
|
289 |
+
|
290 |
+
- `overwrite_output_dir`: False
|
291 |
+
- `do_predict`: False
|
292 |
+
- `eval_strategy`: steps
|
293 |
+
- `prediction_loss_only`: True
|
294 |
+
- `per_device_train_batch_size`: 16
|
295 |
+
- `per_device_eval_batch_size`: 16
|
296 |
+
- `per_gpu_train_batch_size`: None
|
297 |
+
- `per_gpu_eval_batch_size`: None
|
298 |
+
- `gradient_accumulation_steps`: 1
|
299 |
+
- `eval_accumulation_steps`: None
|
300 |
+
- `learning_rate`: 5e-05
|
301 |
+
- `weight_decay`: 0.0
|
302 |
+
- `adam_beta1`: 0.9
|
303 |
+
- `adam_beta2`: 0.999
|
304 |
+
- `adam_epsilon`: 1e-08
|
305 |
+
- `max_grad_norm`: 1.0
|
306 |
+
- `num_train_epochs`: 1
|
307 |
+
- `max_steps`: -1
|
308 |
+
- `lr_scheduler_type`: linear
|
309 |
+
- `lr_scheduler_kwargs`: {}
|
310 |
+
- `warmup_ratio`: 0.1
|
311 |
+
- `warmup_steps`: 0
|
312 |
+
- `log_level`: passive
|
313 |
+
- `log_level_replica`: warning
|
314 |
+
- `log_on_each_node`: True
|
315 |
+
- `logging_nan_inf_filter`: True
|
316 |
+
- `save_safetensors`: True
|
317 |
+
- `save_on_each_node`: False
|
318 |
+
- `save_only_model`: False
|
319 |
+
- `restore_callback_states_from_checkpoint`: False
|
320 |
+
- `no_cuda`: False
|
321 |
+
- `use_cpu`: False
|
322 |
+
- `use_mps_device`: False
|
323 |
+
- `seed`: 42
|
324 |
+
- `data_seed`: None
|
325 |
+
- `jit_mode_eval`: False
|
326 |
+
- `use_ipex`: False
|
327 |
+
- `bf16`: True
|
328 |
+
- `fp16`: False
|
329 |
+
- `fp16_opt_level`: O1
|
330 |
+
- `half_precision_backend`: auto
|
331 |
+
- `bf16_full_eval`: False
|
332 |
+
- `fp16_full_eval`: False
|
333 |
+
- `tf32`: None
|
334 |
+
- `local_rank`: 0
|
335 |
+
- `ddp_backend`: None
|
336 |
+
- `tpu_num_cores`: None
|
337 |
+
- `tpu_metrics_debug`: False
|
338 |
+
- `debug`: []
|
339 |
+
- `dataloader_drop_last`: False
|
340 |
+
- `dataloader_num_workers`: 0
|
341 |
+
- `dataloader_prefetch_factor`: None
|
342 |
+
- `past_index`: -1
|
343 |
+
- `disable_tqdm`: False
|
344 |
+
- `remove_unused_columns`: True
|
345 |
+
- `label_names`: None
|
346 |
+
- `load_best_model_at_end`: False
|
347 |
+
- `ignore_data_skip`: False
|
348 |
+
- `fsdp`: []
|
349 |
+
- `fsdp_min_num_params`: 0
|
350 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
351 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
352 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
353 |
+
- `deepspeed`: None
|
354 |
+
- `label_smoothing_factor`: 0.0
|
355 |
+
- `optim`: adamw_torch
|
356 |
+
- `optim_args`: None
|
357 |
+
- `adafactor`: False
|
358 |
+
- `group_by_length`: False
|
359 |
+
- `length_column_name`: length
|
360 |
+
- `ddp_find_unused_parameters`: None
|
361 |
+
- `ddp_bucket_cap_mb`: None
|
362 |
+
- `ddp_broadcast_buffers`: False
|
363 |
+
- `dataloader_pin_memory`: True
|
364 |
+
- `dataloader_persistent_workers`: False
|
365 |
+
- `skip_memory_metrics`: True
|
366 |
+
- `use_legacy_prediction_loop`: False
|
367 |
+
- `push_to_hub`: False
|
368 |
+
- `resume_from_checkpoint`: None
|
369 |
+
- `hub_model_id`: None
|
370 |
+
- `hub_strategy`: every_save
|
371 |
+
- `hub_private_repo`: False
|
372 |
+
- `hub_always_push`: False
|
373 |
+
- `gradient_checkpointing`: False
|
374 |
+
- `gradient_checkpointing_kwargs`: None
|
375 |
+
- `include_inputs_for_metrics`: False
|
376 |
+
- `eval_do_concat_batches`: True
|
377 |
+
- `fp16_backend`: auto
|
378 |
+
- `push_to_hub_model_id`: None
|
379 |
+
- `push_to_hub_organization`: None
|
380 |
+
- `mp_parameters`:
|
381 |
+
- `auto_find_batch_size`: False
|
382 |
+
- `full_determinism`: False
|
383 |
+
- `torchdynamo`: None
|
384 |
+
- `ray_scope`: last
|
385 |
+
- `ddp_timeout`: 1800
|
386 |
+
- `torch_compile`: False
|
387 |
+
- `torch_compile_backend`: None
|
388 |
+
- `torch_compile_mode`: None
|
389 |
+
- `dispatch_batches`: None
|
390 |
+
- `split_batches`: None
|
391 |
+
- `include_tokens_per_second`: False
|
392 |
+
- `include_num_input_tokens_seen`: False
|
393 |
+
- `neftune_noise_alpha`: None
|
394 |
+
- `optim_target_modules`: None
|
395 |
+
- `batch_eval_metrics`: False
|
396 |
+
- `batch_sampler`: no_duplicates
|
397 |
+
- `multi_dataset_batch_sampler`: proportional
|
398 |
+
|
399 |
+
</details>
|
400 |
+
|
401 |
+
### Training Logs
|
402 |
+
| Epoch | Step | Training Loss | loss | all-nli-dev_max_accuracy | all-nli-test_max_accuracy |
|
403 |
+
|:-----:|:----:|:-------------:|:------:|:------------------------:|:-------------------------:|
|
404 |
+
| 0 | 0 | - | - | 0.541 | - |
|
405 |
+
| 0.016 | 100 | 3.5308 | 3.1817 | 0.558 | - |
|
406 |
+
| 0.032 | 200 | 3.2784 | 3.0406 | 0.597 | - |
|
407 |
+
| 0.048 | 300 | 3.113 | 2.7572 | 0.635 | - |
|
408 |
+
| 0.064 | 400 | 2.8296 | 2.4646 | 0.68 | - |
|
409 |
+
| 0.08 | 500 | 2.631 | 2.3583 | 0.676 | - |
|
410 |
+
| 0.096 | 600 | 2.3247 | 2.1394 | 0.706 | - |
|
411 |
+
| 0.112 | 700 | 2.2211 | 2.0201 | 0.711 | - |
|
412 |
+
| 0.128 | 800 | 2.1263 | 1.9560 | 0.757 | - |
|
413 |
+
| 0.144 | 900 | 2.2105 | 1.9074 | 0.748 | - |
|
414 |
+
| 0.16 | 1000 | 2.0637 | 1.9289 | 0.728 | - |
|
415 |
+
| 0.176 | 1100 | 2.1772 | 1.8796 | 0.741 | - |
|
416 |
+
| 0.192 | 1200 | 2.1518 | 1.8346 | 0.761 | - |
|
417 |
+
| 0.208 | 1300 | 1.728 | 1.8213 | 0.765 | - |
|
418 |
+
| 0.224 | 1400 | 1.8101 | 1.6321 | 0.772 | - |
|
419 |
+
| 0.24 | 1500 | 1.7516 | 1.5669 | 0.793 | - |
|
420 |
+
| 0.256 | 1600 | 1.4988 | 1.5538 | 0.8 | - |
|
421 |
+
| 0.272 | 1700 | 1.6695 | 1.5462 | 0.803 | - |
|
422 |
+
| 0.288 | 1800 | 1.5971 | 1.5499 | 0.783 | - |
|
423 |
+
| 0.304 | 1900 | 1.5614 | 1.5047 | 0.788 | - |
|
424 |
+
| 0.32 | 2000 | 1.522 | 1.4957 | 0.794 | - |
|
425 |
+
| 0.336 | 2100 | 1.3624 | 1.4153 | 0.814 | - |
|
426 |
+
| 0.352 | 2200 | 1.4773 | 1.4169 | 0.809 | - |
|
427 |
+
| 0.368 | 2300 | 1.6066 | 1.3697 | 0.813 | - |
|
428 |
+
| 0.384 | 2400 | 1.5106 | 1.3203 | 0.819 | - |
|
429 |
+
| 0.4 | 2500 | 1.4783 | 1.3417 | 0.817 | - |
|
430 |
+
| 0.416 | 2600 | 1.3696 | 1.2650 | 0.824 | - |
|
431 |
+
| 0.432 | 2700 | 1.5115 | 1.2779 | 0.829 | - |
|
432 |
+
| 0.448 | 2800 | 1.4834 | 1.2668 | 0.834 | - |
|
433 |
+
| 0.464 | 2900 | 1.4823 | 1.2621 | 0.836 | - |
|
434 |
+
| 0.48 | 3000 | 1.4163 | 1.2465 | 0.837 | - |
|
435 |
+
| 0.496 | 3100 | 1.4232 | 1.2475 | 0.837 | - |
|
436 |
+
| 0.512 | 3200 | 1.2193 | 1.1975 | 0.838 | - |
|
437 |
+
| 0.528 | 3300 | 1.2569 | 1.1816 | 0.838 | - |
|
438 |
+
| 0.544 | 3400 | 1.2988 | 1.1936 | 0.839 | - |
|
439 |
+
| 0.56 | 3500 | 1.5068 | 1.2213 | 0.835 | - |
|
440 |
+
| 0.576 | 3600 | 1.3022 | 1.1799 | 0.842 | - |
|
441 |
+
| 0.592 | 3700 | 1.3823 | 1.1910 | 0.831 | - |
|
442 |
+
| 0.608 | 3800 | 1.4224 | 1.1786 | 0.834 | - |
|
443 |
+
| 0.624 | 3900 | 1.3765 | 1.1541 | 0.843 | - |
|
444 |
+
| 0.64 | 4000 | 1.4987 | 1.1365 | 0.844 | - |
|
445 |
+
| 0.656 | 4100 | 1.7525 | 1.1394 | 0.843 | - |
|
446 |
+
| 0.672 | 4200 | 1.6013 | 1.1178 | 0.841 | - |
|
447 |
+
| 0.688 | 4300 | 1.3326 | 1.0959 | 0.846 | - |
|
448 |
+
| 0.704 | 4400 | 1.355 | 1.0757 | 0.848 | - |
|
449 |
+
| 0.72 | 4500 | 1.2834 | 1.0681 | 0.846 | - |
|
450 |
+
| 0.736 | 4600 | 1.2939 | 1.0696 | 0.85 | - |
|
451 |
+
| 0.752 | 4700 | 1.4069 | 1.0645 | 0.848 | - |
|
452 |
+
| 0.768 | 4800 | 1.4503 | 1.0609 | 0.849 | - |
|
453 |
+
| 0.784 | 4900 | 1.2833 | 1.0587 | 0.847 | - |
|
454 |
+
| 0.8 | 5000 | 1.3321 | 1.0563 | 0.849 | - |
|
455 |
+
| 0.816 | 5100 | 1.3006 | 1.0539 | 0.847 | - |
|
456 |
+
| 0.832 | 5200 | 1.4332 | 1.0527 | 0.847 | - |
|
457 |
+
| 0.848 | 5300 | 1.3101 | 1.0505 | 0.848 | - |
|
458 |
+
| 0.864 | 5400 | 1.3658 | 1.0523 | 0.849 | - |
|
459 |
+
| 0.88 | 5500 | 1.353 | 1.0520 | 0.849 | - |
|
460 |
+
| 0.896 | 5600 | 1.2429 | 1.0521 | 0.848 | - |
|
461 |
+
| 0.912 | 5700 | 1.3512 | 1.0505 | 0.848 | - |
|
462 |
+
| 0.928 | 5800 | 1.2995 | 1.0501 | 0.848 | - |
|
463 |
+
| 0.944 | 5900 | 1.3514 | 1.0491 | 0.849 | - |
|
464 |
+
| 0.96 | 6000 | 1.3976 | 1.0490 | 0.848 | - |
|
465 |
+
| 0.976 | 6100 | 1.2112 | 1.0487 | 0.848 | - |
|
466 |
+
| 0.992 | 6200 | 0.0033 | 1.0492 | 0.849 | - |
|
467 |
+
| 1.0 | 6250 | - | - | - | 0.839 |
|
468 |
+
|
469 |
+
|
470 |
+
### Framework Versions
|
471 |
+
- Python: 3.9.10
|
472 |
+
- Sentence Transformers: 3.0.0
|
473 |
+
- Transformers: 4.41.2
|
474 |
+
- PyTorch: 2.3.0+cu121
|
475 |
+
- Accelerate: 0.26.1
|
476 |
+
- Datasets: 2.16.1
|
477 |
+
- Tokenizers: 0.19.1
|
478 |
+
|
479 |
+
## Citation
|
480 |
+
|
481 |
+
### BibTeX
|
482 |
+
|
483 |
+
#### Sentence Transformers
|
484 |
+
```bibtex
|
485 |
+
@inproceedings{reimers-2019-sentence-bert,
|
486 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
487 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
488 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
489 |
+
month = "11",
|
490 |
+
year = "2019",
|
491 |
+
publisher = "Association for Computational Linguistics",
|
492 |
+
url = "https://arxiv.org/abs/1908.10084",
|
493 |
+
}
|
494 |
+
```
|
495 |
+
|
496 |
+
#### CachedMultipleNegativesRankingLoss
|
497 |
+
```bibtex
|
498 |
+
@misc{gao2021scaling,
|
499 |
+
title={Scaling Deep Contrastive Learning Batch Size under Memory Limited Setup},
|
500 |
+
author={Luyu Gao and Yunyi Zhang and Jiawei Han and Jamie Callan},
|
501 |
+
year={2021},
|
502 |
+
eprint={2101.06983},
|
503 |
+
archivePrefix={arXiv},
|
504 |
+
primaryClass={cs.LG}
|
505 |
+
}
|
506 |
+
```
|
507 |
+
|
508 |
+
<!--
|
509 |
+
## Glossary
|
510 |
+
|
511 |
+
*Clearly define terms in order to be accessible across audiences.*
|
512 |
+
-->
|
513 |
+
|
514 |
+
<!--
|
515 |
+
## Model Card Authors
|
516 |
+
|
517 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
518 |
+
-->
|
519 |
+
|
520 |
+
<!--
|
521 |
+
## Model Card Contact
|
522 |
+
|
523 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
524 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "Unbabel/xlm-roberta-comet-small",
|
3 |
+
"architectures": [
|
4 |
+
"XLMRobertaModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"bos_token_id": 0,
|
8 |
+
"classifier_dropout": null,
|
9 |
+
"eos_token_id": 2,
|
10 |
+
"gradient_checkpointing": false,
|
11 |
+
"hidden_act": "gelu",
|
12 |
+
"hidden_dropout_prob": 0.1,
|
13 |
+
"hidden_size": 384,
|
14 |
+
"initializer_range": 0.02,
|
15 |
+
"intermediate_size": 1536,
|
16 |
+
"layer_norm_eps": 1e-05,
|
17 |
+
"max_position_embeddings": 514,
|
18 |
+
"model_type": "xlm-roberta",
|
19 |
+
"num_attention_heads": 12,
|
20 |
+
"num_hidden_layers": 6,
|
21 |
+
"pad_token_id": 1,
|
22 |
+
"position_embedding_type": "absolute",
|
23 |
+
"torch_dtype": "bfloat16",
|
24 |
+
"transformers_version": "4.41.2",
|
25 |
+
"type_vocab_size": 1,
|
26 |
+
"use_cache": true,
|
27 |
+
"vocab_size": 250002
|
28 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "3.0.0",
|
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:6cf80df00cf2a36fd7d85a04e82cf9eeddb56a6485a8fef3be209600336e19db
|
3 |
+
size 213999464
|
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 |
+
}
|
sentencepiece.bpe.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cfc8146abe2a0488e9e2a0c56de7952f7c11ab059eca145a0a727afce0db2865
|
3 |
+
size 5069051
|
special_tokens_map.json
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"cls_token": {
|
10 |
+
"content": "<s>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"eos_token": {
|
17 |
+
"content": "</s>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"mask_token": {
|
24 |
+
"content": "<mask>",
|
25 |
+
"lstrip": true,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
},
|
30 |
+
"pad_token": {
|
31 |
+
"content": "<pad>",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": false,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
},
|
37 |
+
"sep_token": {
|
38 |
+
"content": "</s>",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": false,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false
|
43 |
+
},
|
44 |
+
"unk_token": {
|
45 |
+
"content": "<unk>",
|
46 |
+
"lstrip": false,
|
47 |
+
"normalized": false,
|
48 |
+
"rstrip": false,
|
49 |
+
"single_word": false
|
50 |
+
}
|
51 |
+
}
|
tokenizer.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:883b037111086fd4dfebbbc9b7cee11e1517b5e0c0514879478661440f137085
|
3 |
+
size 17082987
|
tokenizer_config.json
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "<s>",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"1": {
|
12 |
+
"content": "<pad>",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"2": {
|
20 |
+
"content": "</s>",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"3": {
|
28 |
+
"content": "<unk>",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"250001": {
|
36 |
+
"content": "<mask>",
|
37 |
+
"lstrip": true,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
}
|
43 |
+
},
|
44 |
+
"bos_token": "<s>",
|
45 |
+
"clean_up_tokenization_spaces": true,
|
46 |
+
"cls_token": "<s>",
|
47 |
+
"eos_token": "</s>",
|
48 |
+
"mask_token": "<mask>",
|
49 |
+
"model_max_length": 512,
|
50 |
+
"pad_token": "<pad>",
|
51 |
+
"sep_token": "</s>",
|
52 |
+
"tokenizer_class": "XLMRobertaTokenizer",
|
53 |
+
"unk_token": "<unk>"
|
54 |
+
}
|