Instructions to use akaruineko/ftan-2.5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use akaruineko/ftan-2.5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="akaruineko/ftan-2.5")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("akaruineko/ftan-2.5") model = AutoModelForSequenceClassification.from_pretrained("akaruineko/ftan-2.5", device_map="auto") - Notebooks
- Google Colab
- Kaggle
ftan-2.5
ftan-2.5 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.5 is the continuation of the akaruineko/ftan-2.0 project.
The new version was trained on the akaruineko/fantastic-offensive dataset, containing approximately 2.46 million text samples with a near-balanced distribution between the clean and offensive classes.
Usage
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="akaruineko/ftan-2.5"
)
result = classifier("you are stupid")
print(result)
Example:
[{'label': 'offensive', 'score': 0.997348427772522}]
Intended Use
ftan-2.5 can be used for:
- content moderation
- filtering offensive messages
- dataset preprocessing
- moderation pipelines
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.
License
MIT
Author
Created by akaruineko.
This model is the 2.5 continuation of the ftan model series.
- Downloads last month
- 20
Model tree for akaruineko/ftan-2.5
Base model
distilbert/distilbert-base-uncasedDataset used to train akaruineko/ftan-2.5
Space using akaruineko/ftan-2.5 1
Collection including akaruineko/ftan-2.5
Evaluation results
- Accuracy on FTANchtest set self-reported0.837
- Precision on FTANchtest set self-reported0.800
- Recall on FTANchtest set self-reported0.962
- F1-Score on FTANchtest set self-reported0.873
- Accuracy on FTANchtest set self-reported0.801
- Precision on FTANchtest set self-reported0.732
- Recall on FTANchtest set self-reported0.950
- F1-Score on FTANchtest set self-reported0.827