Add new CrossEncoder model
Browse files- README.md +425 -0
- config.json +35 -0
- model.safetensors +3 -0
- special_tokens_map.json +37 -0
- tokenizer.json +0 -0
- tokenizer_config.json +65 -0
- vocab.txt +0 -0
README.md
ADDED
|
@@ -0,0 +1,425 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- sentence-transformers
|
| 4 |
+
- cross-encoder
|
| 5 |
+
- generated_from_trainer
|
| 6 |
+
- dataset_size:18549
|
| 7 |
+
- loss:BinaryCrossEntropyLoss
|
| 8 |
+
base_model: cross-encoder/ms-marco-MiniLM-L6-v2
|
| 9 |
+
datasets:
|
| 10 |
+
- CharlesPing/climate-cross-encoder-mixed-neg-v1
|
| 11 |
+
pipeline_tag: text-ranking
|
| 12 |
+
library_name: sentence-transformers
|
| 13 |
+
metrics:
|
| 14 |
+
- map
|
| 15 |
+
- mrr@10
|
| 16 |
+
- ndcg@10
|
| 17 |
+
model-index:
|
| 18 |
+
- name: CrossEncoder based on cross-encoder/ms-marco-MiniLM-L6-v2
|
| 19 |
+
results:
|
| 20 |
+
- task:
|
| 21 |
+
type: cross-encoder-reranking
|
| 22 |
+
name: Cross Encoder Reranking
|
| 23 |
+
dataset:
|
| 24 |
+
name: climate rerank multineg
|
| 25 |
+
type: climate-rerank-multineg
|
| 26 |
+
metrics:
|
| 27 |
+
- type: map
|
| 28 |
+
value: 0.9339128697042365
|
| 29 |
+
name: Map
|
| 30 |
+
- type: mrr@10
|
| 31 |
+
value: 0.9415467625899281
|
| 32 |
+
name: Mrr@10
|
| 33 |
+
- type: ndcg@10
|
| 34 |
+
value: 0.9532837597926094
|
| 35 |
+
name: Ndcg@10
|
| 36 |
+
---
|
| 37 |
+
|
| 38 |
+
# CrossEncoder based on cross-encoder/ms-marco-MiniLM-L6-v2
|
| 39 |
+
|
| 40 |
+
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) on the [climate-cross-encoder-mixed-neg-v1](https://huggingface.co/datasets/CharlesPing/climate-cross-encoder-mixed-neg-v1) dataset 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.
|
| 41 |
+
|
| 42 |
+
## Model Details
|
| 43 |
+
|
| 44 |
+
### Model Description
|
| 45 |
+
- **Model Type:** Cross Encoder
|
| 46 |
+
- **Base model:** [cross-encoder/ms-marco-MiniLM-L6-v2](https://huggingface.co/cross-encoder/ms-marco-MiniLM-L6-v2) <!-- at revision ce0834f22110de6d9222af7a7a03628121708969 -->
|
| 47 |
+
- **Maximum Sequence Length:** 512 tokens
|
| 48 |
+
- **Number of Output Labels:** 1 label
|
| 49 |
+
- **Training Dataset:**
|
| 50 |
+
- [climate-cross-encoder-mixed-neg-v1](https://huggingface.co/datasets/CharlesPing/climate-cross-encoder-mixed-neg-v1)
|
| 51 |
+
<!-- - **Language:** Unknown -->
|
| 52 |
+
<!-- - **License:** Unknown -->
|
| 53 |
+
|
| 54 |
+
### Model Sources
|
| 55 |
+
|
| 56 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
| 57 |
+
- **Documentation:** [Cross Encoder Documentation](https://www.sbert.net/docs/cross_encoder/usage/usage.html)
|
| 58 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
| 59 |
+
- **Hugging Face:** [Cross Encoders on Hugging Face](https://huggingface.co/models?library=sentence-transformers&other=cross-encoder)
|
| 60 |
+
|
| 61 |
+
## Usage
|
| 62 |
+
|
| 63 |
+
### Direct Usage (Sentence Transformers)
|
| 64 |
+
|
| 65 |
+
First install the Sentence Transformers library:
|
| 66 |
+
|
| 67 |
+
```bash
|
| 68 |
+
pip install -U sentence-transformers
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
Then you can load this model and run inference.
|
| 72 |
+
```python
|
| 73 |
+
from sentence_transformers import CrossEncoder
|
| 74 |
+
|
| 75 |
+
# Download from the 🤗 Hub
|
| 76 |
+
model = CrossEncoder("CharlesPing/finetuned-ce-climate-multineg-v1")
|
| 77 |
+
# Get scores for pairs of texts
|
| 78 |
+
pairs = [
|
| 79 |
+
['Within a decade, certain kinds of branching and plate coral could be extinct, reef scientists say, along with a variety of small fish that rely on them for protection from predators.', 'They are important apex predators feeding on a wide variety of smaller fish and cephalopods.'],
|
| 80 |
+
['Armed conflicts over resources may become a reality, and have the potential to escalate into nuclear war.', 'The length of the track is 1,000 meters.'],
|
| 81 |
+
['The natural cycle adds and removes CO2 to keep a balance; humans add extra CO2 without removing any.', 'Their post office was established in February 1882 and closed in December 1942'],
|
| 82 |
+
['The atmosphere of the Earth is less able to absorb shortwave radiation from the Sun than thermal radiation coming from the surface.', 'Its fundamental principle is that of balance – the energy that the Earth absorbs from the sun each year is equal to that which it loses to space by radiation.'],
|
| 83 |
+
['But then, just over a year ago, Mike Wallace, a hydrologist with 30 years’ experience, noticed while researching his PhD that they had omitted some key information[…] his results were surprising: there has been no reduction in oceanic pH', 'It is also known for its Kampot fish sauce and durian.'],
|
| 84 |
+
]
|
| 85 |
+
scores = model.predict(pairs)
|
| 86 |
+
print(scores.shape)
|
| 87 |
+
# (5,)
|
| 88 |
+
|
| 89 |
+
# Or rank different texts based on similarity to a single text
|
| 90 |
+
ranks = model.rank(
|
| 91 |
+
'Within a decade, certain kinds of branching and plate coral could be extinct, reef scientists say, along with a variety of small fish that rely on them for protection from predators.',
|
| 92 |
+
[
|
| 93 |
+
'They are important apex predators feeding on a wide variety of smaller fish and cephalopods.',
|
| 94 |
+
'The length of the track is 1,000 meters.',
|
| 95 |
+
'Their post office was established in February 1882 and closed in December 1942',
|
| 96 |
+
'Its fundamental principle is that of balance – the energy that the Earth absorbs from the sun each year is equal to that which it loses to space by radiation.',
|
| 97 |
+
'It is also known for its Kampot fish sauce and durian.',
|
| 98 |
+
]
|
| 99 |
+
)
|
| 100 |
+
# [{'corpus_id': ..., 'score': ...}, {'corpus_id': ..., 'score': ...}, ...]
|
| 101 |
+
```
|
| 102 |
+
|
| 103 |
+
<!--
|
| 104 |
+
### Direct Usage (Transformers)
|
| 105 |
+
|
| 106 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 107 |
+
|
| 108 |
+
</details>
|
| 109 |
+
-->
|
| 110 |
+
|
| 111 |
+
<!--
|
| 112 |
+
### Downstream Usage (Sentence Transformers)
|
| 113 |
+
|
| 114 |
+
You can finetune this model on your own dataset.
|
| 115 |
+
|
| 116 |
+
<details><summary>Click to expand</summary>
|
| 117 |
+
|
| 118 |
+
</details>
|
| 119 |
+
-->
|
| 120 |
+
|
| 121 |
+
<!--
|
| 122 |
+
### Out-of-Scope Use
|
| 123 |
+
|
| 124 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 125 |
+
-->
|
| 126 |
+
|
| 127 |
+
## Evaluation
|
| 128 |
+
|
| 129 |
+
### Metrics
|
| 130 |
+
|
| 131 |
+
#### Cross Encoder Reranking
|
| 132 |
+
|
| 133 |
+
* Dataset: `climate-rerank-multineg`
|
| 134 |
+
* Evaluated with [<code>CrossEncoderRerankingEvaluator</code>](https://sbert.net/docs/package_reference/cross_encoder/evaluation.html#sentence_transformers.cross_encoder.evaluation.CrossEncoderRerankingEvaluator) with these parameters:
|
| 135 |
+
```json
|
| 136 |
+
{
|
| 137 |
+
"at_k": 10
|
| 138 |
+
}
|
| 139 |
+
```
|
| 140 |
+
|
| 141 |
+
| Metric | Value |
|
| 142 |
+
|:------------|:-----------|
|
| 143 |
+
| map | 0.9339 |
|
| 144 |
+
| mrr@10 | 0.9415 |
|
| 145 |
+
| **ndcg@10** | **0.9533** |
|
| 146 |
+
|
| 147 |
+
<!--
|
| 148 |
+
## Bias, Risks and Limitations
|
| 149 |
+
|
| 150 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 151 |
+
-->
|
| 152 |
+
|
| 153 |
+
<!--
|
| 154 |
+
### Recommendations
|
| 155 |
+
|
| 156 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 157 |
+
-->
|
| 158 |
+
|
| 159 |
+
## Training Details
|
| 160 |
+
|
| 161 |
+
### Training Dataset
|
| 162 |
+
|
| 163 |
+
#### climate-cross-encoder-mixed-neg-v1
|
| 164 |
+
|
| 165 |
+
* Dataset: [climate-cross-encoder-mixed-neg-v1](https://huggingface.co/datasets/CharlesPing/climate-cross-encoder-mixed-neg-v1) at [7ee5ee6](https://huggingface.co/datasets/CharlesPing/climate-cross-encoder-mixed-neg-v1/tree/7ee5ee6e1a6c7731a99935bf686edaf21ad91f0c)
|
| 166 |
+
* Size: 18,549 training samples
|
| 167 |
+
* Columns: <code>query</code>, <code>doc</code>, and <code>label</code>
|
| 168 |
+
* Approximate statistics based on the first 1000 samples:
|
| 169 |
+
| | query | doc | label |
|
| 170 |
+
|:--------|:-------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------|:---------------------------------------------------------------|
|
| 171 |
+
| type | string | string | float |
|
| 172 |
+
| details | <ul><li>min: 26 characters</li><li>mean: 123.32 characters</li><li>max: 332 characters</li></ul> | <ul><li>min: 20 characters</li><li>mean: 144.94 characters</li><li>max: 1979 characters</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.21</li><li>max: 1.0</li></ul> |
|
| 173 |
+
* Samples:
|
| 174 |
+
| query | doc | label |
|
| 175 |
+
|:----------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------|
|
| 176 |
+
| <code>CO2 emissions were much smaller 100 years ago.</code> | <code>For example, in the Internet protocol suite, the contents of a web page are encapsulated with an HTTP header, then by a TCP header, an IP header, and, finally, by a frame header and trailer.</code> | <code>0.0</code> |
|
| 177 |
+
| <code>Though CRU neglected to provide an exact list of temperature stations, it could not have hid or tampered with data.</code> | <code>In Informatics, dummy data is benign information that does not contain any useful data, but serves to reserve space where real data is nominally present.</code> | <code>0.0</code> |
|
| 178 |
+
| <code>Postma's model contains many simple errors; in no way does Postma undermine the existence or necessity of the greenhouse effect.</code> | <code>Arizona State University at the West Campus is one of four university campuses that compose Arizona State University (ASU).</code> | <code>0.0</code> |
|
| 179 |
+
* Loss: [<code>BinaryCrossEntropyLoss</code>](https://sbert.net/docs/package_reference/cross_encoder/losses.html#binarycrossentropyloss) with these parameters:
|
| 180 |
+
```json
|
| 181 |
+
{
|
| 182 |
+
"activation_fn": "torch.nn.modules.linear.Identity",
|
| 183 |
+
"pos_weight": null
|
| 184 |
+
}
|
| 185 |
+
```
|
| 186 |
+
|
| 187 |
+
### Evaluation Dataset
|
| 188 |
+
|
| 189 |
+
#### climate-cross-encoder-mixed-neg-v1
|
| 190 |
+
|
| 191 |
+
* Dataset: [climate-cross-encoder-mixed-neg-v1](https://huggingface.co/datasets/CharlesPing/climate-cross-encoder-mixed-neg-v1) at [7ee5ee6](https://huggingface.co/datasets/CharlesPing/climate-cross-encoder-mixed-neg-v1/tree/7ee5ee6e1a6c7731a99935bf686edaf21ad91f0c)
|
| 192 |
+
* Size: 2,061 evaluation samples
|
| 193 |
+
* Columns: <code>query</code>, <code>doc</code>, and <code>label</code>
|
| 194 |
+
* Approximate statistics based on the first 1000 samples:
|
| 195 |
+
| | query | doc | label |
|
| 196 |
+
|:--------|:-------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------|:---------------------------------------------------------------|
|
| 197 |
+
| type | string | string | float |
|
| 198 |
+
| details | <ul><li>min: 31 characters</li><li>mean: 124.23 characters</li><li>max: 319 characters</li></ul> | <ul><li>min: 9 characters</li><li>mean: 138.92 characters</li><li>max: 851 characters</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.18</li><li>max: 1.0</li></ul> |
|
| 199 |
+
* Samples:
|
| 200 |
+
| query | doc | label |
|
| 201 |
+
|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------|:-----------------|
|
| 202 |
+
| <code>Within a decade, certain kinds of branching and plate coral could be extinct, reef scientists say, along with a variety of small fish that rely on them for protection from predators.</code> | <code>They are important apex predators feeding on a wide variety of smaller fish and cephalopods.</code> | <code>1.0</code> |
|
| 203 |
+
| <code>Armed conflicts over resources may become a reality, and have the potential to escalate into nuclear war.</code> | <code>The length of the track is 1,000 meters.</code> | <code>0.0</code> |
|
| 204 |
+
| <code>The natural cycle adds and removes CO2 to keep a balance; humans add extra CO2 without removing any.</code> | <code>Their post office was established in February 1882 and closed in December 1942</code> | <code>0.0</code> |
|
| 205 |
+
* Loss: [<code>BinaryCrossEntropyLoss</code>](https://sbert.net/docs/package_reference/cross_encoder/losses.html#binarycrossentropyloss) with these parameters:
|
| 206 |
+
```json
|
| 207 |
+
{
|
| 208 |
+
"activation_fn": "torch.nn.modules.linear.Identity",
|
| 209 |
+
"pos_weight": null
|
| 210 |
+
}
|
| 211 |
+
```
|
| 212 |
+
|
| 213 |
+
### Training Hyperparameters
|
| 214 |
+
#### Non-Default Hyperparameters
|
| 215 |
+
|
| 216 |
+
- `eval_strategy`: steps
|
| 217 |
+
- `per_device_train_batch_size`: 16
|
| 218 |
+
- `per_device_eval_batch_size`: 32
|
| 219 |
+
- `learning_rate`: 2e-05
|
| 220 |
+
- `warmup_ratio`: 0.1
|
| 221 |
+
- `load_best_model_at_end`: True
|
| 222 |
+
|
| 223 |
+
#### All Hyperparameters
|
| 224 |
+
<details><summary>Click to expand</summary>
|
| 225 |
+
|
| 226 |
+
- `overwrite_output_dir`: False
|
| 227 |
+
- `do_predict`: False
|
| 228 |
+
- `eval_strategy`: steps
|
| 229 |
+
- `prediction_loss_only`: True
|
| 230 |
+
- `per_device_train_batch_size`: 16
|
| 231 |
+
- `per_device_eval_batch_size`: 32
|
| 232 |
+
- `per_gpu_train_batch_size`: None
|
| 233 |
+
- `per_gpu_eval_batch_size`: None
|
| 234 |
+
- `gradient_accumulation_steps`: 1
|
| 235 |
+
- `eval_accumulation_steps`: None
|
| 236 |
+
- `torch_empty_cache_steps`: None
|
| 237 |
+
- `learning_rate`: 2e-05
|
| 238 |
+
- `weight_decay`: 0.0
|
| 239 |
+
- `adam_beta1`: 0.9
|
| 240 |
+
- `adam_beta2`: 0.999
|
| 241 |
+
- `adam_epsilon`: 1e-08
|
| 242 |
+
- `max_grad_norm`: 1.0
|
| 243 |
+
- `num_train_epochs`: 3
|
| 244 |
+
- `max_steps`: -1
|
| 245 |
+
- `lr_scheduler_type`: linear
|
| 246 |
+
- `lr_scheduler_kwargs`: {}
|
| 247 |
+
- `warmup_ratio`: 0.1
|
| 248 |
+
- `warmup_steps`: 0
|
| 249 |
+
- `log_level`: passive
|
| 250 |
+
- `log_level_replica`: warning
|
| 251 |
+
- `log_on_each_node`: True
|
| 252 |
+
- `logging_nan_inf_filter`: True
|
| 253 |
+
- `save_safetensors`: True
|
| 254 |
+
- `save_on_each_node`: False
|
| 255 |
+
- `save_only_model`: False
|
| 256 |
+
- `restore_callback_states_from_checkpoint`: False
|
| 257 |
+
- `no_cuda`: False
|
| 258 |
+
- `use_cpu`: False
|
| 259 |
+
- `use_mps_device`: False
|
| 260 |
+
- `seed`: 42
|
| 261 |
+
- `data_seed`: None
|
| 262 |
+
- `jit_mode_eval`: False
|
| 263 |
+
- `use_ipex`: False
|
| 264 |
+
- `bf16`: False
|
| 265 |
+
- `fp16`: False
|
| 266 |
+
- `fp16_opt_level`: O1
|
| 267 |
+
- `half_precision_backend`: auto
|
| 268 |
+
- `bf16_full_eval`: False
|
| 269 |
+
- `fp16_full_eval`: False
|
| 270 |
+
- `tf32`: None
|
| 271 |
+
- `local_rank`: 0
|
| 272 |
+
- `ddp_backend`: None
|
| 273 |
+
- `tpu_num_cores`: None
|
| 274 |
+
- `tpu_metrics_debug`: False
|
| 275 |
+
- `debug`: []
|
| 276 |
+
- `dataloader_drop_last`: False
|
| 277 |
+
- `dataloader_num_workers`: 0
|
| 278 |
+
- `dataloader_prefetch_factor`: None
|
| 279 |
+
- `past_index`: -1
|
| 280 |
+
- `disable_tqdm`: False
|
| 281 |
+
- `remove_unused_columns`: True
|
| 282 |
+
- `label_names`: None
|
| 283 |
+
- `load_best_model_at_end`: True
|
| 284 |
+
- `ignore_data_skip`: False
|
| 285 |
+
- `fsdp`: []
|
| 286 |
+
- `fsdp_min_num_params`: 0
|
| 287 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
| 288 |
+
- `tp_size`: 0
|
| 289 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
| 290 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
| 291 |
+
- `deepspeed`: None
|
| 292 |
+
- `label_smoothing_factor`: 0.0
|
| 293 |
+
- `optim`: adamw_torch
|
| 294 |
+
- `optim_args`: None
|
| 295 |
+
- `adafactor`: False
|
| 296 |
+
- `group_by_length`: False
|
| 297 |
+
- `length_column_name`: length
|
| 298 |
+
- `ddp_find_unused_parameters`: None
|
| 299 |
+
- `ddp_bucket_cap_mb`: None
|
| 300 |
+
- `ddp_broadcast_buffers`: False
|
| 301 |
+
- `dataloader_pin_memory`: True
|
| 302 |
+
- `dataloader_persistent_workers`: False
|
| 303 |
+
- `skip_memory_metrics`: True
|
| 304 |
+
- `use_legacy_prediction_loop`: False
|
| 305 |
+
- `push_to_hub`: False
|
| 306 |
+
- `resume_from_checkpoint`: None
|
| 307 |
+
- `hub_model_id`: None
|
| 308 |
+
- `hub_strategy`: every_save
|
| 309 |
+
- `hub_private_repo`: None
|
| 310 |
+
- `hub_always_push`: False
|
| 311 |
+
- `gradient_checkpointing`: False
|
| 312 |
+
- `gradient_checkpointing_kwargs`: None
|
| 313 |
+
- `include_inputs_for_metrics`: False
|
| 314 |
+
- `include_for_metrics`: []
|
| 315 |
+
- `eval_do_concat_batches`: True
|
| 316 |
+
- `fp16_backend`: auto
|
| 317 |
+
- `push_to_hub_model_id`: None
|
| 318 |
+
- `push_to_hub_organization`: None
|
| 319 |
+
- `mp_parameters`:
|
| 320 |
+
- `auto_find_batch_size`: False
|
| 321 |
+
- `full_determinism`: False
|
| 322 |
+
- `torchdynamo`: None
|
| 323 |
+
- `ray_scope`: last
|
| 324 |
+
- `ddp_timeout`: 1800
|
| 325 |
+
- `torch_compile`: False
|
| 326 |
+
- `torch_compile_backend`: None
|
| 327 |
+
- `torch_compile_mode`: None
|
| 328 |
+
- `include_tokens_per_second`: False
|
| 329 |
+
- `include_num_input_tokens_seen`: False
|
| 330 |
+
- `neftune_noise_alpha`: None
|
| 331 |
+
- `optim_target_modules`: None
|
| 332 |
+
- `batch_eval_metrics`: False
|
| 333 |
+
- `eval_on_start`: False
|
| 334 |
+
- `use_liger_kernel`: False
|
| 335 |
+
- `eval_use_gather_object`: False
|
| 336 |
+
- `average_tokens_across_devices`: False
|
| 337 |
+
- `prompts`: None
|
| 338 |
+
- `batch_sampler`: batch_sampler
|
| 339 |
+
- `multi_dataset_batch_sampler`: proportional
|
| 340 |
+
|
| 341 |
+
</details>
|
| 342 |
+
|
| 343 |
+
### Training Logs
|
| 344 |
+
| Epoch | Step | Training Loss | Validation Loss | climate-rerank-multineg_ndcg@10 |
|
| 345 |
+
|:----------:|:--------:|:-------------:|:---------------:|:-------------------------------:|
|
| 346 |
+
| 0.0862 | 100 | 0.6482 | - | - |
|
| 347 |
+
| 0.1724 | 200 | 0.513 | - | - |
|
| 348 |
+
| 0.2586 | 300 | 0.4079 | - | - |
|
| 349 |
+
| 0.3448 | 400 | 0.3655 | - | - |
|
| 350 |
+
| 0.4310 | 500 | 0.3771 | 0.3597 | 0.9309 |
|
| 351 |
+
| 0.5172 | 600 | 0.336 | - | - |
|
| 352 |
+
| 0.6034 | 700 | 0.3322 | - | - |
|
| 353 |
+
| 0.6897 | 800 | 0.3337 | - | - |
|
| 354 |
+
| 0.7759 | 900 | 0.3342 | - | - |
|
| 355 |
+
| **0.8621** | **1000** | **0.3437** | **0.3364** | **0.9378** |
|
| 356 |
+
| 0.9483 | 1100 | 0.3341 | - | - |
|
| 357 |
+
| 1.0345 | 1200 | 0.3193 | - | - |
|
| 358 |
+
| 1.1207 | 1300 | 0.286 | - | - |
|
| 359 |
+
| 1.2069 | 1400 | 0.2883 | - | - |
|
| 360 |
+
| 1.2931 | 1500 | 0.2786 | 0.3290 | 0.9441 |
|
| 361 |
+
| 1.3793 | 1600 | 0.3022 | - | - |
|
| 362 |
+
| 1.4655 | 1700 | 0.2828 | - | - |
|
| 363 |
+
| 1.5517 | 1800 | 0.2925 | - | - |
|
| 364 |
+
| 1.6379 | 1900 | 0.2827 | - | - |
|
| 365 |
+
| 1.7241 | 2000 | 0.291 | 0.3426 | 0.9463 |
|
| 366 |
+
| 1.8103 | 2100 | 0.2947 | - | - |
|
| 367 |
+
| 1.8966 | 2200 | 0.2918 | - | - |
|
| 368 |
+
| 1.9828 | 2300 | 0.2868 | - | - |
|
| 369 |
+
| 2.0690 | 2400 | 0.2633 | - | - |
|
| 370 |
+
| 2.1552 | 2500 | 0.2524 | 0.3324 | 0.9521 |
|
| 371 |
+
| 2.2414 | 2600 | 0.2412 | - | - |
|
| 372 |
+
| 2.3276 | 2700 | 0.2796 | - | - |
|
| 373 |
+
| 2.4138 | 2800 | 0.2374 | - | - |
|
| 374 |
+
| 2.5 | 2900 | 0.2243 | - | - |
|
| 375 |
+
| 2.5862 | 3000 | 0.2451 | 0.3459 | 0.9533 |
|
| 376 |
+
| 2.6724 | 3100 | 0.2388 | - | - |
|
| 377 |
+
| 2.7586 | 3200 | 0.2447 | - | - |
|
| 378 |
+
| 2.8448 | 3300 | 0.2548 | - | - |
|
| 379 |
+
| 2.9310 | 3400 | 0.2487 | - | - |
|
| 380 |
+
|
| 381 |
+
* The bold row denotes the saved checkpoint.
|
| 382 |
+
|
| 383 |
+
### Framework Versions
|
| 384 |
+
- Python: 3.11.12
|
| 385 |
+
- Sentence Transformers: 4.1.0
|
| 386 |
+
- Transformers: 4.51.3
|
| 387 |
+
- PyTorch: 2.6.0+cu124
|
| 388 |
+
- Accelerate: 1.6.0
|
| 389 |
+
- Datasets: 3.6.0
|
| 390 |
+
- Tokenizers: 0.21.1
|
| 391 |
+
|
| 392 |
+
## Citation
|
| 393 |
+
|
| 394 |
+
### BibTeX
|
| 395 |
+
|
| 396 |
+
#### Sentence Transformers
|
| 397 |
+
```bibtex
|
| 398 |
+
@inproceedings{reimers-2019-sentence-bert,
|
| 399 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
| 400 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
| 401 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
| 402 |
+
month = "11",
|
| 403 |
+
year = "2019",
|
| 404 |
+
publisher = "Association for Computational Linguistics",
|
| 405 |
+
url = "https://arxiv.org/abs/1908.10084",
|
| 406 |
+
}
|
| 407 |
+
```
|
| 408 |
+
|
| 409 |
+
<!--
|
| 410 |
+
## Glossary
|
| 411 |
+
|
| 412 |
+
*Clearly define terms in order to be accessible across audiences.*
|
| 413 |
+
-->
|
| 414 |
+
|
| 415 |
+
<!--
|
| 416 |
+
## Model Card Authors
|
| 417 |
+
|
| 418 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 419 |
+
-->
|
| 420 |
+
|
| 421 |
+
<!--
|
| 422 |
+
## Model Card Contact
|
| 423 |
+
|
| 424 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 425 |
+
-->
|
config.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"BertForSequenceClassification"
|
| 4 |
+
],
|
| 5 |
+
"attention_probs_dropout_prob": 0.1,
|
| 6 |
+
"classifier_dropout": null,
|
| 7 |
+
"gradient_checkpointing": false,
|
| 8 |
+
"hidden_act": "gelu",
|
| 9 |
+
"hidden_dropout_prob": 0.1,
|
| 10 |
+
"hidden_size": 384,
|
| 11 |
+
"id2label": {
|
| 12 |
+
"0": "LABEL_0"
|
| 13 |
+
},
|
| 14 |
+
"initializer_range": 0.02,
|
| 15 |
+
"intermediate_size": 1536,
|
| 16 |
+
"label2id": {
|
| 17 |
+
"LABEL_0": 0
|
| 18 |
+
},
|
| 19 |
+
"layer_norm_eps": 1e-12,
|
| 20 |
+
"max_position_embeddings": 512,
|
| 21 |
+
"model_type": "bert",
|
| 22 |
+
"num_attention_heads": 12,
|
| 23 |
+
"num_hidden_layers": 6,
|
| 24 |
+
"pad_token_id": 0,
|
| 25 |
+
"position_embedding_type": "absolute",
|
| 26 |
+
"sentence_transformers": {
|
| 27 |
+
"activation_fn": "torch.nn.modules.linear.Identity",
|
| 28 |
+
"version": "4.1.0"
|
| 29 |
+
},
|
| 30 |
+
"torch_dtype": "float32",
|
| 31 |
+
"transformers_version": "4.51.3",
|
| 32 |
+
"type_vocab_size": 2,
|
| 33 |
+
"use_cache": true,
|
| 34 |
+
"vocab_size": 30522
|
| 35 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:65efb33c12979f8f394cfdbb78de1951bb4e748d317d128d05b93dcd3255c631
|
| 3 |
+
size 90866412
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": {
|
| 3 |
+
"content": "[CLS]",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"mask_token": {
|
| 10 |
+
"content": "[MASK]",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"pad_token": {
|
| 17 |
+
"content": "[PAD]",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
},
|
| 23 |
+
"sep_token": {
|
| 24 |
+
"content": "[SEP]",
|
| 25 |
+
"lstrip": false,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"single_word": false
|
| 29 |
+
},
|
| 30 |
+
"unk_token": {
|
| 31 |
+
"content": "[UNK]",
|
| 32 |
+
"lstrip": false,
|
| 33 |
+
"normalized": false,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"single_word": false
|
| 36 |
+
}
|
| 37 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"0": {
|
| 4 |
+
"content": "[PAD]",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"100": {
|
| 12 |
+
"content": "[UNK]",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"101": {
|
| 20 |
+
"content": "[CLS]",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"102": {
|
| 28 |
+
"content": "[SEP]",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"103": {
|
| 36 |
+
"content": "[MASK]",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
}
|
| 43 |
+
},
|
| 44 |
+
"clean_up_tokenization_spaces": true,
|
| 45 |
+
"cls_token": "[CLS]",
|
| 46 |
+
"do_basic_tokenize": true,
|
| 47 |
+
"do_lower_case": true,
|
| 48 |
+
"extra_special_tokens": {},
|
| 49 |
+
"mask_token": "[MASK]",
|
| 50 |
+
"max_length": 512,
|
| 51 |
+
"model_max_length": 512,
|
| 52 |
+
"never_split": null,
|
| 53 |
+
"pad_to_multiple_of": null,
|
| 54 |
+
"pad_token": "[PAD]",
|
| 55 |
+
"pad_token_type_id": 0,
|
| 56 |
+
"padding_side": "right",
|
| 57 |
+
"sep_token": "[SEP]",
|
| 58 |
+
"stride": 0,
|
| 59 |
+
"strip_accents": null,
|
| 60 |
+
"tokenize_chinese_chars": true,
|
| 61 |
+
"tokenizer_class": "BertTokenizer",
|
| 62 |
+
"truncation_side": "right",
|
| 63 |
+
"truncation_strategy": "longest_first",
|
| 64 |
+
"unk_token": "[UNK]"
|
| 65 |
+
}
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|