Update README.md
Browse files
README.md
CHANGED
|
@@ -17,7 +17,7 @@ tags:
|
|
| 17 |
|
| 18 |
# Model Card for Model ID
|
| 19 |
|
| 20 |
-
ModernBERT fine-tuned on tasksource NLI tasks, including MNLI, ANLI, SICK, WANLI, doc-nli, LingNLI, FOLIO, FOL-NLI, LogicNLI, Label-NLI...).
|
| 21 |
|
| 22 |
Test accuracy at 10k training steps (current version, 100k steps incoming at the end of the week).
|
| 23 |
|
|
@@ -123,6 +123,31 @@ Test accuracy at 10k training steps (current version, 100k steps incoming at the
|
|
| 123 |
| gen_debiased_nli | 0.82 |
|
| 124 |
|
| 125 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 126 |
```
|
| 127 |
@inproceedings{sileo-2024-tasksource,
|
| 128 |
title = "tasksource: A Large Collection of {NLP} tasks with a Structured Dataset Preprocessing Framework",
|
|
|
|
| 17 |
|
| 18 |
# Model Card for Model ID
|
| 19 |
|
| 20 |
+
ModernBERT mul-itask fine-tuned on tasksource NLI tasks, including MNLI, ANLI, SICK, WANLI, doc-nli, LingNLI, FOLIO, FOL-NLI, LogicNLI, Label-NLI...).
|
| 21 |
|
| 22 |
Test accuracy at 10k training steps (current version, 100k steps incoming at the end of the week).
|
| 23 |
|
|
|
|
| 123 |
| gen_debiased_nli | 0.82 |
|
| 124 |
|
| 125 |
|
| 126 |
+
# Usage
|
| 127 |
+
|
| 128 |
+
## [ZS] Zero-shot classification pipeline
|
| 129 |
+
```python
|
| 130 |
+
from transformers import pipeline
|
| 131 |
+
classifier = pipeline("zero-shot-classification",model="tasksource/ModernBERT-base-nli")
|
| 132 |
+
|
| 133 |
+
text = "one day I will see the world"
|
| 134 |
+
candidate_labels = ['travel', 'cooking', 'dancing']
|
| 135 |
+
classifier(text, candidate_labels)
|
| 136 |
+
```
|
| 137 |
+
NLI training data of this model includes [label-nli](https://huggingface.co/datasets/tasksource/zero-shot-label-nli), a NLI dataset specially constructed to improve this kind of zero-shot classification.
|
| 138 |
+
|
| 139 |
+
## [NLI] Natural language inference pipeline
|
| 140 |
+
|
| 141 |
+
```python
|
| 142 |
+
from transformers import pipeline
|
| 143 |
+
pipe = pipeline("text-classification",model="tasksource/ModernBERT-base-nli")
|
| 144 |
+
pipe([dict(text='there is a cat',
|
| 145 |
+
text_pair='there is a black cat')]) #list of (premise,hypothesis)
|
| 146 |
+
```
|
| 147 |
+
|
| 148 |
+
|
| 149 |
+
# Citation
|
| 150 |
+
|
| 151 |
```
|
| 152 |
@inproceedings{sileo-2024-tasksource,
|
| 153 |
title = "tasksource: A Large Collection of {NLP} tasks with a Structured Dataset Preprocessing Framework",
|