sileod commited on
Commit
1a32037
·
verified ·
1 Parent(s): 0901781

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +184 -193
README.md CHANGED
@@ -1,199 +1,190 @@
1
  ---
2
  library_name: transformers
3
- tags: []
 
 
 
 
 
 
 
 
 
 
 
 
4
  ---
5
 
6
  # Model Card for Model ID
7
 
8
- <!-- Provide a quick summary of what the model is/does. -->
9
-
10
-
11
-
12
- ## Model Details
13
-
14
- ### Model Description
15
-
16
- <!-- Provide a longer summary of what this model is. -->
17
-
18
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
19
-
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
22
- - **Shared by [optional]:** [More Information Needed]
23
- - **Model type:** [More Information Needed]
24
- - **Language(s) (NLP):** [More Information Needed]
25
- - **License:** [More Information Needed]
26
- - **Finetuned from model [optional]:** [More Information Needed]
27
-
28
- ### Model Sources [optional]
29
-
30
- <!-- Provide the basic links for the model. -->
31
-
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
35
-
36
- ## Uses
37
-
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
-
40
- ### Direct Use
41
-
42
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
-
44
- [More Information Needed]
45
-
46
- ### Downstream Use [optional]
47
-
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
-
50
- [More Information Needed]
51
-
52
- ### Out-of-Scope Use
53
-
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
-
56
- [More Information Needed]
57
-
58
- ## Bias, Risks, and Limitations
59
-
60
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
-
62
- [More Information Needed]
63
-
64
- ### Recommendations
65
-
66
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
-
68
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
-
70
- ## How to Get Started with the Model
71
-
72
- Use the code below to get started with the model.
73
-
74
- [More Information Needed]
75
-
76
- ## Training Details
77
-
78
- ### Training Data
79
-
80
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
-
82
- [More Information Needed]
83
-
84
- ### Training Procedure
85
-
86
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
-
88
- #### Preprocessing [optional]
89
-
90
- [More Information Needed]
91
-
92
-
93
- #### Training Hyperparameters
94
-
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
-
97
- #### Speeds, Sizes, Times [optional]
98
-
99
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
-
101
- [More Information Needed]
102
-
103
- ## Evaluation
104
-
105
- <!-- This section describes the evaluation protocols and provides the results. -->
106
-
107
- ### Testing Data, Factors & Metrics
108
-
109
- #### Testing Data
110
-
111
- <!-- This should link to a Dataset Card if possible. -->
112
-
113
- [More Information Needed]
114
-
115
- #### Factors
116
-
117
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
-
119
- [More Information Needed]
120
-
121
- #### Metrics
122
-
123
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
-
125
- [More Information Needed]
126
-
127
- ### Results
128
-
129
- [More Information Needed]
130
-
131
- #### Summary
132
-
133
-
134
-
135
- ## Model Examination [optional]
136
-
137
- <!-- Relevant interpretability work for the model goes here -->
138
-
139
- [More Information Needed]
140
-
141
- ## Environmental Impact
142
-
143
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
-
145
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
-
147
- - **Hardware Type:** [More Information Needed]
148
- - **Hours used:** [More Information Needed]
149
- - **Cloud Provider:** [More Information Needed]
150
- - **Compute Region:** [More Information Needed]
151
- - **Carbon Emitted:** [More Information Needed]
152
-
153
- ## Technical Specifications [optional]
154
-
155
- ### Model Architecture and Objective
156
-
157
- [More Information Needed]
158
-
159
- ### Compute Infrastructure
160
-
161
- [More Information Needed]
162
-
163
- #### Hardware
164
-
165
- [More Information Needed]
166
-
167
- #### Software
168
-
169
- [More Information Needed]
170
-
171
- ## Citation [optional]
172
-
173
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
-
175
- **BibTeX:**
176
-
177
- [More Information Needed]
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
+ ```