/ Модель

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

Контекст
514 токенов
Параметры
138 млн
Лицензия
MIT
Архитектура
camembert · dense
Базовая модель
camembert-base
Библиотека
transformers
Опубликована
1 авг 2025

fr-camembert-spplus-sentiment

Классификация текстаТекст → label3 профессии
132скачиваний за 30 дней0лайковвеса обновлены3 авг 2025

Описание модели

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

Модель на базе CamemBERT классифицирует французские отзывы о государственных услугах как негативные, нейтральные или позитивные.

fr-camembert-spplus-sentiment — модель Оливье Карона для классификации тональности отзывов о французских государственных услугах. Она дообучена на CamemBERT base, архитектуре на основе RoBERTa для французского языка. Модель содержит 137,8 млн параметров, принимает текст с контекстом до 514 токенов и относит отзыв к одному из трёх классов: негативному, нейтральному или позитивному.

Модель предназначена для анализа обратной связи граждан, мониторинга удовлетворённости госуслугами и классификации жалоб и благодарностей. На описанном наборе данных точность составляет 0,9076, а макро F1 — 0,7495; показатели для нейтрального класса заметно ниже, чем для негативного и позитивного. Модель рассчитана на французские отзывы о государственных услугах, поэтому качество на других темах, языках, неформальной речи и специализированном жаргоне может быть ниже. Лицензия — MIT.

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

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

Ограничения

Качество классификации нейтральных отзывов существенно ниже, чем негативных и позитивных. Модель оптимизирована для французских отзывов о госуслугах, поэтому её качество может снижаться на других темах, языках, неформальной речи и специализированном жаргоне.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

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

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

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

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

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

Открыть на Hugging Face

CamemBERT for French Public Services Sentiment Analysis

Model Description

fr-camembert-spplus-sentiment is a fine-tuned version of camembert-base specifically designed for sentiment classification of French user feedback in public services contexts. The model classifies text into three sentiment categories:

  • 🔴 Négatif (Negative) - Label ID: 0
  • ⚪ Neutre (Neutral) - Label ID: 1
  • 🟢 Positif (Positive) - Label ID: 2

Dataset Information

This model was trained on the official French government open dataset "Liste des expériences partagées par les usagers" from data.gouv.fr.

The dataset contains real user experiences shared through the Services Publics Plus platform, a government initiative led by the Direction Interministérielle de la Transformation Publique (DITP) to improve public service quality. The platform allows citizens to share their experiences with French public services, which are then moderated and published as open data.

Model Details

  • Source: Official French government platform (Services Publics Plus)
  • Moderation: All experiences are moderated to ensure compliance with guidelines
  • Scope: Covers all French public services and government administrations
  • Authenticity: Real citizen feedback, not synthetic or scraped data
  • Transparency: Fully open dataset available to the public

The dataset includes various metadata such as:

  • Geographic information (department, region)

  • Service channels (phone, email, in-person, online, etc.)

  • Service categories and administrative structures

  • Response tracking and follow-up actions

  • Base Model: camembert-base

  • Language: French (fr)

  • Task: Text Classification (Sentiment Analysis)

  • Domain: Public services user feedback

  • Model Type: CamemBERT (RoBERTa-like for French)

  • License: MIT

  • Authors: Olivier Caron

Intended Use

Primary Use Cases

  • Analyzing sentiment in French public service feedback
  • Monitoring citizen satisfaction with government services
  • Automated classification of user complaints and compliments
  • Quality assessment of public service interactions

Out-of-Scope Use

  • General sentiment analysis outside public services domain
  • Toxicity or harmful content detection
  • Analysis of languages other than French

How to Use

Quick Start with Pipeline (Recommended)

from transformers import pipeline

# Initialize the sentiment analysis pipeline
classifier = pipeline(
    "text-classification",
    model="oliviercaron/fr-camembert-spplus-sentiment",
    device_map="auto",
    top_k=None  # Return scores for all classes
)

