Add new CrossEncoder model
Browse files- README.md +431 -0
- config.json +37 -0
- merges.txt +0 -0
- model.safetensors +3 -0
- special_tokens_map.json +15 -0
- tokenizer.json +0 -0
- tokenizer_config.json +58 -0
- vocab.json +0 -0
README.md
ADDED
@@ -0,0 +1,431 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
tags:
|
5 |
+
- sentence-transformers
|
6 |
+
- cross-encoder
|
7 |
+
- text-classification
|
8 |
+
- generated_from_trainer
|
9 |
+
- dataset_size:942069
|
10 |
+
- loss:CrossEntropyLoss
|
11 |
+
base_model: distilbert/distilroberta-base
|
12 |
+
datasets:
|
13 |
+
- sentence-transformers/all-nli
|
14 |
+
pipeline_tag: text-classification
|
15 |
+
library_name: sentence-transformers
|
16 |
+
metrics:
|
17 |
+
- f1_macro
|
18 |
+
- f1_micro
|
19 |
+
- f1_weighted
|
20 |
+
co2_eq_emissions:
|
21 |
+
emissions: 5.804161792857238
|
22 |
+
energy_consumed: 0.01493216343846247
|
23 |
+
source: codecarbon
|
24 |
+
training_type: fine-tuning
|
25 |
+
on_cloud: false
|
26 |
+
cpu_model: 13th Gen Intel(R) Core(TM) i7-13700K
|
27 |
+
ram_total_size: 31.777088165283203
|
28 |
+
hours_used: 0.058
|
29 |
+
hardware_used: 1 x NVIDIA GeForce RTX 3090
|
30 |
+
model-index:
|
31 |
+
- name: CrossEncoder based on distilbert/distilroberta-base
|
32 |
+
results:
|
33 |
+
- task:
|
34 |
+
type: cross-encoder-classification
|
35 |
+
name: Cross Encoder Classification
|
36 |
+
dataset:
|
37 |
+
name: AllNLI dev
|
38 |
+
type: AllNLI-dev
|
39 |
+
metrics:
|
40 |
+
- type: f1_macro
|
41 |
+
value: 0.8495346395196971
|
42 |
+
name: F1 Macro
|
43 |
+
- type: f1_micro
|
44 |
+
value: 0.851
|
45 |
+
name: F1 Micro
|
46 |
+
- type: f1_weighted
|
47 |
+
value: 0.8494545162410544
|
48 |
+
name: F1 Weighted
|
49 |
+
- task:
|
50 |
+
type: cross-encoder-classification
|
51 |
+
name: Cross Encoder Classification
|
52 |
+
dataset:
|
53 |
+
name: AllNLI test
|
54 |
+
type: AllNLI-test
|
55 |
+
metrics:
|
56 |
+
- type: f1_macro
|
57 |
+
value: 0.7574494684363943
|
58 |
+
name: F1 Macro
|
59 |
+
- type: f1_micro
|
60 |
+
value: 0.7575803825803826
|
61 |
+
name: F1 Micro
|
62 |
+
- type: f1_weighted
|
63 |
+
value: 0.7582587136974347
|
64 |
+
name: F1 Weighted
|
65 |
+
---
|
66 |
+
|
67 |
+
# CrossEncoder based on distilbert/distilroberta-base
|
68 |
+
|
69 |
+
This is a [Cross Encoder](https://www.sbert.net/docs/cross_encoder/usage/usage.html) model finetuned from [distilbert/distilroberta-base](https://huggingface.co/distilbert/distilroberta-base) on the [all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) dataset using the [sentence-transformers](https://www.SBERT.net) library. It computes scores for pairs of texts, which can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
70 |
+
|
71 |
+
## Model Details
|
72 |
+
|
73 |
+
### Model Description
|
74 |
+
- **Model Type:** Cross Encoder
|
75 |
+
- **Base model:** [distilbert/distilroberta-base](https://huggingface.co/distilbert/distilroberta-base) <!-- at revision fb53ab8802853c8e4fbdbcd0529f21fc6f459b2b -->
|
76 |
+
- **Maximum Sequence Length:** 514 tokens
|
77 |
+
- **Training Dataset:**
|
78 |
+
- [all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli)
|
79 |
+
- **Language:** en
|
80 |
+
<!-- - **License:** Unknown -->
|
81 |
+
|
82 |
+
### Model Sources
|
83 |
+
|
84 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
85 |
+
- **Documentation:** [Cross Encoder Documentation](https://www.sbert.net/docs/cross_encoder/usage/usage.html)
|
86 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
87 |
+
- **Hugging Face:** [Cross Encoders on Hugging Face](https://huggingface.co/models?library=sentence-transformers&other=cross-encoder)
|
88 |
+
|
89 |
+
## Usage
|
90 |
+
|
91 |
+
### Direct Usage (Sentence Transformers)
|
92 |
+
|
93 |
+
First install the Sentence Transformers library:
|
94 |
+
|
95 |
+
```bash
|
96 |
+
pip install -U sentence-transformers
|
97 |
+
```
|
98 |
+
|
99 |
+
Then you can load this model and run inference.
|
100 |
+
```python
|
101 |
+
from sentence_transformers import CrossEncoder
|
102 |
+
|
103 |
+
# Download from the 🤗 Hub
|
104 |
+
model = CrossEncoder("tomaarsen/reranker-distilroberta-base-nli")
|
105 |
+
# Get scores for pairs...
|
106 |
+
pairs = [
|
107 |
+
['Two women are embracing while holding to go packages.', 'The sisters are hugging goodbye while holding to go packages after just eating lunch.'],
|
108 |
+
['Two women are embracing while holding to go packages.', 'Two woman are holding packages.'],
|
109 |
+
['Two women are embracing while holding to go packages.', 'The men are fighting outside a deli.'],
|
110 |
+
['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.', 'Two kids in numbered jerseys wash their hands.'],
|
111 |
+
['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.', 'Two kids at a ballgame wash their hands.'],
|
112 |
+
]
|
113 |
+
scores = model.predict(pairs)
|
114 |
+
print(scores.shape)
|
115 |
+
# [5]
|
116 |
+
|
117 |
+
# ... or rank different texts based on similarity to a single text
|
118 |
+
ranks = model.rank(
|
119 |
+
'Two women are embracing while holding to go packages.',
|
120 |
+
[
|
121 |
+
'The sisters are hugging goodbye while holding to go packages after just eating lunch.',
|
122 |
+
'Two woman are holding packages.',
|
123 |
+
'The men are fighting outside a deli.',
|
124 |
+
'Two kids in numbered jerseys wash their hands.',
|
125 |
+
'Two kids at a ballgame wash their hands.',
|
126 |
+
]
|
127 |
+
)
|
128 |
+
# [{'corpus_id': ..., 'score': ...}, {'corpus_id': ..., 'score': ...}, ...]
|
129 |
+
```
|
130 |
+
|
131 |
+
<!--
|
132 |
+
### Direct Usage (Transformers)
|
133 |
+
|
134 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
135 |
+
|
136 |
+
</details>
|
137 |
+
-->
|
138 |
+
|
139 |
+
<!--
|
140 |
+
### Downstream Usage (Sentence Transformers)
|
141 |
+
|
142 |
+
You can finetune this model on your own dataset.
|
143 |
+
|
144 |
+
<details><summary>Click to expand</summary>
|
145 |
+
|
146 |
+
</details>
|
147 |
+
-->
|
148 |
+
|
149 |
+
<!--
|
150 |
+
### Out-of-Scope Use
|
151 |
+
|
152 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
153 |
+
-->
|
154 |
+
|
155 |
+
## Evaluation
|
156 |
+
|
157 |
+
### Metrics
|
158 |
+
|
159 |
+
#### Cross Encoder Classification
|
160 |
+
|
161 |
+
* Datasets: `AllNLI-dev` and `AllNLI-test`
|
162 |
+
* Evaluated with [<code>CEClassificationEvaluator</code>](https://sbert.net/docs/package_reference/cross_encoder/evaluation.html#sentence_transformers.cross_encoder.evaluation.CEClassificationEvaluator)
|
163 |
+
|
164 |
+
| Metric | AllNLI-dev | AllNLI-test |
|
165 |
+
|:-------------|:-----------|:------------|
|
166 |
+
| **f1_macro** | **0.8495** | **0.7574** |
|
167 |
+
| f1_micro | 0.851 | 0.7576 |
|
168 |
+
| f1_weighted | 0.8495 | 0.7583 |
|
169 |
+
|
170 |
+
<!--
|
171 |
+
## Bias, Risks and Limitations
|
172 |
+
|
173 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
174 |
+
-->
|
175 |
+
|
176 |
+
<!--
|
177 |
+
### Recommendations
|
178 |
+
|
179 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
180 |
+
-->
|
181 |
+
|
182 |
+
## Training Details
|
183 |
+
|
184 |
+
### Training Dataset
|
185 |
+
|
186 |
+
#### all-nli
|
187 |
+
|
188 |
+
* Dataset: [all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) at [d482672](https://huggingface.co/datasets/sentence-transformers/all-nli/tree/d482672c8e74ce18da116f430137434ba2e52fab)
|
189 |
+
* Size: 942,069 training samples
|
190 |
+
* Columns: <code>premise</code>, <code>hypothesis</code>, and <code>label</code>
|
191 |
+
* Approximate statistics based on the first 1000 samples:
|
192 |
+
| | premise | hypothesis | label |
|
193 |
+
|:--------|:------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------|
|
194 |
+
| type | string | string | int |
|
195 |
+
| details | <ul><li>min: 23 characters</li><li>mean: 69.54 characters</li><li>max: 227 characters</li></ul> | <ul><li>min: 11 characters</li><li>mean: 38.26 characters</li><li>max: 131 characters</li></ul> | <ul><li>0: ~33.40%</li><li>1: ~33.30%</li><li>2: ~33.30%</li></ul> |
|
196 |
+
* Samples:
|
197 |
+
| premise | hypothesis | label |
|
198 |
+
|:--------------------------------------------------------------------|:---------------------------------------------------------------|:---------------|
|
199 |
+
| <code>A person on a horse jumps over a broken down airplane.</code> | <code>A person is training his horse for a competition.</code> | <code>1</code> |
|
200 |
+
| <code>A person on a horse jumps over a broken down airplane.</code> | <code>A person is at a diner, ordering an omelette.</code> | <code>2</code> |
|
201 |
+
| <code>A person on a horse jumps over a broken down airplane.</code> | <code>A person is outdoors, on a horse.</code> | <code>0</code> |
|
202 |
+
* Loss: [<code>CrossEntropyLoss</code>](https://sbert.net/docs/package_reference/cross_encoder/losses.html#crossentropyloss)
|
203 |
+
|
204 |
+
### Evaluation Dataset
|
205 |
+
|
206 |
+
#### all-nli
|
207 |
+
|
208 |
+
* Dataset: [all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) at [d482672](https://huggingface.co/datasets/sentence-transformers/all-nli/tree/d482672c8e74ce18da116f430137434ba2e52fab)
|
209 |
+
* Size: 19,657 evaluation samples
|
210 |
+
* Columns: <code>premise</code>, <code>hypothesis</code>, and <code>label</code>
|
211 |
+
* Approximate statistics based on the first 1000 samples:
|
212 |
+
| | premise | hypothesis | label |
|
213 |
+
|:--------|:------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------|
|
214 |
+
| type | string | string | int |
|
215 |
+
| details | <ul><li>min: 16 characters</li><li>mean: 75.01 characters</li><li>max: 229 characters</li></ul> | <ul><li>min: 11 characters</li><li>mean: 37.66 characters</li><li>max: 116 characters</li></ul> | <ul><li>0: ~33.10%</li><li>1: ~33.30%</li><li>2: ~33.60%</li></ul> |
|
216 |
+
* Samples:
|
217 |
+
| premise | hypothesis | label |
|
218 |
+
|:-------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------|:---------------|
|
219 |
+
| <code>Two women are embracing while holding to go packages.</code> | <code>The sisters are hugging goodbye while holding to go packages after just eating lunch.</code> | <code>1</code> |
|
220 |
+
| <code>Two women are embracing while holding to go packages.</code> | <code>Two woman are holding packages.</code> | <code>0</code> |
|
221 |
+
| <code>Two women are embracing while holding to go packages.</code> | <code>The men are fighting outside a deli.</code> | <code>2</code> |
|
222 |
+
* Loss: [<code>CrossEntropyLoss</code>](https://sbert.net/docs/package_reference/cross_encoder/losses.html#crossentropyloss)
|
223 |
+
|
224 |
+
### Training Hyperparameters
|
225 |
+
#### Non-Default Hyperparameters
|
226 |
+
|
227 |
+
- `eval_strategy`: steps
|
228 |
+
- `per_device_train_batch_size`: 64
|
229 |
+
- `per_device_eval_batch_size`: 64
|
230 |
+
- `num_train_epochs`: 1
|
231 |
+
- `warmup_ratio`: 0.1
|
232 |
+
- `bf16`: True
|
233 |
+
|
234 |
+
#### All Hyperparameters
|
235 |
+
<details><summary>Click to expand</summary>
|
236 |
+
|
237 |
+
- `overwrite_output_dir`: False
|
238 |
+
- `do_predict`: False
|
239 |
+
- `eval_strategy`: steps
|
240 |
+
- `prediction_loss_only`: True
|
241 |
+
- `per_device_train_batch_size`: 64
|
242 |
+
- `per_device_eval_batch_size`: 64
|
243 |
+
- `per_gpu_train_batch_size`: None
|
244 |
+
- `per_gpu_eval_batch_size`: None
|
245 |
+
- `gradient_accumulation_steps`: 1
|
246 |
+
- `eval_accumulation_steps`: None
|
247 |
+
- `torch_empty_cache_steps`: None
|
248 |
+
- `learning_rate`: 5e-05
|
249 |
+
- `weight_decay`: 0.0
|
250 |
+
- `adam_beta1`: 0.9
|
251 |
+
- `adam_beta2`: 0.999
|
252 |
+
- `adam_epsilon`: 1e-08
|
253 |
+
- `max_grad_norm`: 1.0
|
254 |
+
- `num_train_epochs`: 1
|
255 |
+
- `max_steps`: -1
|
256 |
+
- `lr_scheduler_type`: linear
|
257 |
+
- `lr_scheduler_kwargs`: {}
|
258 |
+
- `warmup_ratio`: 0.1
|
259 |
+
- `warmup_steps`: 0
|
260 |
+
- `log_level`: passive
|
261 |
+
- `log_level_replica`: warning
|
262 |
+
- `log_on_each_node`: True
|
263 |
+
- `logging_nan_inf_filter`: True
|
264 |
+
- `save_safetensors`: True
|
265 |
+
- `save_on_each_node`: False
|
266 |
+
- `save_only_model`: False
|
267 |
+
- `restore_callback_states_from_checkpoint`: False
|
268 |
+
- `no_cuda`: False
|
269 |
+
- `use_cpu`: False
|
270 |
+
- `use_mps_device`: False
|
271 |
+
- `seed`: 42
|
272 |
+
- `data_seed`: None
|
273 |
+
- `jit_mode_eval`: False
|
274 |
+
- `use_ipex`: False
|
275 |
+
- `bf16`: True
|
276 |
+
- `fp16`: False
|
277 |
+
- `fp16_opt_level`: O1
|
278 |
+
- `half_precision_backend`: auto
|
279 |
+
- `bf16_full_eval`: False
|
280 |
+
- `fp16_full_eval`: False
|
281 |
+
- `tf32`: None
|
282 |
+
- `local_rank`: 0
|
283 |
+
- `ddp_backend`: None
|
284 |
+
- `tpu_num_cores`: None
|
285 |
+
- `tpu_metrics_debug`: False
|
286 |
+
- `debug`: []
|
287 |
+
- `dataloader_drop_last`: False
|
288 |
+
- `dataloader_num_workers`: 0
|
289 |
+
- `dataloader_prefetch_factor`: None
|
290 |
+
- `past_index`: -1
|
291 |
+
- `disable_tqdm`: False
|
292 |
+
- `remove_unused_columns`: True
|
293 |
+
- `label_names`: None
|
294 |
+
- `load_best_model_at_end`: False
|
295 |
+
- `ignore_data_skip`: False
|
296 |
+
- `fsdp`: []
|
297 |
+
- `fsdp_min_num_params`: 0
|
298 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
299 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
300 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
301 |
+
- `deepspeed`: None
|
302 |
+
- `label_smoothing_factor`: 0.0
|
303 |
+
- `optim`: adamw_torch
|
304 |
+
- `optim_args`: None
|
305 |
+
- `adafactor`: False
|
306 |
+
- `group_by_length`: False
|
307 |
+
- `length_column_name`: length
|
308 |
+
- `ddp_find_unused_parameters`: None
|
309 |
+
- `ddp_bucket_cap_mb`: None
|
310 |
+
- `ddp_broadcast_buffers`: False
|
311 |
+
- `dataloader_pin_memory`: True
|
312 |
+
- `dataloader_persistent_workers`: False
|
313 |
+
- `skip_memory_metrics`: True
|
314 |
+
- `use_legacy_prediction_loop`: False
|
315 |
+
- `push_to_hub`: False
|
316 |
+
- `resume_from_checkpoint`: None
|
317 |
+
- `hub_model_id`: None
|
318 |
+
- `hub_strategy`: every_save
|
319 |
+
- `hub_private_repo`: None
|
320 |
+
- `hub_always_push`: False
|
321 |
+
- `gradient_checkpointing`: False
|
322 |
+
- `gradient_checkpointing_kwargs`: None
|
323 |
+
- `include_inputs_for_metrics`: False
|
324 |
+
- `include_for_metrics`: []
|
325 |
+
- `eval_do_concat_batches`: True
|
326 |
+
- `fp16_backend`: auto
|
327 |
+
- `push_to_hub_model_id`: None
|
328 |
+
- `push_to_hub_organization`: None
|
329 |
+
- `mp_parameters`:
|
330 |
+
- `auto_find_batch_size`: False
|
331 |
+
- `full_determinism`: False
|
332 |
+
- `torchdynamo`: None
|
333 |
+
- `ray_scope`: last
|
334 |
+
- `ddp_timeout`: 1800
|
335 |
+
- `torch_compile`: False
|
336 |
+
- `torch_compile_backend`: None
|
337 |
+
- `torch_compile_mode`: None
|
338 |
+
- `dispatch_batches`: None
|
339 |
+
- `split_batches`: None
|
340 |
+
- `include_tokens_per_second`: False
|
341 |
+
- `include_num_input_tokens_seen`: False
|
342 |
+
- `neftune_noise_alpha`: None
|
343 |
+
- `optim_target_modules`: None
|
344 |
+
- `batch_eval_metrics`: False
|
345 |
+
- `eval_on_start`: False
|
346 |
+
- `use_liger_kernel`: False
|
347 |
+
- `eval_use_gather_object`: False
|
348 |
+
- `average_tokens_across_devices`: False
|
349 |
+
- `prompts`: None
|
350 |
+
- `batch_sampler`: batch_sampler
|
351 |
+
- `multi_dataset_batch_sampler`: proportional
|
352 |
+
|
353 |
+
</details>
|
354 |
+
|
355 |
+
### Training Logs
|
356 |
+
| Epoch | Step | Training Loss | Validation Loss | AllNLI-dev_f1_macro | AllNLI-test_f1_macro |
|
357 |
+
|:------:|:----:|:-------------:|:---------------:|:-------------------:|:--------------------:|
|
358 |
+
| -1 | -1 | - | - | 0.1677 | - |
|
359 |
+
| 0.0640 | 100 | 1.0454 | - | - | - |
|
360 |
+
| 0.1280 | 200 | 0.7193 | - | - | - |
|
361 |
+
| 0.1919 | 300 | 0.6247 | - | - | - |
|
362 |
+
| 0.2559 | 400 | 0.5907 | - | - | - |
|
363 |
+
| 0.3199 | 500 | 0.5671 | 0.4578 | 0.8206 | - |
|
364 |
+
| 0.3839 | 600 | 0.5384 | - | - | - |
|
365 |
+
| 0.4479 | 700 | 0.5492 | - | - | - |
|
366 |
+
| 0.5118 | 800 | 0.5281 | - | - | - |
|
367 |
+
| 0.5758 | 900 | 0.5043 | - | - | - |
|
368 |
+
| 0.6398 | 1000 | 0.5243 | 0.4012 | 0.8415 | - |
|
369 |
+
| 0.7038 | 1100 | 0.4906 | - | - | - |
|
370 |
+
| 0.7678 | 1200 | 0.4877 | - | - | - |
|
371 |
+
| 0.8317 | 1300 | 0.4506 | - | - | - |
|
372 |
+
| 0.8957 | 1400 | 0.4728 | - | - | - |
|
373 |
+
| 0.9597 | 1500 | 0.4602 | 0.3731 | 0.8495 | - |
|
374 |
+
| -1 | -1 | - | - | - | 0.7574 |
|
375 |
+
|
376 |
+
|
377 |
+
### Environmental Impact
|
378 |
+
Carbon emissions were measured using [CodeCarbon](https://github.com/mlco2/codecarbon).
|
379 |
+
- **Energy Consumed**: 0.015 kWh
|
380 |
+
- **Carbon Emitted**: 0.006 kg of CO2
|
381 |
+
- **Hours Used**: 0.058 hours
|
382 |
+
|
383 |
+
### Training Hardware
|
384 |
+
- **On Cloud**: No
|
385 |
+
- **GPU Model**: 1 x NVIDIA GeForce RTX 3090
|
386 |
+
- **CPU Model**: 13th Gen Intel(R) Core(TM) i7-13700K
|
387 |
+
- **RAM Size**: 31.78 GB
|
388 |
+
|
389 |
+
### Framework Versions
|
390 |
+
- Python: 3.11.6
|
391 |
+
- Sentence Transformers: 3.5.0.dev0
|
392 |
+
- Transformers: 4.49.0.dev0
|
393 |
+
- PyTorch: 2.5.0+cu121
|
394 |
+
- Accelerate: 1.3.0
|
395 |
+
- Datasets: 2.20.0
|
396 |
+
- Tokenizers: 0.21.0
|
397 |
+
|
398 |
+
## Citation
|
399 |
+
|
400 |
+
### BibTeX
|
401 |
+
|
402 |
+
#### Sentence Transformers
|
403 |
+
```bibtex
|
404 |
+
@inproceedings{reimers-2019-sentence-bert,
|
405 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
406 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
407 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
408 |
+
month = "11",
|
409 |
+
year = "2019",
|
410 |
+
publisher = "Association for Computational Linguistics",
|
411 |
+
url = "https://arxiv.org/abs/1908.10084",
|
412 |
+
}
|
413 |
+
```
|
414 |
+
|
415 |
+
<!--
|
416 |
+
## Glossary
|
417 |
+
|
418 |
+
*Clearly define terms in order to be accessible across audiences.*
|
419 |
+
-->
|
420 |
+
|
421 |
+
<!--
|
422 |
+
## Model Card Authors
|
423 |
+
|
424 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
425 |
+
-->
|
426 |
+
|
427 |
+
<!--
|
428 |
+
## Model Card Contact
|
429 |
+
|
430 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
431 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "distilroberta-base",
|
3 |
+
"architectures": [
|
4 |
+
"RobertaForSequenceClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"bos_token_id": 0,
|
8 |
+
"classifier_dropout": null,
|
9 |
+
"eos_token_id": 2,
|
10 |
+
"hidden_act": "gelu",
|
11 |
+
"hidden_dropout_prob": 0.1,
|
12 |
+
"hidden_size": 768,
|
13 |
+
"id2label": {
|
14 |
+
"0": "LABEL_0",
|
15 |
+
"1": "LABEL_1",
|
16 |
+
"2": "LABEL_2"
|
17 |
+
},
|
18 |
+
"initializer_range": 0.02,
|
19 |
+
"intermediate_size": 3072,
|
20 |
+
"label2id": {
|
21 |
+
"LABEL_0": 0,
|
22 |
+
"LABEL_1": 1,
|
23 |
+
"LABEL_2": 2
|
24 |
+
},
|
25 |
+
"layer_norm_eps": 1e-05,
|
26 |
+
"max_position_embeddings": 514,
|
27 |
+
"model_type": "roberta",
|
28 |
+
"num_attention_heads": 12,
|
29 |
+
"num_hidden_layers": 6,
|
30 |
+
"pad_token_id": 1,
|
31 |
+
"position_embedding_type": "absolute",
|
32 |
+
"torch_dtype": "float32",
|
33 |
+
"transformers_version": "4.49.0.dev0",
|
34 |
+
"type_vocab_size": 1,
|
35 |
+
"use_cache": true,
|
36 |
+
"vocab_size": 50265
|
37 |
+
}
|
merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e33b6b773c61b3b40dbb6dfeb215aedba455122193b3e14f87abbfa418b6f723
|
3 |
+
size 328495356
|
special_tokens_map.json
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": "<s>",
|
3 |
+
"cls_token": "<s>",
|
4 |
+
"eos_token": "</s>",
|
5 |
+
"mask_token": {
|
6 |
+
"content": "<mask>",
|
7 |
+
"lstrip": true,
|
8 |
+
"normalized": false,
|
9 |
+
"rstrip": false,
|
10 |
+
"single_word": false
|
11 |
+
},
|
12 |
+
"pad_token": "<pad>",
|
13 |
+
"sep_token": "</s>",
|
14 |
+
"unk_token": "<unk>"
|
15 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_prefix_space": false,
|
3 |
+
"added_tokens_decoder": {
|
4 |
+
"0": {
|
5 |
+
"content": "<s>",
|
6 |
+
"lstrip": false,
|
7 |
+
"normalized": true,
|
8 |
+
"rstrip": false,
|
9 |
+
"single_word": false,
|
10 |
+
"special": true
|
11 |
+
},
|
12 |
+
"1": {
|
13 |
+
"content": "<pad>",
|
14 |
+
"lstrip": false,
|
15 |
+
"normalized": true,
|
16 |
+
"rstrip": false,
|
17 |
+
"single_word": false,
|
18 |
+
"special": true
|
19 |
+
},
|
20 |
+
"2": {
|
21 |
+
"content": "</s>",
|
22 |
+
"lstrip": false,
|
23 |
+
"normalized": true,
|
24 |
+
"rstrip": false,
|
25 |
+
"single_word": false,
|
26 |
+
"special": true
|
27 |
+
},
|
28 |
+
"3": {
|
29 |
+
"content": "<unk>",
|
30 |
+
"lstrip": false,
|
31 |
+
"normalized": true,
|
32 |
+
"rstrip": false,
|
33 |
+
"single_word": false,
|
34 |
+
"special": true
|
35 |
+
},
|
36 |
+
"50264": {
|
37 |
+
"content": "<mask>",
|
38 |
+
"lstrip": true,
|
39 |
+
"normalized": false,
|
40 |
+
"rstrip": false,
|
41 |
+
"single_word": false,
|
42 |
+
"special": true
|
43 |
+
}
|
44 |
+
},
|
45 |
+
"bos_token": "<s>",
|
46 |
+
"clean_up_tokenization_spaces": false,
|
47 |
+
"cls_token": "<s>",
|
48 |
+
"eos_token": "</s>",
|
49 |
+
"errors": "replace",
|
50 |
+
"extra_special_tokens": {},
|
51 |
+
"mask_token": "<mask>",
|
52 |
+
"model_max_length": 514,
|
53 |
+
"pad_token": "<pad>",
|
54 |
+
"sep_token": "</s>",
|
55 |
+
"tokenizer_class": "RobertaTokenizer",
|
56 |
+
"trim_offsets": true,
|
57 |
+
"unk_token": "<unk>"
|
58 |
+
}
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|