Text Ranking
sentence-transformers
Safetensors
deberta-v2
cross-encoder
reranker
Generated from Trainer
dataset_size:7419
loss:BinaryCrossEntropyLoss
Eval Results (legacy)
text-embeddings-inference
Instructions to use ColeH0415/comp90042-crossencoder-factcheck with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use ColeH0415/comp90042-crossencoder-factcheck with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("ColeH0415/comp90042-crossencoder-factcheck") query = "Which planet is known as the Red Planet?" passages = [ "Venus is often called Earth's twin because of its similar size and proximity.", "Mars, known for its reddish appearance, is often referred to as the Red Planet.", "Jupiter, the largest planet in our solar system, has a prominent red spot.", "Saturn, famous for its rings, is sometimes mistaken for the Red Planet." ] scores = model.predict([(query, passage) for passage in passages]) print(scores) - Notebooks
- Google Colab
- Kaggle
CE fine-tuned epoch 1/3
Browse files- README.md +368 -0
- config.json +36 -0
- config_sentence_transformers.json +11 -0
- eval/CrossEncoderClassificationEvaluator_ce-val_results.csv +2 -0
- model.safetensors +3 -0
- modules.json +8 -0
- sentence_bert_config.json +10 -0
- tokenizer.json +0 -0
- tokenizer_config.json +18 -0
README.md
ADDED
|
@@ -0,0 +1,368 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- sentence-transformers
|
| 4 |
+
- cross-encoder
|
| 5 |
+
- reranker
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
- dataset_size:4815
|
| 8 |
+
- loss:BinaryCrossEntropyLoss
|
| 9 |
+
base_model: cross-encoder/ms-marco-MiniLM-L6-v2
|
| 10 |
+
pipeline_tag: text-ranking
|
| 11 |
+
library_name: sentence-transformers
|
| 12 |
+
metrics:
|
| 13 |
+
- accuracy
|
| 14 |
+
- accuracy_threshold
|
| 15 |
+
- f1
|
| 16 |
+
- f1_threshold
|
| 17 |
+
- precision
|
| 18 |
+
- recall
|
| 19 |
+
- average_precision
|
| 20 |
+
model-index:
|
| 21 |
+
- name: CrossEncoder based on cross-encoder/ms-marco-MiniLM-L6-v2
|
| 22 |
+
results:
|
| 23 |
+
- task:
|
| 24 |
+
type: cross-encoder-binary-classification
|
| 25 |
+
name: Cross Encoder Binary Classification
|
| 26 |
+
dataset:
|
| 27 |
+
name: ce val
|
| 28 |
+
type: ce-val
|
| 29 |
+
metrics:
|
| 30 |
+
- type: accuracy
|
| 31 |
+
value: 0.8130841121495327
|
| 32 |
+
name: Accuracy
|
| 33 |
+
- type: accuracy_threshold
|
| 34 |
+
value: -0.2579485774040222
|
| 35 |
+
name: Accuracy Threshold
|
| 36 |
+
- type: f1
|
| 37 |
+
value: 0.8845265588914549
|
| 38 |
+
name: F1
|
| 39 |
+
- type: f1_threshold
|
| 40 |
+
value: -0.43757033348083496
|
| 41 |
+
name: F1 Threshold
|
| 42 |
+
- type: precision
|
| 43 |
+
value: 0.8362445414847162
|
| 44 |
+
name: Precision
|
| 45 |
+
- type: recall
|
| 46 |
+
value: 0.9387254901960784
|
| 47 |
+
name: Recall
|
| 48 |
+
- type: average_precision
|
| 49 |
+
value: 0.9335939639352934
|
| 50 |
+
name: Average Precision
|
| 51 |
+
---
|
| 52 |
+
|
| 53 |
+
# CrossEncoder based on cross-encoder/ms-marco-MiniLM-L6-v2
|
| 54 |
+
|
| 55 |
+
This is a [Cross Encoder](https://www.sbert.net/docs/cross_encoder/usage/usage.html) model finetuned from [cross-encoder/ms-marco-MiniLM-L6-v2](https://huggingface.co/cross-encoder/ms-marco-MiniLM-L6-v2) 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.
|
| 56 |
+
|
| 57 |
+
## Model Details
|
| 58 |
+
|
| 59 |
+
### Model Description
|
| 60 |
+
- **Model Type:** Cross Encoder
|
| 61 |
+
- **Base model:** [cross-encoder/ms-marco-MiniLM-L6-v2](https://huggingface.co/cross-encoder/ms-marco-MiniLM-L6-v2) <!-- at revision c5ee24cb16019beea0893ab7796b1df96625c6b8 -->
|
| 62 |
+
- **Maximum Sequence Length:** 512 tokens
|
| 63 |
+
- **Number of Output Labels:** 1 label
|
| 64 |
+
- **Supported Modality:** Text
|
| 65 |
+
<!-- - **Training Dataset:** Unknown -->
|
| 66 |
+
<!-- - **Language:** Unknown -->
|
| 67 |
+
<!-- - **License:** Unknown -->
|
| 68 |
+
|
| 69 |
+
### Model Sources
|
| 70 |
+
|
| 71 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
| 72 |
+
- **Documentation:** [Cross Encoder Documentation](https://www.sbert.net/docs/cross_encoder/usage/usage.html)
|
| 73 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
|
| 74 |
+
- **Hugging Face:** [Cross Encoders on Hugging Face](https://huggingface.co/models?library=sentence-transformers&other=cross-encoder)
|
| 75 |
+
|
| 76 |
+
### Full Model Architecture
|
| 77 |
+
|
| 78 |
+
```
|
| 79 |
+
CrossEncoder(
|
| 80 |
+
(0): Transformer({'transformer_task': 'sequence-classification', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'logits'}}, 'module_output_name': 'scores', 'architecture': 'BertForSequenceClassification'})
|
| 81 |
+
)
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
## Usage
|
| 85 |
+
|
| 86 |
+
### Direct Usage (Sentence Transformers)
|
| 87 |
+
|
| 88 |
+
First install the Sentence Transformers library:
|
| 89 |
+
|
| 90 |
+
```bash
|
| 91 |
+
pip install -U sentence-transformers
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
Then you can load this model and run inference.
|
| 95 |
+
```python
|
| 96 |
+
from sentence_transformers import CrossEncoder
|
| 97 |
+
|
| 98 |
+
# Download from the 🤗 Hub
|
| 99 |
+
model = CrossEncoder("cross_encoder_model_id")
|
| 100 |
+
# Get scores for pairs of inputs
|
| 101 |
+
pairs = [
|
| 102 |
+
['Yet a study published just this week, by the Bjerknes Centre for Climate Research in Bergen, Norway, found that the natural climate system can change abruptly, without the need for any external forces.', "Analysis of the layering and chemical composition of the cores has provided a revolutionary new record of climate change in the Northern Hemisphere going back about 100,000\xa0years and illustrated that the world's weather and temperature have often shifted rapidly from one seemingly stable state to another, with worldwide consequences."],
|
| 103 |
+
['Schmittner finds low climate sensitivity.', 'Herbaceous perennials are also able to tolerate the extremes of cold in temperate and Arctic winters, with less sensitivity than trees or shrubs.'],
|
| 104 |
+
['Meeting the 2025 emissions reduction target alone could subtract $250 billion from our GDP and eliminate 2.7 million jobs.', 'Judging by the continued growth in the Renewable Fuel Standard and the extension of the biodiesel tax incentive, the number of jobs can increase to 50,725, $2.7 billion in income, and reaching $5 billion in GDP by 2012 and 2013.'],
|
| 105 |
+
['Preventing global warming is relatively cheap; business-as-usual will cause accelerating climate damage costs that economists struggle to even estimate.', 'Researchers have warned that current economic modeling may seriously underestimate the impact of potentially catastrophic climate change and point to the need for new models that give a more accurate picture of potential damages.'],
|
| 106 |
+
['Domino-effect of climate events could move Earth into a ‘hothouse’ state', 'This one change creates a domino effect which alters many events and characters in the DC Universe.'],
|
| 107 |
+
]
|
| 108 |
+
scores = model.predict(pairs)
|
| 109 |
+
print(scores)
|
| 110 |
+
# [ 3.0222 1.1202 2.4127 1.3557 -0.496 ]
|
| 111 |
+
|
| 112 |
+
# Or rank different texts based on similarity to a single text
|
| 113 |
+
ranks = model.rank(
|
| 114 |
+
'Yet a study published just this week, by the Bjerknes Centre for Climate Research in Bergen, Norway, found that the natural climate system can change abruptly, without the need for any external forces.',
|
| 115 |
+
[
|
| 116 |
+
"Analysis of the layering and chemical composition of the cores has provided a revolutionary new record of climate change in the Northern Hemisphere going back about 100,000\xa0years and illustrated that the world's weather and temperature have often shifted rapidly from one seemingly stable state to another, with worldwide consequences.",
|
| 117 |
+
'Herbaceous perennials are also able to tolerate the extremes of cold in temperate and Arctic winters, with less sensitivity than trees or shrubs.',
|
| 118 |
+
'Judging by the continued growth in the Renewable Fuel Standard and the extension of the biodiesel tax incentive, the number of jobs can increase to 50,725, $2.7 billion in income, and reaching $5 billion in GDP by 2012 and 2013.',
|
| 119 |
+
'Researchers have warned that current economic modeling may seriously underestimate the impact of potentially catastrophic climate change and point to the need for new models that give a more accurate picture of potential damages.',
|
| 120 |
+
'This one change creates a domino effect which alters many events and characters in the DC Universe.',
|
| 121 |
+
]
|
| 122 |
+
)
|
| 123 |
+
# [{'corpus_id': ..., 'score': ...}, {'corpus_id': ..., 'score': ...}, ...]
|
| 124 |
+
```
|
| 125 |
+
|
| 126 |
+
<!--
|
| 127 |
+
### Direct Usage (Transformers)
|
| 128 |
+
|
| 129 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 130 |
+
|
| 131 |
+
</details>
|
| 132 |
+
-->
|
| 133 |
+
|
| 134 |
+
<!--
|
| 135 |
+
### Downstream Usage (Sentence Transformers)
|
| 136 |
+
|
| 137 |
+
You can finetune this model on your own dataset.
|
| 138 |
+
|
| 139 |
+
<details><summary>Click to expand</summary>
|
| 140 |
+
|
| 141 |
+
</details>
|
| 142 |
+
-->
|
| 143 |
+
|
| 144 |
+
<!--
|
| 145 |
+
### Out-of-Scope Use
|
| 146 |
+
|
| 147 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 148 |
+
-->
|
| 149 |
+
|
| 150 |
+
## Evaluation
|
| 151 |
+
|
| 152 |
+
### Metrics
|
| 153 |
+
|
| 154 |
+
#### Cross Encoder Binary Classification
|
| 155 |
+
|
| 156 |
+
* Dataset: `ce-val`
|
| 157 |
+
* Evaluated with [<code>CEBinaryClassificationEvaluator</code>](https://sbert.net/docs/package_reference/cross_encoder/evaluation.html#sentence_transformers.cross_encoder.evaluation.CEBinaryClassificationEvaluator)
|
| 158 |
+
|
| 159 |
+
| Metric | Value |
|
| 160 |
+
|:----------------------|:-----------|
|
| 161 |
+
| accuracy | 0.8131 |
|
| 162 |
+
| accuracy_threshold | -0.2579 |
|
| 163 |
+
| f1 | 0.8845 |
|
| 164 |
+
| f1_threshold | -0.4376 |
|
| 165 |
+
| precision | 0.8362 |
|
| 166 |
+
| recall | 0.9387 |
|
| 167 |
+
| **average_precision** | **0.9336** |
|
| 168 |
+
|
| 169 |
+
<!--
|
| 170 |
+
## Bias, Risks and Limitations
|
| 171 |
+
|
| 172 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 173 |
+
-->
|
| 174 |
+
|
| 175 |
+
<!--
|
| 176 |
+
### Recommendations
|
| 177 |
+
|
| 178 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 179 |
+
-->
|
| 180 |
+
|
| 181 |
+
## Training Details
|
| 182 |
+
|
| 183 |
+
### Training Dataset
|
| 184 |
+
|
| 185 |
+
#### Unnamed Dataset
|
| 186 |
+
|
| 187 |
+
* Size: 4,815 training samples
|
| 188 |
+
* Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>label</code>
|
| 189 |
+
* Approximate statistics based on the first 1000 samples:
|
| 190 |
+
| | sentence_0 | sentence_1 | label |
|
| 191 |
+
|:--------|:---------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:---------------------------------------------------------------|
|
| 192 |
+
| type | string | string | float |
|
| 193 |
+
| details | <ul><li>min: 7 tokens</li><li>mean: 26.5 tokens</li><li>max: 66 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 34.21 tokens</li><li>max: 333 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.77</li><li>max: 1.0</li></ul> |
|
| 194 |
+
* Samples:
|
| 195 |
+
| sentence_0 | sentence_1 | label |
|
| 196 |
+
|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------|
|
| 197 |
+
| <code>Yet a study published just this week, by the Bjerknes Centre for Climate Research in Bergen, Norway, found that the natural climate system can change abruptly, without the need for any external forces.</code> | <code>Analysis of the layering and chemical composition of the cores has provided a revolutionary new record of climate change in the Northern Hemisphere going back about 100,000 years and illustrated that the world's weather and temperature have often shifted rapidly from one seemingly stable state to another, with worldwide consequences.</code> | <code>1.0</code> |
|
| 198 |
+
| <code>Schmittner finds low climate sensitivity.</code> | <code>Herbaceous perennials are also able to tolerate the extremes of cold in temperate and Arctic winters, with less sensitivity than trees or shrubs.</code> | <code>1.0</code> |
|
| 199 |
+
| <code>Meeting the 2025 emissions reduction target alone could subtract $250 billion from our GDP and eliminate 2.7 million jobs.</code> | <code>Judging by the continued growth in the Renewable Fuel Standard and the extension of the biodiesel tax incentive, the number of jobs can increase to 50,725, $2.7 billion in income, and reaching $5 billion in GDP by 2012 and 2013.</code> | <code>1.0</code> |
|
| 200 |
+
* Loss: [<code>BinaryCrossEntropyLoss</code>](https://sbert.net/docs/package_reference/cross_encoder/losses.html#binarycrossentropyloss) with these parameters:
|
| 201 |
+
```json
|
| 202 |
+
{
|
| 203 |
+
"activation_fn": "torch.nn.modules.linear.Identity",
|
| 204 |
+
"pos_weight": null
|
| 205 |
+
}
|
| 206 |
+
```
|
| 207 |
+
|
| 208 |
+
### Training Hyperparameters
|
| 209 |
+
#### Non-Default Hyperparameters
|
| 210 |
+
|
| 211 |
+
- `per_device_train_batch_size`: 16
|
| 212 |
+
- `per_device_eval_batch_size`: 16
|
| 213 |
+
- `num_train_epochs`: 1
|
| 214 |
+
|
| 215 |
+
#### All Hyperparameters
|
| 216 |
+
<details><summary>Click to expand</summary>
|
| 217 |
+
|
| 218 |
+
- `do_predict`: False
|
| 219 |
+
- `prediction_loss_only`: True
|
| 220 |
+
- `per_device_train_batch_size`: 16
|
| 221 |
+
- `per_device_eval_batch_size`: 16
|
| 222 |
+
- `gradient_accumulation_steps`: 1
|
| 223 |
+
- `eval_accumulation_steps`: None
|
| 224 |
+
- `torch_empty_cache_steps`: None
|
| 225 |
+
- `learning_rate`: 5e-05
|
| 226 |
+
- `weight_decay`: 0.0
|
| 227 |
+
- `adam_beta1`: 0.9
|
| 228 |
+
- `adam_beta2`: 0.999
|
| 229 |
+
- `adam_epsilon`: 1e-08
|
| 230 |
+
- `max_grad_norm`: 1
|
| 231 |
+
- `num_train_epochs`: 1
|
| 232 |
+
- `max_steps`: -1
|
| 233 |
+
- `lr_scheduler_type`: linear
|
| 234 |
+
- `lr_scheduler_kwargs`: None
|
| 235 |
+
- `warmup_ratio`: None
|
| 236 |
+
- `warmup_steps`: 0
|
| 237 |
+
- `log_level`: passive
|
| 238 |
+
- `log_level_replica`: warning
|
| 239 |
+
- `log_on_each_node`: True
|
| 240 |
+
- `logging_nan_inf_filter`: True
|
| 241 |
+
- `enable_jit_checkpoint`: False
|
| 242 |
+
- `save_on_each_node`: False
|
| 243 |
+
- `save_only_model`: False
|
| 244 |
+
- `restore_callback_states_from_checkpoint`: False
|
| 245 |
+
- `use_cpu`: False
|
| 246 |
+
- `seed`: 42
|
| 247 |
+
- `data_seed`: None
|
| 248 |
+
- `bf16`: False
|
| 249 |
+
- `fp16`: False
|
| 250 |
+
- `bf16_full_eval`: False
|
| 251 |
+
- `fp16_full_eval`: False
|
| 252 |
+
- `tf32`: None
|
| 253 |
+
- `local_rank`: -1
|
| 254 |
+
- `ddp_backend`: None
|
| 255 |
+
- `debug`: []
|
| 256 |
+
- `dataloader_drop_last`: False
|
| 257 |
+
- `dataloader_num_workers`: 0
|
| 258 |
+
- `dataloader_prefetch_factor`: None
|
| 259 |
+
- `disable_tqdm`: False
|
| 260 |
+
- `remove_unused_columns`: True
|
| 261 |
+
- `label_names`: None
|
| 262 |
+
- `load_best_model_at_end`: False
|
| 263 |
+
- `ignore_data_skip`: False
|
| 264 |
+
- `fsdp`: []
|
| 265 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
| 266 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
| 267 |
+
- `parallelism_config`: None
|
| 268 |
+
- `deepspeed`: None
|
| 269 |
+
- `label_smoothing_factor`: 0.0
|
| 270 |
+
- `optim`: adamw_torch_fused
|
| 271 |
+
- `optim_args`: None
|
| 272 |
+
- `group_by_length`: False
|
| 273 |
+
- `length_column_name`: length
|
| 274 |
+
- `project`: huggingface
|
| 275 |
+
- `trackio_space_id`: trackio
|
| 276 |
+
- `ddp_find_unused_parameters`: None
|
| 277 |
+
- `ddp_bucket_cap_mb`: None
|
| 278 |
+
- `ddp_broadcast_buffers`: False
|
| 279 |
+
- `dataloader_pin_memory`: True
|
| 280 |
+
- `dataloader_persistent_workers`: False
|
| 281 |
+
- `skip_memory_metrics`: True
|
| 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_for_metrics`: []
|
| 292 |
+
- `eval_do_concat_batches`: True
|
| 293 |
+
- `auto_find_batch_size`: False
|
| 294 |
+
- `full_determinism`: False
|
| 295 |
+
- `ddp_timeout`: 1800
|
| 296 |
+
- `torch_compile`: False
|
| 297 |
+
- `torch_compile_backend`: None
|
| 298 |
+
- `torch_compile_mode`: None
|
| 299 |
+
- `include_num_input_tokens_seen`: no
|
| 300 |
+
- `neftune_noise_alpha`: None
|
| 301 |
+
- `optim_target_modules`: None
|
| 302 |
+
- `batch_eval_metrics`: False
|
| 303 |
+
- `eval_on_start`: False
|
| 304 |
+
- `use_liger_kernel`: False
|
| 305 |
+
- `liger_kernel_config`: None
|
| 306 |
+
- `eval_use_gather_object`: False
|
| 307 |
+
- `average_tokens_across_devices`: True
|
| 308 |
+
- `use_cache`: False
|
| 309 |
+
- `prompts`: None
|
| 310 |
+
- `batch_sampler`: batch_sampler
|
| 311 |
+
- `multi_dataset_batch_sampler`: proportional
|
| 312 |
+
- `router_mapping`: {}
|
| 313 |
+
- `learning_rate_mapping`: {}
|
| 314 |
+
|
| 315 |
+
</details>
|
| 316 |
+
|
| 317 |
+
### Training Logs
|
| 318 |
+
| Epoch | Step | ce-val_average_precision |
|
| 319 |
+
|:-----:|:----:|:------------------------:|
|
| 320 |
+
| 1.0 | 301 | 0.9336 |
|
| 321 |
+
|
| 322 |
+
|
| 323 |
+
### Training Time
|
| 324 |
+
- **Training**: 24.8 seconds
|
| 325 |
+
|
| 326 |
+
### Framework Versions
|
| 327 |
+
- Python: 3.12.13
|
| 328 |
+
- Sentence Transformers: 5.4.1
|
| 329 |
+
- Transformers: 5.0.0
|
| 330 |
+
- PyTorch: 2.10.0+cu128
|
| 331 |
+
- Accelerate: 1.13.0
|
| 332 |
+
- Datasets: 4.0.0
|
| 333 |
+
- Tokenizers: 0.22.2
|
| 334 |
+
|
| 335 |
+
## Citation
|
| 336 |
+
|
| 337 |
+
### BibTeX
|
| 338 |
+
|
| 339 |
+
#### Sentence Transformers
|
| 340 |
+
```bibtex
|
| 341 |
+
@inproceedings{reimers-2019-sentence-bert,
|
| 342 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
| 343 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
| 344 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
| 345 |
+
month = "11",
|
| 346 |
+
year = "2019",
|
| 347 |
+
publisher = "Association for Computational Linguistics",
|
| 348 |
+
url = "https://arxiv.org/abs/1908.10084",
|
| 349 |
+
}
|
| 350 |
+
```
|
| 351 |
+
|
| 352 |
+
<!--
|
| 353 |
+
## Glossary
|
| 354 |
+
|
| 355 |
+
*Clearly define terms in order to be accessible across audiences.*
|
| 356 |
+
-->
|
| 357 |
+
|
| 358 |
+
<!--
|
| 359 |
+
## Model Card Authors
|
| 360 |
+
|
| 361 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 362 |
+
-->
|
| 363 |
+
|
| 364 |
+
<!--
|
| 365 |
+
## Model Card Contact
|
| 366 |
+
|
| 367 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 368 |
+
-->
|
config.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_cross_attention": false,
|
| 3 |
+
"architectures": [
|
| 4 |
+
"BertForSequenceClassification"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"bos_token_id": null,
|
| 8 |
+
"classifier_dropout": null,
|
| 9 |
+
"dtype": "float32",
|
| 10 |
+
"eos_token_id": null,
|
| 11 |
+
"gradient_checkpointing": false,
|
| 12 |
+
"hidden_act": "gelu",
|
| 13 |
+
"hidden_dropout_prob": 0.1,
|
| 14 |
+
"hidden_size": 384,
|
| 15 |
+
"id2label": {
|
| 16 |
+
"0": "LABEL_0"
|
| 17 |
+
},
|
| 18 |
+
"initializer_range": 0.02,
|
| 19 |
+
"intermediate_size": 1536,
|
| 20 |
+
"is_decoder": false,
|
| 21 |
+
"label2id": {
|
| 22 |
+
"LABEL_0": 0
|
| 23 |
+
},
|
| 24 |
+
"layer_norm_eps": 1e-12,
|
| 25 |
+
"max_position_embeddings": 512,
|
| 26 |
+
"model_type": "bert",
|
| 27 |
+
"num_attention_heads": 12,
|
| 28 |
+
"num_hidden_layers": 6,
|
| 29 |
+
"pad_token_id": 0,
|
| 30 |
+
"position_embedding_type": "absolute",
|
| 31 |
+
"tie_word_embeddings": true,
|
| 32 |
+
"transformers_version": "5.0.0",
|
| 33 |
+
"type_vocab_size": 2,
|
| 34 |
+
"use_cache": false,
|
| 35 |
+
"vocab_size": 30522
|
| 36 |
+
}
|
config_sentence_transformers.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"__version__": {
|
| 3 |
+
"pytorch": "2.10.0+cu128",
|
| 4 |
+
"sentence_transformers": "5.4.1",
|
| 5 |
+
"transformers": "5.0.0"
|
| 6 |
+
},
|
| 7 |
+
"activation_fn": "torch.nn.modules.linear.Identity",
|
| 8 |
+
"default_prompt_name": null,
|
| 9 |
+
"model_type": "CrossEncoder",
|
| 10 |
+
"prompts": {}
|
| 11 |
+
}
|
eval/CrossEncoderClassificationEvaluator_ce-val_results.csv
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
epoch,steps,Accuracy,Accuracy_Threshold,F1,F1_Threshold,Precision,Recall,Average_Precision
|
| 2 |
+
1.0,301,0.8130841121495327,-0.25794858,0.8845265588914549,-0.43757033,0.8362445414847162,0.9387254901960784,0.9335939639352934
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:160442534ea4f7d804bce531ea9d64d7765f92e6df6c366ebfb0002c2043e133
|
| 3 |
+
size 90866404
|
modules.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"idx": 0,
|
| 4 |
+
"name": "0",
|
| 5 |
+
"path": "",
|
| 6 |
+
"type": "sentence_transformers.base.modules.transformer.Transformer"
|
| 7 |
+
}
|
| 8 |
+
]
|
sentence_bert_config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"transformer_task": "sequence-classification",
|
| 3 |
+
"modality_config": {
|
| 4 |
+
"text": {
|
| 5 |
+
"method": "forward",
|
| 6 |
+
"method_output_name": "logits"
|
| 7 |
+
}
|
| 8 |
+
},
|
| 9 |
+
"module_output_name": "scores"
|
| 10 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"clean_up_tokenization_spaces": true,
|
| 4 |
+
"cls_token": "[CLS]",
|
| 5 |
+
"do_basic_tokenize": true,
|
| 6 |
+
"do_lower_case": true,
|
| 7 |
+
"is_local": false,
|
| 8 |
+
"mask_token": "[MASK]",
|
| 9 |
+
"model_max_length": 512,
|
| 10 |
+
"model_specific_special_tokens": {},
|
| 11 |
+
"never_split": null,
|
| 12 |
+
"pad_token": "[PAD]",
|
| 13 |
+
"sep_token": "[SEP]",
|
| 14 |
+
"strip_accents": null,
|
| 15 |
+
"tokenize_chinese_chars": true,
|
| 16 |
+
"tokenizer_class": "BertTokenizer",
|
| 17 |
+
"unk_token": "[UNK]"
|
| 18 |
+
}
|