/ Модель

Характеристики

Контекст
512 токенов
Параметры
155 млн
Лицензия
Apache 2.0
Архитектура
deberta-v2 · dense
Базовая модель
deberta-v3-small
Опубликована
25 авг 2025

deberta-v3-small-literary-explicitness

Классификация текстаТекст → label3 профессии

Англоязычная модель на DeBERTa V3 Small для классификации литературных текстов по семи категориям явности.

110скачиваний за 30 дней0лайковвеса обновлены25 авг 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Mitchins/deberta-v3-small-literary-explicitness — англоязычная модель классификации текста, разработанная на основе microsoft/deberta-v3-small и дообученная для анализа литературного контента. Она относит текст к одной из семи категорий явности, включая предупреждения о содержании, оскорбительную лексику и сексуальный контент; предназначена для литературных исследований, кураторской работы с текстами и поддержки модерации.

Сценарии применения

  • классификация литературных фрагментов по степени откровенности
  • поиск оскорбительной лексики в текстах и рецензиях
  • выявление сексуального или насильственного контента
  • обнаружение предупреждений о содержании и возрастных ограничениях
  • помощь в кураторской обработке библиотечных и издательских материалов

Ограничения

Модель рассчитана на английские тексты и литературный либо обзорный контент; на других типах текста качество может снижаться. Коротким фрагментам может не хватать контекста, а различение намёков и упоминаний сексуального содержания, а также классы насилия и suggestive-контента распознаются хуже.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Literary Content Classifier - DeBERTa v3 Small (v2.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 training, extended epochs, and data quality enhancements.

🚀 Key Improvements in v2.0

  • +4.5% accuracy improvement (81.8% vs 77.3%)
  • +6.4% macro F1 improvement (0.754 vs 0.709)
  • +21% improvement on violent content (F1: 0.581 vs 0.478)
  • +19% improvement on suggestive content (F1: 0.476 vs 0.400)
  • Focal loss training for better minority class performance
  • Clean dataset with cross-split contamination resolved
  • Extended training (4.79 epochs vs 1.1 epochs)

Model Description

This model provides nuanced classification of textual content across 7 categories, enabling sophisticated analysis for digital humanities, content curation, and literary research applications.

Categories

IDCategoryDescriptionF1 Score
0EXPLICIT-DISCLAIMERContent warnings and age restriction notices0.977
1EXPLICIT-OFFENSIVEProfanity, crude language, offensive content0.813
2EXPLICIT-SEXUALGraphic sexual content and detailed intimate scenes0.930
3EXPLICIT-VIOLENTViolent or disturbing content0.581
4NON-EXPLICITClean, family-friendly content0.851
5SEXUAL-REFERENCEMentions of sexual topics without graphic description0.652
6SUGGESTIVEMild innuendo or romantic themes without explicit detail0.476

Performance Metrics

Overall Performance

  • Accuracy: 81.8%
  • Macro F1: 0.754
  • Weighted F1: 0.816

Detailed Results (Test Set)

                     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

Training Details

Model Architecture

  • Base Model: microsoft/deberta-v3-small
  • Parameters: 141.9M (6 layers, 768 hidden, 12 attention heads)
  • Vocabulary: 128,100 tokens
  • Max Sequence Length: 512 tokens

Training Configuration

  • Training Method: Focal Loss (γ=2.0) for class imbalance
  • Epochs: 4.79 (early stopped)
  • Learning Rate: 5e-5 with cosine schedule
  • Batch Size: 16 (effective 32 with gradient accumulation)
  • Warmup Steps: 1,000
  • Weight Decay: 0.01
  • Early Stopping: Patience 5 on macro F1

Dataset

  • Total Samples: 119,023 (after deduplication)
  • Training: 83,316 samples
  • Validation: 17,853 samples
  • Test: 17,854 samples
  • Data Quality: Cross-split contamination eliminated (2,127 duplicates removed)

Training Environment

  • Framework: PyTorch + Transformers
  • Hardware: Apple Silicon (MPS)
  • Training Time: ~13.7 hours

Usage

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}")

Recommended Thresholds (F1-Optimized)

For applications requiring specific precision/recall trade-offs:

ClassOptimal ThresholdPrecisionRecallF1
EXPLICIT-DISCLAIMER0.9950.9501.0000.974
EXPLICIT-OFFENSIVE0.6260.8190.8290.824
EXPLICIT-SEXUAL0.4560.9270.9110.919
EXPLICIT-VIOLENT0.1050.4410.6250.517
NON-EXPLICIT0.1030.7680.8740.818
SEXUAL-REFERENCE0.3550.6290.7260.674
SUGGESTIVE0.5300.3700.4550.408

Model Files

  • model.safetensors: Model weights in SafeTensors format
  • config.json: Model configuration with proper label mappings
  • tokenizer.json, spm.model: SentencePiece tokenizer files
  • label_mapping.json: Label ID to name mapping reference

Limitations & Considerations

  1. Challenging Distinctions: SUGGESTIVE vs SEXUAL-REFERENCE categories remain difficult to distinguish due to conceptual overlap
  2. Minority Classes: EXPLICIT-VIOLENT and SUGGESTIVE classes have lower F1 scores due to limited training data
  3. Context Dependency: Short text snippets may lack sufficient context for accurate classification
  4. Domain Specificity: Optimized for literary and review content; performance may vary on other text types
  5. Language: English text only

Evaluation Artifacts

The model includes comprehensive evaluation materials:

  • Confusion matrix visualization
  • Per-class precision-recall curves
  • ROC curves for all categories
  • Calibration analysis
  • Recommended decision thresholds

Ethical Use

This model is designed for:

  • Academic research and digital humanities
  • Content curation and library science applications
  • Literary analysis and publishing workflows
  • Educational content assessment

Important: This model should be used responsibly with human oversight for content moderation decisions.

Citation

@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}
}

License

This model is released under the Apache 2.0 license.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · text-classification

Можно запустить

Подбираем GPU…

Класс архитектуры
DebertaV2ForSequenceClassification
Ревизия весов
28c1304

0 моделей