Update README.md
Browse files
README.md
CHANGED
@@ -8,6 +8,8 @@ licenses:
|
|
8 |
license: openrail++
|
9 |
datasets:
|
10 |
- s-nlp/paradetox
|
|
|
|
|
11 |
---
|
12 |
|
13 |
|
@@ -25,11 +27,11 @@ model_name = 's-nlp/bart-base-detox'
|
|
25 |
tokenizer = AutoTokenizer.from_pretrained(base_model_name)
|
26 |
model = BartForConditionalGeneration.from_pretrained(model_name)
|
27 |
|
28 |
-
input_ids = tokenizer.encode('
|
29 |
output_ids = model.generate(input_ids, max_length=50, num_return_sequences=1)
|
30 |
output_text = tokenizer.decode(output_ids[0], skip_special_tokens=True)
|
31 |
print(output_text)
|
32 |
-
#
|
33 |
```
|
34 |
|
35 |
**Citation**
|
@@ -53,4 +55,8 @@ print(output_text)
|
|
53 |
pages = "6804--6818",
|
54 |
abstract = "We present a novel pipeline for the collection of parallel data for the detoxification task. We collect non-toxic paraphrases for over 10,000 English toxic sentences. We also show that this pipeline can be used to distill a large existing corpus of paraphrases to get toxic-neutral sentence pairs. We release two parallel corpora which can be used for the training of detoxification models. To the best of our knowledge, these are the first parallel datasets for this task.We describe our pipeline in detail to make it fast to set up for a new language or domain, thus contributing to faster and easier development of new parallel resources.We train several detoxification models on the collected data and compare them with several baselines and state-of-the-art unsupervised approaches. We conduct both automatic and manual evaluations. All models trained on parallel data outperform the state-of-the-art unsupervised models by a large margin. This suggests that our novel datasets can boost the performance of detoxification systems.",
|
55 |
}
|
56 |
-
```
|
|
|
|
|
|
|
|
|
|
8 |
license: openrail++
|
9 |
datasets:
|
10 |
- s-nlp/paradetox
|
11 |
+
base_model:
|
12 |
+
- facebook/bart-base
|
13 |
---
|
14 |
|
15 |
|
|
|
27 |
tokenizer = AutoTokenizer.from_pretrained(base_model_name)
|
28 |
model = BartForConditionalGeneration.from_pretrained(model_name)
|
29 |
|
30 |
+
input_ids = tokenizer.encode('This is completely idiotic!', return_tensors='pt')
|
31 |
output_ids = model.generate(input_ids, max_length=50, num_return_sequences=1)
|
32 |
output_text = tokenizer.decode(output_ids[0], skip_special_tokens=True)
|
33 |
print(output_text)
|
34 |
+
# This is unwise!
|
35 |
```
|
36 |
|
37 |
**Citation**
|
|
|
55 |
pages = "6804--6818",
|
56 |
abstract = "We present a novel pipeline for the collection of parallel data for the detoxification task. We collect non-toxic paraphrases for over 10,000 English toxic sentences. We also show that this pipeline can be used to distill a large existing corpus of paraphrases to get toxic-neutral sentence pairs. We release two parallel corpora which can be used for the training of detoxification models. To the best of our knowledge, these are the first parallel datasets for this task.We describe our pipeline in detail to make it fast to set up for a new language or domain, thus contributing to faster and easier development of new parallel resources.We train several detoxification models on the collected data and compare them with several baselines and state-of-the-art unsupervised approaches. We conduct both automatic and manual evaluations. All models trained on parallel data outperform the state-of-the-art unsupervised models by a large margin. This suggests that our novel datasets can boost the performance of detoxification systems.",
|
57 |
}
|
58 |
+
```
|
59 |
+
|
60 |
+
**License**
|
61 |
+
|
62 |
+
This model is licensed under the OpenRAIL++ License, which supports the development of various technologies—both industrial and academic—that serve the public good.
|