Text Classification
Transformers
Safetensors
French
roberta
quebec-french
regional-classification
text-embeddings-inference
Instructions to use chaouin/qfrblima-roberta-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use chaouin/qfrblima-roberta-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="chaouin/qfrblima-roberta-base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("chaouin/qfrblima-roberta-base") model = AutoModelForSequenceClassification.from_pretrained("chaouin/qfrblima-roberta-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Add model card
Browse files12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364---language:- frpipeline_tag: text-classificationlibrary_name: transformersbase_model: FacebookAI/roberta-basetags:- quebec-french- regional-classification- qfrblima---
# QFrBLiMa — RoBERTa-base
A supervised regional French classifier fine-tuned from [FacebookAI/roberta-base](https://huggingface.co/FacebookAI/roberta-base) for research on Metropolitan French (MFr) and Quebec French (QFr). This model is part of [QFrBLiMa](https://github.com/chaouin/QFrBLiMa), evaluated on the [QFrBLiMa benchmark](https://huggingface.co/datasets/chaouin/qfrblima).
## Usage
```pythonimport torchfrom transformers import AutoTokenizer, AutoModelForSequenceClassification
model_id = "chaouin/qfrblima-roberta-base"tokenizer = AutoTokenizer.from_pretrained(model_id)model = AutoModelForSequenceClassification.from_pretrained(model_id)model.eval()texts = ["J'ai terminé le puzzle hier soir.", "J'ai terminé le casse-tête hier soir."]inputs = tokenizer(texts, padding=True, truncation=True, max_length=128, return_tensors="pt")with torch.inference_mode(): scores = model(**inputs).logits.softmax(dim=-1)[:, 1]print(scores.tolist()) # QFr scores```
Class 0 denotes MFr (legacy `FI`); class 1 denotes QFr (legacy `FQ`). The softmax scores are not calibrated probabilities. The strict contrastive decision is correct when the QFr sentence receives a higher class-1 score than its MFr counterpart; ties count as failures.
## Training
- Base revision recorded in local download metadata: `e2da8e2f811d1448a5b465c236feacd80ffbac7b` (historical file identity not independently verified).- Separate supervised corpus: 751,288 training, 93,768 validation and 93,428 test examples; six genres, balanced by variety within each genre and partition.- Three epochs, effective batch size 32, learning rate 2e-5, maximum sequence length 128, seed 42; checkpoint selected by validation macro-F1 (epoch 3).
The benchmark was not used for fine-tuning or checkpoint selection. Source documentation and training scripts are available in the GitHub repository. Following [Khan et al. (2026)](https://aclanthology.org/2026.lrec-1.840/), the supervised corpus and its splits are not redistributed.
## Evaluation
| Metric | Result ||---|---:|| Internal test macro-F1 | 96.36% || QFrBLiMa sentence accuracy | 54.27% || QFrBLiMa sentence macro-F1 | 53.68% || QFrBLiMa strict pairwise accuracy | 59.67% || Pairwise accuracy 95% CI | 54.94%–64.32% |
External evaluation: 1,205 pairs, 241 markers, five contexts per marker. Confidence intervals use 20,000 marker-cluster bootstrap replicates. Full predictions and analyses are available on GitHub.
## Limitations
Source-level variety labels are imperfect proxies for linguistic usage. MFr is an operational comparison category; neither category implies exclusive geographic usage. High internal scores do not guarantee contrastive recognition. The classifier is intended for research, not for inferring a person's origin or identity. Exact corpus reconstruction has not been verified.
## License and availability
Draft for private staging only. Final redistribution terms, base-model license notices at the recorded revision, and training-source permissions must be confirmed before public release. The benchmark license does not automatically apply to model weights.README.mdAdded+64