s-nlp/russian_toxicity_classifier

Model

48

stars

15

commits

10

repos using this model

2

linked in READMEs

Oct 14, 2024

updated

bert
endpoints_compatible
pytorch
safetensors
text-classification
tf
toxic comments classification
transformers

README

Bert-based classifier (finetuned from Conversational Rubert) trained on merge of Russian Language Toxic Comments dataset collected from 2ch.hk and Toxic Russian Comments dataset collected from ok.ru.

The datasets were merged, shuffled, and split into train, dev, test splits in 80-10-10 proportion. The metrics obtained from test dataset is as follows

precisionrecallf1-scoresupport
00.980.990.9821384
10.940.920.934886
accuracy0.9726270
macro avg0.960.960.9626270
weighted avg0.970.970.9726270

How to use

from transformers import BertTokenizer, BertForSequenceClassification

# load tokenizer and model weights
tokenizer = BertTokenizer.from_pretrained('s-nlp/russian_toxicity_classifier')
model = BertForSequenceClassification.from_pretrained('s-nlp/russian_toxicity_classifier')

# prepare the input
batch = tokenizer.encode('ты супер', return_tensors='pt')

# inference
model(batch)

Citation

To acknowledge our work, please, use the corresponding citation:

@article{dementieva2022russe,
  title={RUSSE-2022: Findings of the First Russian Detoxification Shared Task Based on Parallel Corpora},
  author={Dementieva, Daryna and Logacheva, Varvara and Nikishina, Irina and Fenogenova, Alena and Dale, David and Krotova, Irina and Semenov, Nikita and Shavrina, Tatiana and Panchenko, Alexander}
}

Licensing Information

This model is licensed under the OpenRAIL++ License, which supports the development of various technologies—both industrial and academic—that serve the public good.

Contributors

dardem

8 commits

NiGuLa

4 commits

cointegrated

1 commits

SFconvertbot

1 commits

s-nlp/russian_toxicity_classifier

Model

48

stars

15

commits

10

repos using this model

2

linked in READMEs

Oct 14, 2024

updated

bert
endpoints_compatible
pytorch
safetensors
text-classification
tf
toxic comments classification
transformers

README

Bert-based classifier (finetuned from Conversational Rubert) trained on merge of Russian Language Toxic Comments dataset collected from 2ch.hk and Toxic Russian Comments dataset collected from ok.ru.

The datasets were merged, shuffled, and split into train, dev, test splits in 80-10-10 proportion. The metrics obtained from test dataset is as follows

precisionrecallf1-scoresupport
00.980.990.9821384
10.940.920.934886
accuracy0.9726270
macro avg0.960.960.9626270
weighted avg0.970.970.9726270

How to use

from transformers import BertTokenizer, BertForSequenceClassification

# load tokenizer and model weights
tokenizer = BertTokenizer.from_pretrained('s-nlp/russian_toxicity_classifier')
model = BertForSequenceClassification.from_pretrained('s-nlp/russian_toxicity_classifier')

# prepare the input
batch = tokenizer.encode('ты супер', return_tensors='pt')

# inference
model(batch)

Citation

To acknowledge our work, please, use the corresponding citation:

@article{dementieva2022russe,
  title={RUSSE-2022: Findings of the First Russian Detoxification Shared Task Based on Parallel Corpora},
  author={Dementieva, Daryna and Logacheva, Varvara and Nikishina, Irina and Fenogenova, Alena and Dale, David and Krotova, Irina and Semenov, Nikita and Shavrina, Tatiana and Panchenko, Alexander}
}

Licensing Information

This model is licensed under the OpenRAIL++ License, which supports the development of various technologies—both industrial and academic—that serve the public good.

Contributors

dardem

8 commits

NiGuLa

4 commits

cointegrated

1 commits

SFconvertbot

1 commits