# Example texts
texts = [
    "Accueil très aimable, explications claires, je suis satisfait.",
    "Je n'ai pas d'avis particulier sur la question.",
    "Très déçu, aucune réponse à mes emails depuis des semaines.",
    "Le service était correct, sans plus."
]

# Get predictions
results = classifier(texts)

# Display results
for text, result in zip(texts, results):
    print(f"Text: {text}")
    for prediction in result:
        print(f"  {prediction['label']}: {prediction['score']:.4f}")
    print()

# Expected output:
# Text: Accueil très aimable, explications claires, je suis satisfait.
#   Positif: 0.9990
#   Neutre: 0.0007
#   Négatif: 0.0002
#
# Text: Je n'ai pas d'avis particulier sur la question.
#   Neutre: 0.9790
#   Négatif: 0.0128
#   Positif: 0.0082
#
# Text: Très déçu, aucune réponse à mes emails depuis des semaines.
#   Négatif: 0.9873
#   Neutre: 0.0117
#   Positif: 0.0010
#
# Text: Le service était correct, sans plus.
#   Neutre: 0.9695
#   Positif: 0.0199
#   Négatif: 0.0106

Manual Usage with Tokenizer and Model

import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification

# Load model and tokenizer
model_name = "oliviercaron/fr-camembert-spplus-sentiment"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)

# Set device
device = "cuda" if torch.cuda.is_available() else "cpu"
model.to(device)
model.eval()

# Example text
text = "Le personnel était compétent et à l'écoute."

# Tokenize and predict
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True, max_length=512)
inputs = {k: v.to(device) for k, v in inputs.items()}

with torch.no_grad():
    outputs = model(**inputs)
    predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)

# Get results
labels = ["Négatif", "Neutre", "Positif"]
for i, (label, score) in enumerate(zip(labels, predictions[0])):
    print(f"{label}: {score:.4f}")

Training Details

Training Data

  • Dataset: Liste des expériences partagées par les usagers (Open Data France)
  • Source: Services Publics Plus platform - Direction Interministérielle de la Transformation Publique (DITP)
  • Domain: French public services and government administration
  • Language: French
  • Labels: User sentiment feedback classified as "Négatif", "Neutre", or "Positif"
  • Collection: Real user experiences shared on the Services Publics Plus platform, moderated before publication
  • License: Open Data (data.gouv.fr)

Training Procedure

  • Base Model: camembert-base
  • Tokenizer: SentencePiece (CamemBERT tokenizer)
  • Max Sequence Length: 512 tokens
  • Training Framework: PyTorch with Transformers
  • Mixed Precision: FP16 enabled for faster training
  • Early Stopping: Based on F1-macro score with patience of 3 epochs
  • Reproducibility: Fixed seed (42) for consistent results

Hyperparameters

ParameterValue
Learning Rate2e-05
Train Batch Size16
Eval Batch Size64
Weight Decay0.01
Max Epochs10
Neutral Class Boost1.8

Performance

Overall Metrics

MetricScore
Accuracy0.9076
F1 Macro0.7495
F1 Weighted0.9090

Per-Class Performance

ClassPrecisionRecallF1-ScoreSupport
Négatif0.94800.95150.94988,582
Neutre0.35040.37840.3639761
Positif0.95250.91760.93482,537

Confusion Matrix

Pred. NégatifPred. NeutrePred. Positif
True Négatif8,16638135
True Neutre39228881
True Positif561532,328

Limitations and Bias

Known Limitations

  1. Neutral Class Performance: The model shows lower performance on neutral sentiment due to class imbalance in the training data
  2. Subjective Labeling: User sentiment perception may differ from objective evaluation. Citizens often express dissatisfaction even for minor service issues, leading to a natural bias towards negative classifications
  3. Domain Specificity: Optimized for public services feedback, performance may vary on other domains
  4. Language: Designed specifically for French text
  5. Context Dependency: Performance may vary with informal language or domain-specific jargon

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
CamembertForSequenceClassification
Ревизия весов
c44b1b2

0 моделей