Instructions to use LeFrenchNewsLab/camembert-base-frenchnews7 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LeFrenchNewsLab/camembert-base-frenchnews7 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="LeFrenchNewsLab/camembert-base-frenchnews7")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("LeFrenchNewsLab/camembert-base-frenchnews7") model = AutoModelForSequenceClassification.from_pretrained("LeFrenchNewsLab/camembert-base-frenchnews7", device_map="auto") - Notebooks
- Google Colab
- Kaggle
CamemBERT-base FrenchNews-7
A CamemBERT-base model fine-tuned for 7-way French news editorial desk classification on the FrenchNews-7 dataset.
The model predicts the publisher's editorial routing decision — which desk a newsroom assigned an article to — rather than an annotator's perceived topic. The label space overlaps heavily with conventional news topics; the distinction is in the label-generating process.
Model Description
- Base model: camembert-base
- Task: Single-label classification (7 categories)
- Language: French
- Input: Headline + body text, space-joined (see Usage)
- Training data: 61,345 articles from 13 French news publishers
Intended Use
This model is intended for research and applied experimentation in French news editorial-desk classification under the FrenchNews-7 label space. It predicts one of seven harmonized cross-publisher editorial desk categories from French news headline + body text.
Labels
| ID | Label |
|---|---|
| 0 | Culture & Loisirs |
| 1 | International |
| 2 | Politique |
| 3 | Sciences & Technologies |
| 4 | Société |
| 5 | Sport |
| 6 | Économie |
Usage
The model was trained on the headline and body joined by a single space.
from transformers import pipeline
classifier = pipeline("text-classification", model="LeFrenchNewsLab/camembert-base-frenchnews7")
headline = "Macron annonce une réforme des retraites"
body = "Le président a présenté lundi les grandes lignes du projet de loi..."
text = headline + " " + body # exactly how the model was trained and evaluated
result = classifier(text, truncation=True, max_length=512)
print(result)
# [{'label': 'Politique', 'score': 0.95...}]
Inputs are truncated to 512 tokens, matching training.
Performance
Test set (13,146 articles, in-distribution)
| Metric | Score |
|---|---|
| Accuracy | 85.99% |
| F1 (macro) | 84.68% |
| F1 (weighted) | 85.97% |
| Precision (macro) | 84.32% |
| Recall (macro) | 85.11% |
Macro-F1 95% bootstrap CI [0.841, 0.854]; accuracy 95% CI [0.854, 0.866].
Per-class results (test set)
| Label | Precision | Recall | F1 | Support |
|---|---|---|---|---|
| Culture & Loisirs | 93.89% | 91.03% | 92.44% | 2,720 |
| International | 89.42% | 91.06% | 90.23% | 2,785 |
| Politique | 83.24% | 85.45% | 84.33% | 1,581 |
| Sciences & Technologies | 72.05% | 78.86% | 75.30% | 667 |
| Société | 80.32% | 78.96% | 79.63% | 2,837 |
| Sport | 95.02% | 97.79% | 96.38% | 1,267 |
| Économie | 76.28% | 72.61% | 74.40% | 1,289 |
Cross-publisher transfer (unseen outlets)
Evaluated on a balanced held-out pool of 2,100 articles (300 per category) from four publishers excluded from training. Overall macro-recall 0.799.
| Label | Recall |
|---|---|
| Politique | 0.870 |
| International | 0.867 |
| Sport | 0.867 |
| Sciences & Technologies | 0.833 |
| Culture & Loisirs | 0.827 |
| Société | 0.810 |
| Économie | 0.517 |
Six of the seven categories reach recall ≥ 0.810 on publishers never seen in training. Économie is the exception; blinded human agreement on held-out Économie articles is itself only 55% (Wilson 95% CI [39.8%, 69.3%], which contains the model's 0.517 [0.460, 0.573]), so the gap reflects editorial boundary ambiguity rather than recoverable headroom.
Training Details
- Base model: camembert-base
- Epochs: 4 (cap 5, early stopping patience = 2)
- Optimizer: AdamW
- Learning rate: 2e-5
- Batch size: 32
- Warmup: linear, 10% of steps
- Weight decay: 0.01
- Checkpoint selection: best macro-F1 on validation split
- Hardware: NVIDIA L4 GPU
- Split seed: 42
- Splits: train 61,345 / validation 13,146 / test 13,146
- Text mode: headline + body, space-joined (truncated to 512 tokens)
- Framework: Transformers 4.48.3
Dataset
Trained on FrenchNews-7, an 87,637-article benchmark constructed from 13 French news publishers. The public release consists of metadata, labels, and reconstruction assets rather than raw full-text redistribution. Dataset access and reconstruction assets are described in the linked project resources.
Limitations
The model predicts the 7-category FrenchNews-7 taxonomy and should not be interpreted as a universal topic classifier. Performance may degrade on publishers, genres, or time periods outside the dataset distribution. The dataset reflects harmonized publisher desk assignments rather than arbitrary fine-grained semantic topic annotation. Économie transfers least well across publishers, as reported above.
Legal Note
This model was fine-tuned on text from French news publishers. The released weights and model card are provided for research use; no article text is redistributed here or in the accompanying dataset repository. Users are responsible for ensuring that any downstream fetching, storage, processing, or redistribution of source material complies with applicable law, publisher terms, robots directives, and institutional policy.
Citation
@misc{sobhy2026frenchnews7,
title = {FrenchNews-7: Benchmarking Cross-Publisher French News Editorial Desk Classification},
author = {Amr Sobhy},
year = {2026},
note = {Working paper, version April 2026},
}
Project page: https://frenchnewslab.org/en/publications/frenchnews-7-benchmarking-cross-publisher-french-news-topic-classification
- Downloads last month
- 34
Model tree for LeFrenchNewsLab/camembert-base-frenchnews7
Base model
almanach/camembert-baseDataset used to train LeFrenchNewsLab/camembert-base-frenchnews7
Space using LeFrenchNewsLab/camembert-base-frenchnews7 1
Evaluation results
- Accuracy on FrenchNews-7test set self-reported0.860
- F1 (macro) on FrenchNews-7test set self-reported0.847
- F1 (weighted) on FrenchNews-7test set self-reported0.860