Views
No views yet

bigscience/mt0-xl model on a subset of the multilingual text detoxification dataset SynthDetoxM from the NAACL 2025 Main Track paper SynthDetoxM: Modern LLMs are Few-Shot Parallel Detoxification Data Annotators by Daniil Moskovskiy et al.1from transformers import pipeline
2
3toxic_text = "Your toxic text goes here."
4
5pipe = pipeline("text2text-generation", model="s-nlp/mt0-xl-detox-sdm-full")
6pipe(f"Detoxify: {toxic_text}")
7s-nlp/synthdetoxm dataset with full precision (FP32) using Adafactor optimizer with 1e-4 learning rate and batch size of 4 with gradient checkpointing enabled. The full training configuration is available below:1{
2 "do_train": true,
3 "do_eval": true,
4 "per_device_train_batch_size": 4,
5 "per_device_eval_batch_size": 4,
6 "learning_rate": 1e-4,
7 "weight_decay": 0,
8 "num_train_epochs": 2,
9 "gradient_accumulation_steps": 1,
10 "logging_strategy": "steps",
11 "logging_steps": 1,
12 "save_strategy": "epoch",
13 "save_total_limit": 1,
14 "warmup_steps": 1,
15 "report_to": "wandb",
16 "optim": "adafactor",
17 "lr_scheduler_type": "linear",
18 "predict_with_generate": true,
19 "bf16": false,
20 "gradient_checkpointing": true,
21 "output_dir": "/path/",
22 "seed": 42,
23}
24textdetox/xlmr-large-toxicity-classifier.sentence-transformers/LaBSE encoder.textdetox/multilingual_paradetox dataset from TextDetox 2024 Multilingual Text Detoxification Shared Task.
The results of the evaluation are presented below.| German | Spanish | Russian | |
|---|---|---|---|
| Human References | 0.733 | 0.709 | 0.732 |
| Baselines | |||
| Duplicate | 0.287 | 0.090 | 0.048 |
| Delete | 0.362 | 0.319 | 0.255 |
| Backtranslation | 0.233 | 0.275 | 0.223 |
| mT0-XL supervised fine-tuning | |||
MultiParaDetox s-nlp/mt0-xl-detox-mpd | 0.446 | 0.344 | 0.472 |
| SynthDetoxM (Subset AVG this model) | 0.460 | 0.402 | 0.475 |
SynthDetoxM s-nlp/mt0-xl-detox-sdm-full | 0.482 | 0.470 | 0.546 |
1@misc{moskovskiy2025synthdetoxmmodernllmsfewshot,
2 title={SynthDetoxM: Modern LLMs are Few-Shot Parallel Detoxification Data Annotators},
3 author={Daniil Moskovskiy and Nikita Sushko and Sergey Pletenev and Elena Tutubalina and Alexander Panchenko},
4 year={2025},
5 eprint={2502.06394},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL},
8 url={https://arxiv.org/abs/2502.06394},
9}