Skip to main content
Back

Inria's ModernCamemBERT Beats French NLP on Long Documents but Loses Everywhere Else

Inria's ALMAnaCH lab released ModernCamemBERT, a French encoder built on the ModernBERT architecture, alongside a controlled study comparing it to DeBERTaV3.

Pro

  • Inria's ALMAnaCH lab released ModernCamemBERT, a French ModernBERT variant trained on 1T tokens.
  • Model supports an 8192 token context window and MIT licensed on Hugging Face.
  • Paper compares ModernBERT vs DeBERTaV3 on identical data, isolating architecture from data effects.
  • DeBERTaV3-based CamemBERTaV2 still leads on classification and QA benchmarks.
  • ModernCamemBERT wins on long document retrieval (MLDR 34.32) and inference speed.
  • Follows CamemBERT 2.0 refresh addressing temporal drift in the 2019 original.

The team behind CamemBERT, the widely used French encoder from Inria's ALMAnaCH lab, has been quietly rebuilding its lineup. After releasing CamemBERT 2.0 late last year, the same group has now published ModernCamemBERT, a French adaptation of Answer.AI's ModernBERT architecture, along with a paper that pits it against their own DeBERTaV3-based model.

The framing is unusual for a model release. Rather than declaring a new leader on the French NLP leaderboard, the authors treat ModernCamemBERT as a controlled study of what actually matters in encoder design: architecture, or data.

What was actually shipped

ModernCamemBERT is a French language model pretrained on 1T tokens of high-quality French text, using the Masked Language Modeling objective with a 30% mask rate on 48 H100 GPUs. The training mix combines filtered French RedPajama-V2, scientific documents from HALvest, and French Wikipedia.

Two checkpoints are available under the MIT license on Hugging Face:

  • almanach/moderncamembert-base, trained on the new 1T token filtered corpus
  • almanach/moderncamembert-cv2-base, trained on the older CamemBERTav2 dataset for a clean comparison

Both reuse the CamemBERTav2 tokenizer and were pretrained first at 1024 context length, then extended to 8192 tokens. Usage is standard Hugging Face:

from transformers import AutoTokenizer, AutoModelForMaskedLM
tok = AutoTokenizer.from_pretrained("almanach/moderncamembert-base")
model = AutoModelForMaskedLM.from_pretrained("almanach/moderncamembert-base")

The experiment hiding inside the release

The interesting part is why the model exists. The paper, titled ModernBERT or DeBERTaV3, examines how architecture and data influence transformer encoder performance. The authors trained ModernBERT on the same corpus as CamemBERTaV2 to isolate model design from data quality.

Their conclusion is blunt: the DeBERTaV3-based CamemBERTaV2 still wins on most benchmarks. ModernBERT's advantage lies in speed and context length rather than raw quality. Swapping in higher-quality pretraining data accelerates convergence but does not meaningfully move final scores, which the authors read as a sign of benchmark saturation.

Where each model actually wins

The fine-tuning table published on the model card makes the trade-off concrete:

ModelFTB-NERXNLIFQuAD F1MLDR (long doc retrieval)
CamemBERT (original)89.9781.9580.98-
CamemBERTv291.9981.7580.9828.37
CamemBERTav293.4084.8283.040.91
ModernCamemBERT91.3383.6282.1934.32

CamemBERTav2 dominates classification and QA, but collapses on long document retrieval because its context window is short. ModernCamemBERT takes the top spot on MLDR by a wide margin thanks to its 8192 token window. The team's own recommendation on the model card is to reach for ModernCamemBERT when you need long context or fast inference, and stick with CamemBERTaV2 for everything else.

Why refresh the CamemBERT family at all

The motivation was laid out earlier this cycle. The original CamemBERT still pulls over 4 million monthly downloads and remains actively used by the French NLP community. It was trained in 2019, and models of that vintage suffer from temporal concept drift, where outdated training data degrades performance on new topics and terminology.

CamemBERT 2.0 addressed that directly. The update ships a much larger pretraining dataset of 275B unique tokens (previously around 32B), a newly built WordPiece tokenizer with 32,768 entries that adds newline and tab characters, supports emojis, handles numbers by splitting them into two-digit tokens, and stretches the context window to 1024 tokens. ModernCamemBERT then takes that data foundation and swaps in a modern architecture to see what changes.

What this means in practice

For anyone shipping French NLP, the takeaways are practical:

  • If you have been running the original camembert-base, the drop-in replacement is CamemBERTv2, and CamemBERTav2 is the stronger option when you can migrate to a DeBERTaV3 tokenizer.
  • For long document retrieval, embeddings over long context, or latency-sensitive inference, ModernCamemBERT is the better pick.
  • The broader signal, from the team behind one of the most downloaded French models, is that architecture upgrades on encoders now yield smaller gains than a decade of BERT-era progress led people to expect. Data quality helps convergence, not ceilings.

With classic French NLP benchmarks approaching saturation, the next round of encoder progress will likely require harder evaluations rather than just bigger models.