Text Classification
Transformers
ONNX
Safetensors
PyTorch
English
xlm-roberta
Eval Results (legacy)
text-embeddings-inference
Instructions to use Ontolisst/xlm-roberta-large-ontolisst-major-v5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ontolisst/xlm-roberta-large-ontolisst-major-v5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Ontolisst/xlm-roberta-large-ontolisst-major-v5")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Ontolisst/xlm-roberta-large-ontolisst-major-v5") model = AutoModelForSequenceClassification.from_pretrained("Ontolisst/xlm-roberta-large-ontolisst-major-v5", device_map="auto") - Notebooks
- Google Colab
- Kaggle
xlm-roberta-large-ontolisst-major-v5
How to use the model
from transformers import AutoTokenizer, pipeline
tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-large")
pipe = pipeline(
model="poltextlab/xlm-roberta-large-ontolisst-major-v5",
task="text-classification",
tokenizer=tokenizer,
use_fast=False,
token="<your_hf_read_only_token>"
)
text = "<text_to_classify>"
pipe(text)
Classification Report
Overall Performance:
- Accuracy: 93%
- Macro Avg: Precision: 0.92, Recall: 0.90, F1-score: 0.91
- Weighted Avg: Precision: 0.93, Recall: 0.93, F1-score: 0.93
Per-Class Metrics:
| Label | Precision | Recall | F1-score | Support |
|---|---|---|---|---|
| (2) ENVIRONMENT AND RESIDENCE | 0.94 | 0.93 | 0.94 | 175 |
| (3) HEALTH, CARE AND SOCIAL SERVICES | 0.94 | 0.92 | 0.93 | 196 |
| (4) EMPLOYMENT AND WORK | 0.9 | 0.94 | 0.92 | 199 |
| (5) EDUCATION AND QUALIFICATION | 0.96 | 0.94 | 0.95 | 200 |
| (6) SOCIAL RELATIONS | 0.95 | 0.95 | 0.95 | 323 |
| (7) MEMBERSHIP AND POLITICS | 0.91 | 0.95 | 0.93 | 258 |
| (8) LEISURE, MEDIA AND CULTURAL CONSUMPTION | 0.93 | 0.97 | 0.95 | 145 |
| (9) INCOME AND EXPENDITURE | 0.94 | 0.96 | 0.95 | 238 |
| (10) LAW AND LEGALITY | 0.95 | 0.98 | 0.97 | 100 |
| (11) ADMINISTRATIVE | 0.82 | 0.62 | 0.7 | 50 |
| (12) OTHER | 0.86 | 0.72 | 0.78 | 50 |
Inference platform
This model is used by the CAP Babel Machine, an open-source and free natural language processing tool, designed to simplify and speed up projects for comparative research.
Cooperation
Model performance can be significantly improved by extending our training sets. We appreciate every submission of CAP-coded corpora (of any domain and language) at poltextlab{at}poltextlab{dot}com or by using the CAP Babel Machine.
Debugging and issues
This architecture uses the sentencepiece tokenizer. In order to run the model before transformers==4.27 you need to install it manually.
- Downloads last month
- 45
Model tree for Ontolisst/xlm-roberta-large-ontolisst-major-v5
Base model
FacebookAI/xlm-roberta-largeSpace using Ontolisst/xlm-roberta-large-ontolisst-major-v5 1
Evaluation results
- Accuracyself-reported93%
- F1-Scoreself-reported93%