Update README.md
Browse files
README.md
CHANGED
@@ -1,199 +1,190 @@
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
---
|
5 |
|
6 |
# Model Card for Model ID
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
**APA:**
|
180 |
-
|
181 |
-
[More Information Needed]
|
182 |
-
|
183 |
-
## Glossary [optional]
|
184 |
-
|
185 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
186 |
-
|
187 |
-
[More Information Needed]
|
188 |
-
|
189 |
-
## More Information [optional]
|
190 |
-
|
191 |
-
[More Information Needed]
|
192 |
-
|
193 |
-
## Model Card Authors [optional]
|
194 |
-
|
195 |
-
[More Information Needed]
|
196 |
-
|
197 |
-
## Model Card Contact
|
198 |
-
|
199 |
-
[More Information Needed]
|
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
+
base_model:
|
4 |
+
- answerdotai/ModernBERT-large
|
5 |
+
license: apache-2.0
|
6 |
+
language:
|
7 |
+
- en
|
8 |
+
pipeline_tag: zero-shot-classification
|
9 |
+
datasets:
|
10 |
+
- nyu-mll/glue
|
11 |
+
- facebook/anli
|
12 |
+
tags:
|
13 |
+
- instruct
|
14 |
+
- natural-language-inference
|
15 |
+
- nli
|
16 |
---
|
17 |
|
18 |
# Model Card for Model ID
|
19 |
|
20 |
+
ModernBERT multi-task fine-tuned on tasksource NLI tasks, including MNLI, ANLI, SICK, WANLI, doc-nli, LingNLI, FOLIO, FOL-NLI, LogicNLI, Label-NLI and all datasets in the below table).
|
21 |
+
This is the equivalent of an "instruct" version.
|
22 |
+
The model was trained for 200k steps on an Nvidia A30 GPU.
|
23 |
+
|
24 |
+
It is very good at reasoning tasks (better than llama 3.1 8B Instruct on ANLI and FOLIO), long context reasoning, sentiment analysis and zero-shot classification with new labels.
|
25 |
+
|
26 |
+
| test_name | test_accuracy |
|
27 |
+
|:--------------------------------------|----------------:|
|
28 |
+
| glue/mnli | 0.89 |
|
29 |
+
| glue/qnli | 0.96 |
|
30 |
+
| glue/rte | 0.91 |
|
31 |
+
| glue/wnli | 0.64 |
|
32 |
+
| glue/mrpc | 0.81 |
|
33 |
+
| glue/qqp | 0.87 |
|
34 |
+
| super_glue/boolq | 0.66 |
|
35 |
+
| super_glue/cb | 0.86 |
|
36 |
+
| super_glue/multirc | 0.9 |
|
37 |
+
| super_glue/wic | 0.71 |
|
38 |
+
| super_glue/axg | 1 |
|
39 |
+
| anli/a1 | 0.72 |
|
40 |
+
| anli/a2 | 0.54 |
|
41 |
+
| anli/a3 | 0.55 |
|
42 |
+
| sick/label | 0.91 |
|
43 |
+
| sick/entailment_AB | 0.93 |
|
44 |
+
| snli | 0.94 |
|
45 |
+
| scitail/snli_format | 0.95 |
|
46 |
+
| hans | 1 |
|
47 |
+
| WANLI | 0.77 |
|
48 |
+
| recast/recast_ner | 0.85 |
|
49 |
+
| recast/recast_sentiment | 0.97 |
|
50 |
+
| recast/recast_verbnet | 0.89 |
|
51 |
+
| recast/recast_megaveridicality | 0.87 |
|
52 |
+
| recast/recast_verbcorner | 0.87 |
|
53 |
+
| recast/recast_kg_relations | 0.9 |
|
54 |
+
| recast/recast_factuality | 0.95 |
|
55 |
+
| recast/recast_puns | 0.98 |
|
56 |
+
| probability_words_nli/reasoning_1hop | 1 |
|
57 |
+
| probability_words_nli/usnli | 0.79 |
|
58 |
+
| probability_words_nli/reasoning_2hop | 0.98 |
|
59 |
+
| nan-nli | 0.85 |
|
60 |
+
| nli_fever | 0.78 |
|
61 |
+
| breaking_nli | 0.99 |
|
62 |
+
| conj_nli | 0.72 |
|
63 |
+
| fracas | 0.79 |
|
64 |
+
| dialogue_nli | 0.94 |
|
65 |
+
| mpe | 0.75 |
|
66 |
+
| dnc | 0.91 |
|
67 |
+
| recast_white/fnplus | 0.76 |
|
68 |
+
| recast_white/sprl | 0.9 |
|
69 |
+
| recast_white/dpr | 0.84 |
|
70 |
+
| add_one_rte | 0.94 |
|
71 |
+
| paws/labeled_final | 0.96 |
|
72 |
+
| glue/cola | 0.87 |
|
73 |
+
| glue/sst2 | 0.96 |
|
74 |
+
| pragmeval/pdtb | 0.56 |
|
75 |
+
| lex_glue/scotus | 0.58 |
|
76 |
+
| lex_glue/ledgar | 0.85 |
|
77 |
+
| dynasent/dynabench.dynasent.r1.all/r1 | 0.83 |
|
78 |
+
| dynasent/dynabench.dynasent.r2.all/r2 | 0.76 |
|
79 |
+
| cycic_classification | 0.96 |
|
80 |
+
| lingnli | 0.91 |
|
81 |
+
| monotonicity-entailment | 0.97 |
|
82 |
+
| scinli | 0.88 |
|
83 |
+
| naturallogic | 0.93 |
|
84 |
+
| dynahate | 0.86 |
|
85 |
+
| syntactic-augmentation-nli | 0.94 |
|
86 |
+
| autotnli | 0.92 |
|
87 |
+
| defeasible-nli/atomic | 0.83 |
|
88 |
+
| defeasible-nli/snli | 0.8 |
|
89 |
+
| help-nli | 0.96 |
|
90 |
+
| nli-veridicality-transitivity | 0.99 |
|
91 |
+
| lonli | 0.99 |
|
92 |
+
| dadc-limit-nli | 0.79 |
|
93 |
+
| folio | 0.71 |
|
94 |
+
| tomi-nli | 0.54 |
|
95 |
+
| puzzte | 0.59 |
|
96 |
+
| temporal-nli | 0.93 |
|
97 |
+
| counterfactually-augmented-snli | 0.81 |
|
98 |
+
| cnli | 0.9 |
|
99 |
+
| boolq-natural-perturbations | 0.72 |
|
100 |
+
| equate | 0.65 |
|
101 |
+
| logiqa-2.0-nli | 0.58 |
|
102 |
+
| mindgames | 0.96 |
|
103 |
+
| ConTRoL-nli | 0.66 |
|
104 |
+
| logical-fallacy | 0.38 |
|
105 |
+
| cladder | 0.89 |
|
106 |
+
| conceptrules_v2 | 1 |
|
107 |
+
| zero-shot-label-nli | 0.79 |
|
108 |
+
| scone | 1 |
|
109 |
+
| monli | 1 |
|
110 |
+
| SpaceNLI | 1 |
|
111 |
+
| propsegment/nli | 0.92 |
|
112 |
+
| FLD.v2/default | 0.91 |
|
113 |
+
| FLD.v2/star | 0.78 |
|
114 |
+
| SDOH-NLI | 0.99 |
|
115 |
+
| scifact_entailment | 0.87 |
|
116 |
+
| feasibilityQA | 0.79 |
|
117 |
+
| AdjectiveScaleProbe-nli | 1 |
|
118 |
+
| resnli | 1 |
|
119 |
+
| semantic_fragments_nli | 1 |
|
120 |
+
| dataset_train_nli | 0.95 |
|
121 |
+
| nlgraph | 0.97 |
|
122 |
+
| ruletaker | 0.99 |
|
123 |
+
| PARARULE-Plus | 1 |
|
124 |
+
| logical-entailment | 0.93 |
|
125 |
+
| nope | 0.56 |
|
126 |
+
| LogicNLI | 0.91 |
|
127 |
+
| contract-nli/contractnli_a/seg | 0.88 |
|
128 |
+
| contract-nli/contractnli_b/full | 0.84 |
|
129 |
+
| nli4ct_semeval2024 | 0.72 |
|
130 |
+
| biosift-nli | 0.92 |
|
131 |
+
| SIGA-nli | 0.57 |
|
132 |
+
| FOL-nli | 0.79 |
|
133 |
+
| doc-nli | 0.81 |
|
134 |
+
| mctest-nli | 0.92 |
|
135 |
+
| natural-language-satisfiability | 0.92 |
|
136 |
+
| idioms-nli | 0.83 |
|
137 |
+
| lifecycle-entailment | 0.79 |
|
138 |
+
| MSciNLI | 0.84 |
|
139 |
+
| hover-3way/nli | 0.92 |
|
140 |
+
| seahorse_summarization_evaluation | 0.81 |
|
141 |
+
| missing-item-prediction/contrastive | 0.88 |
|
142 |
+
| Pol_NLI | 0.93 |
|
143 |
+
| synthetic-retrieval-NLI/count | 0.72 |
|
144 |
+
| synthetic-retrieval-NLI/position | 0.9 |
|
145 |
+
| synthetic-retrieval-NLI/binary | 0.92 |
|
146 |
+
| babi_nli | 0.98 |
|
147 |
+
|
148 |
+
|
149 |
+
|
150 |
+
# Usage
|
151 |
+
|
152 |
+
## [ZS] Zero-shot classification pipeline
|
153 |
+
```python
|
154 |
+
from transformers import pipeline
|
155 |
+
classifier = pipeline("zero-shot-classification",model="tasksource/ModernBERT-large-nli")
|
156 |
+
|
157 |
+
text = "one day I will see the world"
|
158 |
+
candidate_labels = ['travel', 'cooking', 'dancing']
|
159 |
+
classifier(text, candidate_labels)
|
160 |
+
```
|
161 |
+
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.
|
162 |
+
|
163 |
+
## [NLI] Natural language inference pipeline
|
164 |
+
|
165 |
+
```python
|
166 |
+
from transformers import pipeline
|
167 |
+
pipe = pipeline("text-classification",model="tasksource/ModernBERT-large-nli")
|
168 |
+
pipe([dict(text='there is a cat',
|
169 |
+
text_pair='there is a black cat')]) #list of (premise,hypothesis)
|
170 |
+
```
|
171 |
+
|
172 |
+
## Backbone for further fune-tuning
|
173 |
+
|
174 |
+
This checkpoint has stronger reasoning and fine-grained abilities than the base version and can be used for further fine-tuning.
|
175 |
+
|
176 |
+
# Citation
|
177 |
+
|
178 |
+
```
|
179 |
+
@inproceedings{sileo-2024-tasksource,
|
180 |
+
title = "tasksource: A Large Collection of {NLP} tasks with a Structured Dataset Preprocessing Framework",
|
181 |
+
author = "Sileo, Damien",
|
182 |
+
booktitle = "Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024)",
|
183 |
+
month = may,
|
184 |
+
year = "2024",
|
185 |
+
address = "Torino, Italia",
|
186 |
+
publisher = "ELRA and ICCL",
|
187 |
+
url = "https://aclanthology.org/2024.lrec-main.1361",
|
188 |
+
pages = "15655--15684",
|
189 |
+
}
|
190 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|