CoolFace
Modelpublic

Whisler/camembert_finetuned_progressive

sourceHugging Facemitupdated 10mo agoView on Hugging Face
0likes276downloads
Model Card

CamemBERT Finetuned Progressive

CamemBERT finetuned on 22,000 French parliamentary Q&A pairs for improved embedding in Retrieval-Augmented Generation (RAG) systems.

πŸ€– Model Type: Feature extraction & embedding πŸ‡«πŸ‡· Language: French πŸ“œ Training Data: 22,000 Q&A pairs from the French Parliament (2017-2025) βš–οΈ Use Case: Legal/regulatory analysis, parliamentary response drafting, semantic search in administrative documents


Model Details

Description

This model is a fine-tuned version of `camembert-base` optimized for embedding French parliamentary questions and answers. It is designed to improve the performance of RAG systems in legal and administrative contexts, such as:

  • β€”Automated drafting of parliamentary responses.
  • β€”Retrieval of relevant legal articles or budgetary information.
  • β€”Semantic search in administrative documents.

Training Data

The model was fine-tuned on a dataset of 22,000 Q&A pairs from the French Parliament (AssemblΓ©e Nationale and SΓ©nat). The dataset includes questions from MPs and responses from the Government, covering topics such as:

  • β€”Legal and regulatory issues.
  • β€”Budgetary and financial matters.
  • β€”Public policies and administrative procedures.

Training Procedure

  • β€”Base Model: camembert-base
  • β€”Fine-tuning Task: Masked Language Modeling (MLM)
  • β€”Context Preservation: Special attention was given to maintaining the legal and administrative context (e.g., references to laws, decrees, and ministries).
  • β€”Chunking: Texts were split into chunks with overlapping context to preserve semantic coherence.

Uses

Direct Use

This model generates 768-dimensional embeddings that can be used in:

  • β€”RAG pipelines (e.g., with Qdrant, Weaviate, or Elasticsearch).
  • β€”Semantic search in legal or administrative documents.
  • β€”Automated drafting tools for parliamentary responses.

Downstream Use

  • β€”Public Administration: Assisting civil servants in drafting responses to parliamentary questions.
  • β€”Legal Tech: Enhancing search and analysis in legal databases.
  • β€”Research: Studying French legislative language and discourse.

Out-of-Scope Use

  • β€”Non-French Texts: The model is specialized for French and may underperform on other languages.
  • β€”General-Purpose Embeddings: While it can be used for general French text, it is optimized for legal/administrative language.

Performance

  • β€”15-20% improvement in retrieval relevance compared to camembert-base on a validation set of 2,000 parliamentary questions.
  • β€”Robustness: Handles complex formulations, such as references to multiple laws or budgetary lines.
MetricScore (vs `camembert-base`)
Retrieval Precision+18%
Semantic Similarity+15%

How to Use

Installation

bash
pip install transformers torch