Add new CrossEncoder model
Browse files- README.md +435 -0
- config.json +55 -0
- model.safetensors +3 -0
- special_tokens_map.json +37 -0
- tokenizer.json +0 -0
- tokenizer_config.json +73 -0
README.md
ADDED
@@ -0,0 +1,435 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- hu
|
4 |
+
license: apache-2.0
|
5 |
+
tags:
|
6 |
+
- sentence-transformers
|
7 |
+
- cross-encoder
|
8 |
+
- reranker
|
9 |
+
- generated_from_trainer
|
10 |
+
- dataset_size:32113
|
11 |
+
- loss:BinaryCrossEntropyLoss
|
12 |
+
base_model: GaborMadarasz/ModernBERT-base-hungarian
|
13 |
+
pipeline_tag: text-ranking
|
14 |
+
library_name: sentence-transformers
|
15 |
+
metrics:
|
16 |
+
- map
|
17 |
+
- mrr@10
|
18 |
+
- ndcg@10
|
19 |
+
model-index:
|
20 |
+
- name: ModernBERT-base trained on Chemistry
|
21 |
+
results:
|
22 |
+
- task:
|
23 |
+
type: cross-encoder-reranking
|
24 |
+
name: Cross Encoder Reranking
|
25 |
+
dataset:
|
26 |
+
name: chem dev
|
27 |
+
type: chem-dev
|
28 |
+
metrics:
|
29 |
+
- type: map
|
30 |
+
value: 0.4646
|
31 |
+
name: Map
|
32 |
+
- type: mrr@10
|
33 |
+
value: 0.4614
|
34 |
+
name: Mrr@10
|
35 |
+
- type: ndcg@10
|
36 |
+
value: 0.4928
|
37 |
+
name: Ndcg@10
|
38 |
+
---
|
39 |
+
|
40 |
+
# ModernBERT-base trained on Chemistry
|
41 |
+
|
42 |
+
This is a [Cross Encoder](https://www.sbert.net/docs/cross_encoder/usage/usage.html) model finetuned from [GaborMadarasz/ModernBERT-base-hungarian](https://huggingface.co/GaborMadarasz/ModernBERT-base-hungarian) using the [sentence-transformers](https://www.SBERT.net) library. It computes scores for pairs of texts, which can be used for text reranking and semantic search.
|
43 |
+
|
44 |
+
## Model Details
|
45 |
+
|
46 |
+
### Model Description
|
47 |
+
- **Model Type:** Cross Encoder
|
48 |
+
- **Base model:** [GaborMadarasz/ModernBERT-base-hungarian](https://huggingface.co/GaborMadarasz/ModernBERT-base-hungarian) <!-- at revision 32d70514a6587e31e23ff8ea3d0dc98bc61e42e4 -->
|
49 |
+
- **Maximum Sequence Length:** 8192 tokens
|
50 |
+
- **Number of Output Labels:** 1 label
|
51 |
+
<!-- - **Training Dataset:** Unknown -->
|
52 |
+
- **Language:** hu
|
53 |
+
- **License:** apache-2.0
|
54 |
+
|
55 |
+
### Model Sources
|
56 |
+
|
57 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
58 |
+
- **Documentation:** [Cross Encoder Documentation](https://www.sbert.net/docs/cross_encoder/usage/usage.html)
|
59 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
60 |
+
- **Hugging Face:** [Cross Encoders on Hugging Face](https://huggingface.co/models?library=sentence-transformers&other=cross-encoder)
|
61 |
+
|
62 |
+
## Usage
|
63 |
+
|
64 |
+
### Direct Usage (Sentence Transformers)
|
65 |
+
|
66 |
+
First install the Sentence Transformers library:
|
67 |
+
|
68 |
+
```bash
|
69 |
+
pip install -U sentence-transformers
|
70 |
+
```
|
71 |
+
|
72 |
+
Then you can load this model and run inference.
|
73 |
+
```python
|
74 |
+
from sentence_transformers import CrossEncoder
|
75 |
+
|
76 |
+
# Download from the 🤗 Hub
|
77 |
+
model = CrossEncoder("GaborMadarasz/reranker-ModernBERT-base-hungarian")
|
78 |
+
# Get scores for pairs of texts
|
79 |
+
pairs = [
|
80 |
+
['Milyen halmazállapotú a klór szobahőmérsékleten?', 'Gáz'],
|
81 |
+
['Milyen halmazállapotú a klór szobahőmérsékleten?', 'Gáz.'],
|
82 |
+
['Mi az izoméria fogalma?', 'Azonos összegképletű, de eltérő szerkezetű és tulajdonságú anyagok. '],
|
83 |
+
['Melyik elektronhéjon található a hidrogénatom egyetlen elektronja?', 'Az első héjon.'],
|
84 |
+
['Milyen felhasználási területei vannak a szilíciumnak?', 'Ötvözőelemként, tranzisztorok, integrált áramkörök, fényelemek előállítására.'],
|
85 |
+
]
|
86 |
+
scores = model.predict(pairs)
|
87 |
+
print(scores.shape)
|
88 |
+
# (5,)
|
89 |
+
|
90 |
+
# Or rank different texts based on similarity to a single text
|
91 |
+
ranks = model.rank(
|
92 |
+
'Milyen halmazállapotú a klór szobahőmérsékleten?',
|
93 |
+
[
|
94 |
+
'Gáz',
|
95 |
+
'Gáz.',
|
96 |
+
'Azonos összegképletű, de eltérő szerkezetű és tulajdonságú anyagok. ',
|
97 |
+
'Az első héjon.',
|
98 |
+
'Ötvözőelemként, tranzisztorok, integrált áramkörök, fényelemek előállítására.',
|
99 |
+
]
|
100 |
+
)
|
101 |
+
# [{'corpus_id': ..., 'score': ...}, {'corpus_id': ..., 'score': ...}, ...]
|
102 |
+
```
|
103 |
+
|
104 |
+
<!--
|
105 |
+
### Direct Usage (Transformers)
|
106 |
+
|
107 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
108 |
+
|
109 |
+
</details>
|
110 |
+
-->
|
111 |
+
|
112 |
+
<!--
|
113 |
+
### Downstream Usage (Sentence Transformers)
|
114 |
+
|
115 |
+
You can finetune this model on your own dataset.
|
116 |
+
|
117 |
+
<details><summary>Click to expand</summary>
|
118 |
+
|
119 |
+
</details>
|
120 |
+
-->
|
121 |
+
|
122 |
+
<!--
|
123 |
+
### Out-of-Scope Use
|
124 |
+
|
125 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
126 |
+
-->
|
127 |
+
|
128 |
+
## Evaluation
|
129 |
+
|
130 |
+
### Metrics
|
131 |
+
|
132 |
+
#### Cross Encoder Reranking
|
133 |
+
|
134 |
+
* Dataset: `chem-dev`
|
135 |
+
* Evaluated with [<code>CrossEncoderRerankingEvaluator</code>](https://sbert.net/docs/package_reference/cross_encoder/evaluation.html#sentence_transformers.cross_encoder.evaluation.CrossEncoderRerankingEvaluator) with these parameters:
|
136 |
+
```json
|
137 |
+
{
|
138 |
+
"at_k": 10,
|
139 |
+
"always_rerank_positives": false
|
140 |
+
}
|
141 |
+
```
|
142 |
+
|
143 |
+
| Metric | Value |
|
144 |
+
|:------------|:---------------------|
|
145 |
+
| map | 0.4646 (+0.0929) |
|
146 |
+
| mrr@10 | 0.4614 (+0.0966) |
|
147 |
+
| **ndcg@10** | **0.4928 (+0.0910)** |
|
148 |
+
|
149 |
+
<!--
|
150 |
+
## Bias, Risks and Limitations
|
151 |
+
|
152 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
153 |
+
-->
|
154 |
+
|
155 |
+
<!--
|
156 |
+
### Recommendations
|
157 |
+
|
158 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
159 |
+
-->
|
160 |
+
|
161 |
+
## Training Details
|
162 |
+
|
163 |
+
### Training Dataset
|
164 |
+
|
165 |
+
#### Unnamed Dataset
|
166 |
+
|
167 |
+
* Size: 32,113 training samples
|
168 |
+
* Columns: <code>query</code>, <code>answer</code>, and <code>label</code>
|
169 |
+
* Approximate statistics based on the first 1000 samples:
|
170 |
+
| | query | answer | label |
|
171 |
+
|:--------|:----------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------|:------------------------------------------------|
|
172 |
+
| type | string | string | int |
|
173 |
+
| details | <ul><li>min: 8 characters</li><li>mean: 52.3 characters</li><li>max: 159 characters</li></ul> | <ul><li>min: 1 characters</li><li>mean: 83.87 characters</li><li>max: 531 characters</li></ul> | <ul><li>0: ~69.80%</li><li>1: ~30.20%</li></ul> |
|
174 |
+
* Samples:
|
175 |
+
| query | answer | label |
|
176 |
+
|:--------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------|
|
177 |
+
| <code>Milyen halmazállapotú a klór szobahőmérsékleten?</code> | <code>Gáz</code> | <code>1</code> |
|
178 |
+
| <code>Milyen halmazállapotú a klór szobahőmérsékleten?</code> | <code>Gáz.</code> | <code>1</code> |
|
179 |
+
| <code>Mi az izoméria fogalma?</code> | <code>Azonos összegképletű, de eltérő szerkezetű és tulajdonságú anyagok. </code> | <code>1</code> |
|
180 |
+
* Loss: [<code>BinaryCrossEntropyLoss</code>](https://sbert.net/docs/package_reference/cross_encoder/losses.html#binarycrossentropyloss) with these parameters:
|
181 |
+
```json
|
182 |
+
{
|
183 |
+
"activation_fn": "torch.nn.modules.linear.Identity",
|
184 |
+
"pos_weight": 5
|
185 |
+
}
|
186 |
+
```
|
187 |
+
|
188 |
+
### Training Hyperparameters
|
189 |
+
#### Non-Default Hyperparameters
|
190 |
+
|
191 |
+
- `eval_strategy`: steps
|
192 |
+
- `per_device_train_batch_size`: 2
|
193 |
+
- `per_device_eval_batch_size`: 2
|
194 |
+
- `gradient_accumulation_steps`: 8
|
195 |
+
- `learning_rate`: 2e-05
|
196 |
+
- `warmup_ratio`: 0.1
|
197 |
+
- `seed`: 12
|
198 |
+
- `dataloader_num_workers`: 2
|
199 |
+
- `load_best_model_at_end`: True
|
200 |
+
|
201 |
+
#### All Hyperparameters
|
202 |
+
<details><summary>Click to expand</summary>
|
203 |
+
|
204 |
+
- `overwrite_output_dir`: False
|
205 |
+
- `do_predict`: False
|
206 |
+
- `eval_strategy`: steps
|
207 |
+
- `prediction_loss_only`: True
|
208 |
+
- `per_device_train_batch_size`: 2
|
209 |
+
- `per_device_eval_batch_size`: 2
|
210 |
+
- `per_gpu_train_batch_size`: None
|
211 |
+
- `per_gpu_eval_batch_size`: None
|
212 |
+
- `gradient_accumulation_steps`: 8
|
213 |
+
- `eval_accumulation_steps`: None
|
214 |
+
- `torch_empty_cache_steps`: None
|
215 |
+
- `learning_rate`: 2e-05
|
216 |
+
- `weight_decay`: 0.0
|
217 |
+
- `adam_beta1`: 0.9
|
218 |
+
- `adam_beta2`: 0.999
|
219 |
+
- `adam_epsilon`: 1e-08
|
220 |
+
- `max_grad_norm`: 1.0
|
221 |
+
- `num_train_epochs`: 3
|
222 |
+
- `max_steps`: -1
|
223 |
+
- `lr_scheduler_type`: linear
|
224 |
+
- `lr_scheduler_kwargs`: {}
|
225 |
+
- `warmup_ratio`: 0.1
|
226 |
+
- `warmup_steps`: 0
|
227 |
+
- `log_level`: passive
|
228 |
+
- `log_level_replica`: warning
|
229 |
+
- `log_on_each_node`: True
|
230 |
+
- `logging_nan_inf_filter`: True
|
231 |
+
- `save_safetensors`: True
|
232 |
+
- `save_on_each_node`: False
|
233 |
+
- `save_only_model`: False
|
234 |
+
- `restore_callback_states_from_checkpoint`: False
|
235 |
+
- `no_cuda`: False
|
236 |
+
- `use_cpu`: False
|
237 |
+
- `use_mps_device`: False
|
238 |
+
- `seed`: 12
|
239 |
+
- `data_seed`: None
|
240 |
+
- `jit_mode_eval`: False
|
241 |
+
- `use_ipex`: False
|
242 |
+
- `bf16`: False
|
243 |
+
- `fp16`: False
|
244 |
+
- `fp16_opt_level`: O1
|
245 |
+
- `half_precision_backend`: auto
|
246 |
+
- `bf16_full_eval`: False
|
247 |
+
- `fp16_full_eval`: False
|
248 |
+
- `tf32`: None
|
249 |
+
- `local_rank`: 0
|
250 |
+
- `ddp_backend`: None
|
251 |
+
- `tpu_num_cores`: None
|
252 |
+
- `tpu_metrics_debug`: False
|
253 |
+
- `debug`: []
|
254 |
+
- `dataloader_drop_last`: False
|
255 |
+
- `dataloader_num_workers`: 2
|
256 |
+
- `dataloader_prefetch_factor`: None
|
257 |
+
- `past_index`: -1
|
258 |
+
- `disable_tqdm`: False
|
259 |
+
- `remove_unused_columns`: True
|
260 |
+
- `label_names`: None
|
261 |
+
- `load_best_model_at_end`: True
|
262 |
+
- `ignore_data_skip`: False
|
263 |
+
- `fsdp`: []
|
264 |
+
- `fsdp_min_num_params`: 0
|
265 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
266 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
267 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
268 |
+
- `deepspeed`: None
|
269 |
+
- `label_smoothing_factor`: 0.0
|
270 |
+
- `optim`: adamw_torch
|
271 |
+
- `optim_args`: None
|
272 |
+
- `adafactor`: False
|
273 |
+
- `group_by_length`: False
|
274 |
+
- `length_column_name`: length
|
275 |
+
- `ddp_find_unused_parameters`: None
|
276 |
+
- `ddp_bucket_cap_mb`: None
|
277 |
+
- `ddp_broadcast_buffers`: False
|
278 |
+
- `dataloader_pin_memory`: True
|
279 |
+
- `dataloader_persistent_workers`: False
|
280 |
+
- `skip_memory_metrics`: True
|
281 |
+
- `use_legacy_prediction_loop`: False
|
282 |
+
- `push_to_hub`: False
|
283 |
+
- `resume_from_checkpoint`: None
|
284 |
+
- `hub_model_id`: None
|
285 |
+
- `hub_strategy`: every_save
|
286 |
+
- `hub_private_repo`: None
|
287 |
+
- `hub_always_push`: False
|
288 |
+
- `hub_revision`: None
|
289 |
+
- `gradient_checkpointing`: False
|
290 |
+
- `gradient_checkpointing_kwargs`: None
|
291 |
+
- `include_inputs_for_metrics`: False
|
292 |
+
- `include_for_metrics`: []
|
293 |
+
- `eval_do_concat_batches`: True
|
294 |
+
- `fp16_backend`: auto
|
295 |
+
- `push_to_hub_model_id`: None
|
296 |
+
- `push_to_hub_organization`: None
|
297 |
+
- `mp_parameters`:
|
298 |
+
- `auto_find_batch_size`: False
|
299 |
+
- `full_determinism`: False
|
300 |
+
- `torchdynamo`: None
|
301 |
+
- `ray_scope`: last
|
302 |
+
- `ddp_timeout`: 1800
|
303 |
+
- `torch_compile`: False
|
304 |
+
- `torch_compile_backend`: None
|
305 |
+
- `torch_compile_mode`: None
|
306 |
+
- `include_tokens_per_second`: False
|
307 |
+
- `include_num_input_tokens_seen`: False
|
308 |
+
- `neftune_noise_alpha`: None
|
309 |
+
- `optim_target_modules`: None
|
310 |
+
- `batch_eval_metrics`: False
|
311 |
+
- `eval_on_start`: False
|
312 |
+
- `use_liger_kernel`: False
|
313 |
+
- `liger_kernel_config`: None
|
314 |
+
- `eval_use_gather_object`: False
|
315 |
+
- `average_tokens_across_devices`: False
|
316 |
+
- `prompts`: None
|
317 |
+
- `batch_sampler`: batch_sampler
|
318 |
+
- `multi_dataset_batch_sampler`: proportional
|
319 |
+
- `router_mapping`: {}
|
320 |
+
- `learning_rate_mapping`: {}
|
321 |
+
|
322 |
+
</details>
|
323 |
+
|
324 |
+
### Training Logs
|
325 |
+
| Epoch | Step | Training Loss | chem-dev_ndcg@10 |
|
326 |
+
|:----------:|:--------:|:-------------:|:--------------------:|
|
327 |
+
| -1 | -1 | - | 0.1188 (-0.2831) |
|
328 |
+
| 0.0005 | 1 | 1.9222 | - |
|
329 |
+
| 0.0498 | 100 | 1.8084 | - |
|
330 |
+
| 0.0996 | 200 | 1.2947 | 0.2862 (-0.1157) |
|
331 |
+
| 0.1495 | 300 | 1.1573 | - |
|
332 |
+
| 0.1993 | 400 | 1.17 | 0.3567 (-0.0452) |
|
333 |
+
| 0.2491 | 500 | 1.0609 | - |
|
334 |
+
| 0.2989 | 600 | 1.01 | 0.3747 (-0.0272) |
|
335 |
+
| 0.3488 | 700 | 0.9806 | - |
|
336 |
+
| 0.3986 | 800 | 0.9208 | 0.3963 (-0.0056) |
|
337 |
+
| 0.4484 | 900 | 0.9022 | - |
|
338 |
+
| 0.4982 | 1000 | 0.8722 | 0.4106 (+0.0087) |
|
339 |
+
| 0.5480 | 1100 | 0.9325 | - |
|
340 |
+
| 0.5979 | 1200 | 0.768 | 0.4316 (+0.0298) |
|
341 |
+
| 0.6477 | 1300 | 0.8151 | - |
|
342 |
+
| 0.6975 | 1400 | 0.7569 | 0.4506 (+0.0487) |
|
343 |
+
| 0.7473 | 1500 | 0.7216 | - |
|
344 |
+
| 0.7972 | 1600 | 0.7571 | 0.4643 (+0.0625) |
|
345 |
+
| 0.8470 | 1700 | 0.6993 | - |
|
346 |
+
| 0.8968 | 1800 | 0.6709 | 0.4713 (+0.0694) |
|
347 |
+
| 0.9466 | 1900 | 0.7021 | - |
|
348 |
+
| 0.9965 | 2000 | 0.7693 | 0.4805 (+0.0787) |
|
349 |
+
| 1.0458 | 2100 | 0.5179 | - |
|
350 |
+
| 1.0957 | 2200 | 0.4932 | 0.4800 (+0.0781) |
|
351 |
+
| 1.1455 | 2300 | 0.5568 | - |
|
352 |
+
| 1.1953 | 2400 | 0.4191 | 0.4821 (+0.0803) |
|
353 |
+
| 1.2451 | 2500 | 0.4702 | - |
|
354 |
+
| 1.2949 | 2600 | 0.4126 | 0.4851 (+0.0833) |
|
355 |
+
| 1.3448 | 2700 | 0.4744 | - |
|
356 |
+
| 1.3946 | 2800 | 0.4404 | 0.4907 (+0.0888) |
|
357 |
+
| 1.4444 | 2900 | 0.4712 | - |
|
358 |
+
| 1.4942 | 3000 | 0.4382 | 0.4913 (+0.0894) |
|
359 |
+
| 1.5441 | 3100 | 0.5049 | - |
|
360 |
+
| 1.5939 | 3200 | 0.4714 | 0.4886 (+0.0868) |
|
361 |
+
| 1.6437 | 3300 | 0.3885 | - |
|
362 |
+
| 1.6935 | 3400 | 0.4361 | 0.4924 (+0.0906) |
|
363 |
+
| 1.7434 | 3500 | 0.4207 | - |
|
364 |
+
| **1.7932** | **3600** | **0.4384** | **0.4928 (+0.0910)** |
|
365 |
+
| 1.8430 | 3700 | 0.4187 | - |
|
366 |
+
| 1.8928 | 3800 | 0.4271 | 0.4937 (+0.0919) |
|
367 |
+
| 1.9426 | 3900 | 0.3581 | - |
|
368 |
+
| 1.9925 | 4000 | 0.3751 | 0.4910 (+0.0891) |
|
369 |
+
| 2.0419 | 4100 | 0.2494 | - |
|
370 |
+
| 2.0917 | 4200 | 0.2045 | 0.4869 (+0.0850) |
|
371 |
+
| 2.1415 | 4300 | 0.1532 | - |
|
372 |
+
| 2.1913 | 4400 | 0.1268 | 0.4838 (+0.0820) |
|
373 |
+
| 2.2411 | 4500 | 0.2108 | - |
|
374 |
+
| 2.2910 | 4600 | 0.2292 | 0.4889 (+0.0870) |
|
375 |
+
| 2.3408 | 4700 | 0.2154 | - |
|
376 |
+
| 2.3906 | 4800 | 0.1574 | 0.4921 (+0.0902) |
|
377 |
+
| 2.4404 | 4900 | 0.1677 | - |
|
378 |
+
| 2.4903 | 5000 | 0.1596 | 0.4826 (+0.0807) |
|
379 |
+
| 2.5401 | 5100 | 0.1456 | - |
|
380 |
+
| 2.5899 | 5200 | 0.2177 | 0.4867 (+0.0849) |
|
381 |
+
| 2.6397 | 5300 | 0.1227 | - |
|
382 |
+
| 2.6895 | 5400 | 0.1638 | 0.4880 (+0.0862) |
|
383 |
+
| 2.7394 | 5500 | 0.1192 | - |
|
384 |
+
| 2.7892 | 5600 | 0.2003 | 0.4848 (+0.0829) |
|
385 |
+
| 2.8390 | 5700 | 0.2717 | - |
|
386 |
+
| 2.8888 | 5800 | 0.1546 | 0.4841 (+0.0822) |
|
387 |
+
| 2.9387 | 5900 | 0.268 | - |
|
388 |
+
| 2.9885 | 6000 | 0.2253 | 0.4858 (+0.0840) |
|
389 |
+
| -1 | -1 | - | 0.4928 (+0.0910) |
|
390 |
+
|
391 |
+
* The bold row denotes the saved checkpoint.
|
392 |
+
|
393 |
+
### Framework Versions
|
394 |
+
- Python: 3.10.12
|
395 |
+
- Sentence Transformers: 5.0.0
|
396 |
+
- Transformers: 4.53.2
|
397 |
+
- PyTorch: 2.7.0+cpu
|
398 |
+
- Accelerate: 1.6.0
|
399 |
+
- Datasets: 3.2.0
|
400 |
+
- Tokenizers: 0.21.2
|
401 |
+
|
402 |
+
## Citation
|
403 |
+
|
404 |
+
### BibTeX
|
405 |
+
|
406 |
+
#### Sentence Transformers
|
407 |
+
```bibtex
|
408 |
+
@inproceedings{reimers-2019-sentence-bert,
|
409 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
410 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
411 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
412 |
+
month = "11",
|
413 |
+
year = "2019",
|
414 |
+
publisher = "Association for Computational Linguistics",
|
415 |
+
url = "https://arxiv.org/abs/1908.10084",
|
416 |
+
}
|
417 |
+
```
|
418 |
+
|
419 |
+
<!--
|
420 |
+
## Glossary
|
421 |
+
|
422 |
+
*Clearly define terms in order to be accessible across audiences.*
|
423 |
+
-->
|
424 |
+
|
425 |
+
<!--
|
426 |
+
## Model Card Authors
|
427 |
+
|
428 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
429 |
+
-->
|
430 |
+
|
431 |
+
<!--
|
432 |
+
## Model Card Contact
|
433 |
+
|
434 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
435 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"architectures": [
|
3 |
+
"ModernBertForSequenceClassification"
|
4 |
+
],
|
5 |
+
"attention_bias": false,
|
6 |
+
"attention_dropout": 0.0,
|
7 |
+
"bos_token_id": null,
|
8 |
+
"classifier_activation": "gelu",
|
9 |
+
"classifier_bias": false,
|
10 |
+
"classifier_dropout": 0.0,
|
11 |
+
"classifier_pooling": "mean",
|
12 |
+
"cls_token_id": 50281,
|
13 |
+
"decoder_bias": true,
|
14 |
+
"deterministic_flash_attn": false,
|
15 |
+
"embedding_dropout": 0.0,
|
16 |
+
"eos_token_id": null,
|
17 |
+
"global_attn_every_n_layers": 3,
|
18 |
+
"global_rope_theta": 160000.0,
|
19 |
+
"gradient_checkpointing": false,
|
20 |
+
"hidden_activation": "gelu",
|
21 |
+
"hidden_size": 768,
|
22 |
+
"id2label": {
|
23 |
+
"0": "LABEL_0"
|
24 |
+
},
|
25 |
+
"initializer_cutoff_factor": 2.0,
|
26 |
+
"initializer_range": 0.02,
|
27 |
+
"intermediate_size": 1152,
|
28 |
+
"label2id": {
|
29 |
+
"LABEL_0": 0
|
30 |
+
},
|
31 |
+
"layer_norm_eps": 1e-05,
|
32 |
+
"local_attention": 128,
|
33 |
+
"local_rope_theta": 10000.0,
|
34 |
+
"max_position_embeddings": 8192,
|
35 |
+
"mlp_bias": false,
|
36 |
+
"mlp_dropout": 0.0,
|
37 |
+
"model_type": "modernbert",
|
38 |
+
"norm_bias": false,
|
39 |
+
"norm_eps": 1e-05,
|
40 |
+
"num_attention_heads": 12,
|
41 |
+
"num_hidden_layers": 22,
|
42 |
+
"pad_token_id": 50283,
|
43 |
+
"position_embedding_type": "absolute",
|
44 |
+
"repad_logits_with_grad": false,
|
45 |
+
"sentence_transformers": {
|
46 |
+
"activation_fn": "torch.nn.modules.activation.Sigmoid",
|
47 |
+
"version": "5.0.0"
|
48 |
+
},
|
49 |
+
"sep_token_id": 50282,
|
50 |
+
"sparse_pred_ignore_index": -100,
|
51 |
+
"sparse_prediction": false,
|
52 |
+
"torch_dtype": "float32",
|
53 |
+
"transformers_version": "4.53.2",
|
54 |
+
"vocab_size": 52000
|
55 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ebd8034784cd34d437731f89cb0c9a2e59b167a87220bc31fb703c0411dd55bd
|
3 |
+
size 603450212
|
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": true,
|
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,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "<|padding|>",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"1": {
|
12 |
+
"content": "<|endoftext|>",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"2": {
|
20 |
+
"content": "[UNK]",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"3": {
|
28 |
+
"content": "[CLS]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"4": {
|
36 |
+
"content": "[SEP]",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
},
|
43 |
+
"5": {
|
44 |
+
"content": "[PAD]",
|
45 |
+
"lstrip": false,
|
46 |
+
"normalized": false,
|
47 |
+
"rstrip": false,
|
48 |
+
"single_word": false,
|
49 |
+
"special": true
|
50 |
+
},
|
51 |
+
"6": {
|
52 |
+
"content": "[MASK]",
|
53 |
+
"lstrip": true,
|
54 |
+
"normalized": false,
|
55 |
+
"rstrip": false,
|
56 |
+
"single_word": false,
|
57 |
+
"special": true
|
58 |
+
}
|
59 |
+
},
|
60 |
+
"clean_up_tokenization_spaces": true,
|
61 |
+
"cls_token": "[CLS]",
|
62 |
+
"extra_special_tokens": {},
|
63 |
+
"mask_token": "[MASK]",
|
64 |
+
"model_input_names": [
|
65 |
+
"input_ids",
|
66 |
+
"attention_mask"
|
67 |
+
],
|
68 |
+
"model_max_length": 8192,
|
69 |
+
"pad_token": "[PAD]",
|
70 |
+
"sep_token": "[SEP]",
|
71 |
+
"tokenizer_class": "PreTrainedTokenizerFast",
|
72 |
+
"unk_token": "[UNK]"
|
73 |
+
}
|