Text2Text Generation
Transformers
PyTorch
English
bart
Inference Endpoints
tteofili commited on
Commit
7d243c6
0 Parent(s):

Duplicate from tteofili/gplus

Browse files
Files changed (6) hide show
  1. .gitattributes +35 -0
  2. README.md +208 -0
  3. config.json +74 -0
  4. generation_config.json +13 -0
  5. pytorch_model.bin +3 -0
  6. training_args.bin +3 -0
.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,208 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ datasets:
4
+ - jigsaw_toxicity_pred
5
+ language:
6
+ - en
7
+ metrics:
8
+ - perplexity
9
+ ---
10
+ # Model Card for `gplus`
11
+
12
+ This model is a `facebook/bart-large` fine-tuned on non-toxic comments from `jigsaw_toxicity_pred` dataset.
13
+ Only a subset (20%) of the non-toxic comments were used for training this dataset.
14
+
15
+ ## Model Details
16
+
17
+ This model is not intended to be used for plain inference, even though it is unlikely to predict toxic content.
18
+ It is intended to be used as "utility model" for detecting and fixing toxic content as its token probability distributions will likely differ from comparable models trained/fine-tuned over toxic data.
19
+ Its name `gplus` refers to the _G+_ model in [Detoxifying Text with MARCO: Controllable Revision with Experts and Anti-Experts](https://aclanthology.org/2023.acl-short.21.pdf).
20
+
21
+ ### Model Description
22
+
23
+
24
+ - **Developed by:** [tteofili]
25
+ - **Shared by :** [tteofili]
26
+ <!--- **Model type:** [More Information Needed]-->
27
+ <!--- **Language(s) (NLP):** [More Information Needed]-->
28
+ - **License:** [apache-2.0]
29
+ - **Finetuned from model :** [facebook/bart-large](https://huggingface.co/facebook/bart-large)
30
+ <!--
31
+ ### Model Sources [optional]
32
+
33
+ Provide the basic links for the model.
34
+
35
+ - **Repository:** [More Information Needed]
36
+ - **Paper [optional]:** [More Information Needed]
37
+ - **Demo [optional]:** [More Information Needed]
38
+ -->
39
+
40
+ ## Uses
41
+
42
+ <!--
43
+ Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model.
44
+
45
+ ### Direct Use
46
+
47
+ This section is for the model use without fine-tuning or plugging into a larger ecosystem/app.
48
+
49
+ [More Information Needed]
50
+
51
+ ### Downstream Use [optional]
52
+
53
+ This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app
54
+
55
+ [More Information Needed]
56
+
57
+ ### Out-of-Scope Use
58
+
59
+ This section addresses misuse, malicious use, and uses that the model will not work well for.
60
+
61
+ [More Information Needed]
62
+ -->
63
+ ## Bias, Risks, and Limitations
64
+
65
+ This model is fine-tuned over non-toxic comments from `jigsaw_toxicity_pred`, it is unlikely to produce toxic content.
66
+ Nevertheless, this model should only be used in combination with other models for the sake of detecting / fixing toxic content, see for example [Detoxifying Text with MARCO: Controllable Revision with Experts and Anti-Experts](https://aclanthology.org/2023.acl-short.21.pdf).
67
+
68
+ <!--
69
+ This section is meant to convey both technical and sociotechnical limitations.
70
+
71
+ [More Information Needed]
72
+
73
+ ### Recommendations
74
+
75
+ This section is meant to convey recommendations with respect to the bias, risk, and technical limitations.
76
+
77
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
78
+
79
+ ## How to Get Started with the Model
80
+
81
+ Use the code below to get started with the model.
82
+
83
+ [More Information Needed]
84
+
85
+ ## Training Details
86
+
87
+ ### Training Data
88
+
89
+ This should link to a Data 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.
90
+
91
+ [More Information Needed]
92
+
93
+ ### Training Procedure
94
+
95
+ This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure.
96
+
97
+ #### Preprocessing [optional]
98
+
99
+ [More Information Needed]
100
+
101
+
102
+ #### Training Hyperparameters
103
+
104
+ **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision
105
+
106
+ #### Speeds, Sizes, Times [optional]
107
+
108
+ - This section provides information about throughput, start/end time, checkpoint size if relevant, etc.
109
+
110
+ [More Information Needed]
111
+ -->
112
+ ## Evaluation
113
+
114
+ This section describes the evaluation protocols and provides the results.
115
+
116
+ ### Testing Data, Factors & Metrics
117
+
118
+ #### Testing Data
119
+
120
+ This model was tested on `jigsaw_toxic_pred` testset.
121
+
122
+ <!--
123
+ #### Factors
124
+
125
+ These are the things the evaluation is disaggregating by, e.g., subpopulations or domains.
126
+
127
+ [More Information Needed]
128
+ -->
129
+ #### Metrics
130
+
131
+ Model was evaluated using `perplexity` (on the MLM task).
132
+
133
+ ### Results
134
+
135
+ Perplexity: _1.02_
136
+
137
+ <!--
138
+ #### Summary
139
+
140
+
141
+
142
+ ## Model Examination [optional]
143
+
144
+ - Relevant interpretability work for the model goes here
145
+
146
+ [More Information Needed]
147
+
148
+ ## Environmental Impact
149
+
150
+ Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly
151
+
152
+ 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).
153
+
154
+ - **Hardware Type:** [More Information Needed]
155
+ - **Hours used:** [More Information Needed]
156
+ - **Cloud Provider:** [More Information Needed]
157
+ - **Compute Region:** [More Information Needed]
158
+ - **Carbon Emitted:** [More Information Needed]
159
+
160
+ ## Technical Specifications [optional]
161
+
162
+ ### Model Architecture and Objective
163
+
164
+ [More Information Needed]
165
+
166
+ ### Compute Infrastructure
167
+
168
+ [More Information Needed]
169
+
170
+ #### Hardware
171
+
172
+ [More Information Needed]
173
+
174
+ #### Software
175
+
176
+ [More Information Needed]
177
+
178
+ ## Citation [optional]
179
+
180
+ - If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section.
181
+
182
+ **BibTeX:**
183
+
184
+ [More Information Needed]
185
+
186
+ **APA:**
187
+
188
+ [More Information Needed]
189
+
190
+ ## Glossary [optional]
191
+
192
+ If relevant, include terms and calculations in this section that can help readers understand the model or model card.
193
+
194
+ [More Information Needed]
195
+
196
+ ## More Information [optional]
197
+
198
+ [More Information Needed]
199
+
200
+ ## Model Card Authors [optional]
201
+
202
+ [More Information Needed]
203
+
204
+ ## Model Card Contact
205
+
206
+ [More Information Needed]
207
+
208
+
config.json ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "facebook/bart-large",
3
+ "activation_dropout": 0.1,
4
+ "activation_function": "gelu",
5
+ "add_bias_logits": false,
6
+ "add_final_layer_norm": false,
7
+ "architectures": [
8
+ "BartForConditionalGeneration"
9
+ ],
10
+ "attention_dropout": 0.1,
11
+ "bos_token_id": 0,
12
+ "classif_dropout": 0.1,
13
+ "classifier_dropout": 0.0,
14
+ "d_model": 1024,
15
+ "decoder_attention_heads": 16,
16
+ "decoder_ffn_dim": 4096,
17
+ "decoder_layerdrop": 0.0,
18
+ "decoder_layers": 12,
19
+ "decoder_start_token_id": 2,
20
+ "dropout": 0.1,
21
+ "early_stopping": true,
22
+ "encoder_attention_heads": 16,
23
+ "encoder_ffn_dim": 4096,
24
+ "encoder_layerdrop": 0.0,
25
+ "encoder_layers": 12,
26
+ "eos_token_id": 2,
27
+ "forced_bos_token_id": 0,
28
+ "forced_eos_token_id": 2,
29
+ "gradient_checkpointing": false,
30
+ "id2label": {
31
+ "0": "LABEL_0",
32
+ "1": "LABEL_1",
33
+ "2": "LABEL_2"
34
+ },
35
+ "init_std": 0.02,
36
+ "is_encoder_decoder": true,
37
+ "label2id": {
38
+ "LABEL_0": 0,
39
+ "LABEL_1": 1,
40
+ "LABEL_2": 2
41
+ },
42
+ "max_position_embeddings": 1024,
43
+ "model_type": "bart",
44
+ "no_repeat_ngram_size": 3,
45
+ "normalize_before": false,
46
+ "num_beams": 4,
47
+ "num_hidden_layers": 12,
48
+ "pad_token_id": 1,
49
+ "scale_embedding": false,
50
+ "task_specific_params": {
51
+ "summarization": {
52
+ "length_penalty": 1.0,
53
+ "max_length": 128,
54
+ "min_length": 12,
55
+ "num_beams": 4
56
+ },
57
+ "summarization_cnn": {
58
+ "length_penalty": 2.0,
59
+ "max_length": 142,
60
+ "min_length": 56,
61
+ "num_beams": 4
62
+ },
63
+ "summarization_xsum": {
64
+ "length_penalty": 1.0,
65
+ "max_length": 62,
66
+ "min_length": 11,
67
+ "num_beams": 6
68
+ }
69
+ },
70
+ "torch_dtype": "float32",
71
+ "transformers_version": "4.31.0",
72
+ "use_cache": true,
73
+ "vocab_size": 50265
74
+ }
generation_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 0,
4
+ "decoder_start_token_id": 2,
5
+ "early_stopping": true,
6
+ "eos_token_id": 2,
7
+ "forced_bos_token_id": 0,
8
+ "forced_eos_token_id": 2,
9
+ "no_repeat_ngram_size": 3,
10
+ "num_beams": 4,
11
+ "pad_token_id": 1,
12
+ "transformers_version": "4.31.0"
13
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c246e34d01d58f7cb725ce54fee6085142f80c3937d1d4698c74941eb5390eea
3
+ size 1625541389
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:de13e3735e58f049f68397e54efd5d1301006b89d49845950dc34378d3960e2e
3
+ size 3963