metadata
library_name: transformers
license: mit
base_model: xlm-roberta-base
tags:
- generated_from_trainer
metrics:
- f1
model-index:
- name: xlm-roberta-base-finetuned-panx-de-fr-en-it
results:
- task:
type: token-classification
dataset:
name: google/xtreme
type: google/xtreme
metrics:
- name: f1
type: f1
value: 0.838
datasets:
- google/xtreme
language:
- de
- fr
- en
- it
pipeline_tag: token-classification
xlm-roberta-base-finetuned-panx-de-fr-en-it
This model is a fine-tuned version of xlm-roberta-base on the Xtreme dataset. It achieves the following results on the evaluation set:
- Loss: 0.2148
- F1: 0.8380
Model description
This model is fine-tuned for Named Entity Recognition (NER) in German, French, English, and Italian. It identifies entities like persons, organizations, locations, etc...
Intended uses & limitations
More information needed
How to Use
from transformers import pipeline
# Load the NER pipeline
model_name = "avanishd/xlm-roberta-base-finetuned-panx-de-fr-en-it"
ner_pipeline = pipeline("token-classification", model=model_name, aggregation_strategy="simple")
# Example text (English, but you can use DE/FR/IT as well)
text = "Barack Obama was born in Hawaii and became President of the United States."
# Get NER predictions
entities = ner_pipeline(text)
# Display results
for entity in entities:
print(f"{entity['word']} → {entity['entity_group']} ({entity['score']:.2f})")
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 64
- eval_batch_size: 64
- seed: 42
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- num_epochs: 3
Training results
Training Loss | Epoch | Step | Validation Loss | F1 |
---|---|---|---|---|
No log | 1.0 | 313 | 0.2470 | 0.7921 |
No log | 2.0 | 626 | 0.2170 | 0.8318 |
No log | 3.0 | 939 | 0.2148 | 0.8380 |
Framework versions
- Transformers 4.50.3
- Pytorch 2.6.0+cu124
- Datasets 3.5.0
- Tokenizers 0.21.1