Downloads · 30 days
50
15% of all-time downloads
Mitchins/deberta-v3-small-literary-explicitness
deberta-v3-small-literary-explicitness is a text classification model from Mitchins. Use it when you need a label for a piece of text. The card lists the license as apache-2.0.
An improved fine-tuned DeBERTa-v3-small model for sophisticated literary content analysis across 7 categories of explicitness. This v2.0 model features significant improvements over the original, including focal loss…
Downloads · 30 days
50
15% of all-time downloads
All-time downloads
340
Public
Parameters
142M
572 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors568 MB · 98%
From the Hugging Face model README
An improved fine-tuned DeBERTa-v3-small model for sophisticated literary content analysis across 7 categories of explicitness. This v2.0 model features significant improvements over the original, including focal loss training, extended epochs, and data quality enhancements.
This model provides nuanced classification of textual content across 7 categories, enabling sophisticated analysis for digital humanities, content curation, and literary research applications.
| ID | Category | Description | F1 Score |
|---|---|---|---|
| 0 | EXPLICIT-DISCLAIMER | Content warnings and age restriction notices | 0.977 |
| 1 | EXPLICIT-OFFENSIVE | Profanity, crude language, offensive content | 0.813 |
| 2 | EXPLICIT-SEXUAL | Graphic sexual content and detailed intimate scenes | 0.930 |
| 3 | EXPLICIT-VIOLENT | Violent or disturbing content | 0.581 |
| 4 | NON-EXPLICIT | Clean, family-friendly content | 0.851 |
| 5 | SEXUAL-REFERENCE | Mentions of sexual topics without graphic description | 0.652 |
| 6 | SUGGESTIVE | Mild innuendo or romantic themes without explicit detail | 0.476 |
precision recall f1-score support
EXPLICIT-DISCLAIMER 0.95 1.00 0.98 19
EXPLICIT-OFFENSIVE 0.82 0.88 0.81 414
EXPLICIT-SEXUAL 0.93 0.91 0.93 514
EXPLICIT-VIOLENT 0.44 0.62 0.58 24
NON-EXPLICIT 0.77 0.87 0.85 683
SEXUAL-REFERENCE 0.63 0.73 0.65 212
SUGGESTIVE 0.37 0.46 0.48 134
accuracy 0.82 2000
macro avg 0.65 0.78 0.75 2000
weighted avg 0.75 0.82 0.82 2000
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
# Load model and tokenizer
model_id = "your-username/deberta-v3-small-explicit-classifier-v2"
model = AutoModelForSequenceClassification.from_pretrained(model_id)
tokenizer = AutoTokenizer.from_pretrained(model_id)
# Create classification pipeline
classifier = pipeline(
"text-classification",
model=model,
tokenizer=tokenizer,
return_all_scores=True,
truncation=True
)
# Single classification
text = "His hand lingered on hers as he helped her from the carriage."
result = classifier(text)
print(f"Top prediction: {result[0]['label']} ({result[0]['score']:.3f})")
# All class probabilities
for class_result in result:
print(f"{class_result['label']}: {class_result['score']:.3f}")
For applications requiring specific precision/recall trade-offs:
| Class | Optimal Threshold | Precision | Recall | F1 |
|---|---|---|---|---|
| EXPLICIT-DISCLAIMER | 0.995 | 0.950 | 1.000 | 0.974 |
| EXPLICIT-OFFENSIVE | 0.626 | 0.819 | 0.829 | 0.824 |
| EXPLICIT-SEXUAL | 0.456 | 0.927 | 0.911 | 0.919 |
| EXPLICIT-VIOLENT | 0.105 | 0.441 | 0.625 | 0.517 |
| NON-EXPLICIT | 0.103 | 0.768 | 0.874 | 0.818 |
| SEXUAL-REFERENCE | 0.355 | 0.629 | 0.726 | 0.674 |
| SUGGESTIVE | 0.530 | 0.370 | 0.455 | 0.408 |
model.safetensors: Model weights in SafeTensors formatconfig.json: Model configuration with proper label mappingstokenizer.json, spm.model: SentencePiece tokenizer fileslabel_mapping.json: Label ID to name mapping referenceThe model includes comprehensive evaluation materials:
This model is designed for:
Important: This model should be used responsibly with human oversight for content moderation decisions.
@misc{literary-explicit-classifier-v2-2025,
title={Literary Content Analysis: Improved Multi-Class Classification with Focal Loss},
author={Explicit Content Research Team},
year={2025},
note={DeBERTa-v3-small fine-tuned for literary explicitness detection}
}
This model is released under the Apache 2.0 license.