Detoxify
What it is
Detoxify is a free library of trained models and code for classifying toxic comments from three Jigsaw challenges. It provides original, unbiased, and multilingual models based on BERT, RoBERTa, and XLM-RoBERTa. Depending on the model, outputs can cover categories such as threats, obscenity, insults, identity attacks, and explicit sexual content. The multilingual model is intended for English, French, Spanish, Italian, Portuguese, Turkish, and Russian. The project describes uses including research, fine-tuning on carefully constructed representative datasets, and helping moderators flag harmful content faster. It can be installed with pip and called from Python to predict labels for one string or a list of strings. Inference supports CPU by default and accepts a PyTorch device such as CUDA. The project warns that words associated with profanity may be classified as toxic regardless of tone or intent, potentially creating bias toward vulnerable minority groups. It is distributed under the Apache-2.0 license; API access is requested by email.
For and against
For
- Free, self-hosted library
- Three models based on BERT-family architectures
- Python inference accepts one string or a list
- CPU inference supported by default
- Apache-2.0 license
Against
- Profanity-associated words may be flagged regardless of context
- Only text moderation is listed
- API access requires an email request
The verdict
Detoxify provides code and models for text classification that can run on a user's own setup. Its stated bias limitation deserves attention when using outputs to flag content, especially for moderation decisions.
Who it suits
Detoxify suits researchers and developers who need self-hosted text classification and can account for the stated bias limitation. The multilingual model may fit work involving its listed languages.
Plans and prices
Open-source library
Trained models and code for toxic-comment classification; API access by email
Read 8 Oct 2026 · github.com
On the record
- API access
- The repository says to email [email protected] to request access to its API.github.com · read 8 Oct 2026
- Bias limitation
- The README warns that profanity-associated words may be classified as toxic regardless of tone or intent, potentially creating bias toward vulnerable minority groups.github.com · read 8 Oct 2026
- Categories
- Model outputs include toxicity-related categories such as threats, obscenity, insults, identity attacks, and explicit sexual content, depending on the model.github.com · read 8 Oct 2026
- Dependencies
- Inference uses Hugging Face Transformers and PyTorch Lightning, while training also requires the Kaggle API to download data.github.com · read 8 Oct 2026
- Install
- The library can be installed with pip and used from Python to predict labels for one string or a list of strings.github.com · read 8 Oct 2026
- Languages
- The multilingual model is intended for English, French, Spanish, Italian, Portuguese, Turkish, and Russian.github.com · read 8 Oct 2026
- License
- The project is distributed under the Apache-2.0 license.github.com · read 8 Oct 2026
- Models
- The library offers original, unbiased, and multilingual models based on BERT, RoBERTa, and XLM-RoBERTa, respectively.github.com · read 8 Oct 2026
- Purpose
- Detoxify provides trained models and code to classify toxic comments from three Jigsaw challenges.github.com · read 8 Oct 2026
- Runtime
- Inference supports CPU by default and accepts a PyTorch device such as CUDA.github.com · read 8 Oct 2026
- Training data
- The models were trained for the 2018, 2019, and 2020 Jigsaw toxic-comment challenges using Wikipedia Comments and Civil Comments data.github.com · read 8 Oct 2026
- Use
- The project describes its intended uses as research, fine-tuning on carefully constructed representative datasets, and helping moderators flag harmful content faster.github.com · read 8 Oct 2026