Instructions to use akaruineko/ftan-2.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use akaruineko/ftan-2.0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="akaruineko/ftan-2.0")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("akaruineko/ftan-2.0") model = AutoModelForSequenceClassification.from_pretrained("akaruineko/ftan-2.0", device_map="auto") - Notebooks
- Google Colab
- Kaggle
ftan-2.0
ftan-2.0 is a fine-tuned DistilBERT sequence classification model for detecting offensive text.
The model predicts one of two labels:
clean— non-offensive textoffensive— offensive text
Training
ftan-2.0 is the continuation of the akaruineko/bad-good-classifier-ru_en project.
The new version was trained on the 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
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="akaruineko/ftan-2.0"
)
result = classifier("you are stupid")
print(result)
Example:
[{'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:
"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.
- Downloads last month
- 20
Model tree for akaruineko/ftan-2.0
Base model
distilbert/distilbert-base-uncasedDataset used to train akaruineko/ftan-2.0
Evaluation results
- Accuracy on FTANchtest set self-reported0.814
- Precision on FTANchtest set self-reported0.764
- Recall on FTANchtest set self-reported0.989
- F1-Score on FTANchtest set self-reported0.862
- Accuracy on FTANchtest set self-reported0.775
- Precision on FTANchtest set self-reported0.694
- Recall on FTANchtest set self-reported0.985
- F1-Score on FTANchtest set self-reported0.814