ftan-2.0 / README.md
akaruineko's picture
ftanch benchmarked
e742e87 verified
|
Raw
History Blame Contribute Delete
5.35 kB
---
license: mit
datasets:
- akaruineko/offensively-neutral
language:
- en
base_model:
- distilbert/distilbert-base-uncased
pipeline_tag: text-classification
library_name: transformers
tags:
- moderation
- filtering
- offensive
- clean
model-index:
- name: "akaruineko/ftan-2.0"
results:
- task:
type: "text-classification"
id: "overall"
dataset:
type: "akaruineko/ftanch"
name: "FTANch"
split: "test"
metrics:
- type: "acc"
value: 0.8144
name: "Accuracy"
- type: "p"
value: 0.7637
name: "Precision"
- type: "r"
value: 0.9890
name: "Recall"
- type: "f1"
value: 0.8619
name: "F1-Score"
- task:
type: "text-classification"
id: "test"
dataset:
type: "akaruineko/ftanch"
name: "FTANch"
split: "test"
metrics:
- type: "acc"
value: 0.7752
name: "Accuracy"
- type: "p"
value: 0.6938
name: "Precision"
- type: "r"
value: 0.9852
name: "Recall"
- type: "f1"
value: 0.8142
name: "F1-Score"
- task:
type: "text-classification"
id: "test_obfuscated"
dataset:
type: "akaruineko/ftanch"
name: "FTANch"
split: "test"
metrics:
- type: "acc"
value: 0.8979
name: "Accuracy"
- type: "p"
value: 0.8866
name: "Precision"
- type: "r"
value: 0.9942
name: "Recall"
- type: "f1"
value: 0.9373
name: "F1-Score"
- task:
type: "text-classification"
id: "plain"
dataset:
type: "akaruineko/ftanch"
name: "FTANch"
split: "test"
metrics:
- type: "acc"
value: 0.6670
name: "Accuracy"
- type: "p"
value: 0.4398
name: "Precision"
- type: "r"
value: 0.9622
name: "Recall"
- type: "f1"
value: 0.6037
name: "F1-Score"
- task:
type: "text-classification"
id: "mutated"
dataset:
type: "akaruineko/ftanch"
name: "FTANch"
split: "test"
metrics:
- type: "acc"
value: 0.8979
name: "Accuracy"
- type: "p"
value: 0.8866
name: "Precision"
- type: "r"
value: 0.9942
name: "Recall"
- type: "f1"
value: 0.9373
name: "F1-Score"
---
# ftan-2.0
**ftan-2.0** is a fine-tuned [DistilBERT](https://huggingface.co/distilbert/distilbert-base-uncased) sequence classification model for detecting offensive text.
The model predicts one of two labels:
* `clean` — non-offensive text
* `offensive` — offensive text
## Training
ftan-2.0 is the continuation of the [`akaruineko/bad-good-classifier-ru_en`](https://huggingface.co/akaruineko/bad-good-classifier-ru_en) project.
The new version was trained on the [`akaruineko/offensively-neutral`](https://huggingface.co/datasets/akaruineko/offensively-neutral) dataset, containing approximately **1.3 million text samples**.
Training used a larger dataset than the previous model and included evaluation across multiple epochs to select the best-performing checkpoint.
The best checkpoint was selected based on evaluation performance rather than simply using the final training checkpoint.
## Usage
```python
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="akaruineko/ftan-2.0"
)
result = classifier("you are stupid")
print(result)
```
Example:
```text
[{'label': 'offensive', 'score': 0.965}]
```
## Intended Use
ftan-2.0 can be used for:
* content moderation
* filtering offensive messages
* dataset preprocessing
* text classification experiments
* moderation pipelines
* research and experimentation with text classifiers
## Limitations
This model should **not** be treated as a perfect moderation system.
Offensiveness can depend heavily on context, intent, quotation, sarcasm, reclaimed language, and the surrounding conversation. The model may therefore produce incorrect predictions for ambiguous or context-dependent text.
For example, a sentence discussing an offensive word may still receive a non-trivial offensive score even when the sentence itself is not an insult.
The model also operates on individual text inputs and does not have access to conversation history unless it is explicitly provided as input.
## Example Predictions
Some example inference results:
```text
"b****" # censored
→ offensive (0.988)
"you are stupid"
→ offensive (0.965)
"the word \"stupid\" is offensive"
→ offensive (0.695)
"beach"
→ clean (0.922)
```
These examples are illustrative and should not be interpreted as a formal benchmark.
## License
See the repository/model files for the applicable license.
## Author
Created by **akaruineko**.
This model is the **2.0** continuation of the `bad-good-classifier-ru_en` project.