beto-finetuned-ner
This model is a fine-tuned version of NazaGara/NER-fine-tuned-BETO on the conll2002 dataset. It achieves the following results on the evaluation set:
- Loss: 0.2248
- Precision: 0.8403
- Recall: 0.8557
- F1: 0.8479
- Accuracy: 0.9702
Model description
Este modelo está basado en BETO, que es un modelo de lenguaje preentrenado para el español similar a BERT. BETO fue entrenado inicialmente en grandes cantidades de texto en español. Posteriormente, este modelo toma la arquitectura y pesos preentrenados de BETO y los ajusta aún más en la tarea específica de Reconocimiento de Entidades Nombradas (NER) utilizando el conjunto de datos conll2002. Este modelo ajustado puede usarse para anotar automáticamente nuevos textos en español, asignando etiquetas de entidad nombradas.
How to Use
from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
tokenizer = AutoTokenizer.from_pretrained("JoshuaAAX/beto-finetuned-ner")
model = AutoModelForTokenClassification.from_pretrained("JoshuaAAX/beto-finetuned-ner")
text = "La Federación nacional de cafeteros de Colombia es una entidad del estado. El primer presidente el Dr Augusto Guerra contó con el aval de la Asociación Colombiana de Aviación."
ner_pipeline= pipeline("ner", model=model, tokenizer=tokenizer, aggregation_strategy="max")
ner_pipeline(text)
Training data
Abbreviation | Description |
---|---|
O | Outside of NE |
PER | Person’s name |
ORG | Organization |
LOC | Location |
MISC | Miscellaneous |
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 10
Training results
Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy |
---|---|---|---|---|---|---|---|
0.0512 | 1.0 | 521 | 0.1314 | 0.8328 | 0.8562 | 0.8443 | 0.9703 |
0.0305 | 2.0 | 1042 | 0.1549 | 0.8318 | 0.8442 | 0.8380 | 0.9688 |
0.0193 | 3.0 | 1563 | 0.1498 | 0.8513 | 0.8578 | 0.8545 | 0.9708 |
0.0148 | 4.0 | 2084 | 0.1810 | 0.8363 | 0.8442 | 0.8403 | 0.9682 |
0.0112 | 5.0 | 2605 | 0.1904 | 0.8412 | 0.8529 | 0.8470 | 0.9703 |
0.0078 | 6.0 | 3126 | 0.1831 | 0.8364 | 0.8539 | 0.8450 | 0.9708 |
0.0058 | 7.0 | 3647 | 0.2060 | 0.8419 | 0.8543 | 0.8481 | 0.9701 |
0.0049 | 8.0 | 4168 | 0.2111 | 0.8357 | 0.8541 | 0.8448 | 0.9697 |
0.0037 | 9.0 | 4689 | 0.2255 | 0.8371 | 0.8504 | 0.8437 | 0.9692 |
0.0031 | 10.0 | 5210 | 0.2248 | 0.8403 | 0.8557 | 0.8479 | 0.9702 |
Framework versions
- Transformers 4.41.0
- Pytorch 2.3.0+cu121
- Datasets 2.19.1
- Tokenizers 0.19.1
- Downloads last month
- 21
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.
Model tree for JoshuaAAX/beto-finetuned-ner
Base model
NazaGara/NER-fine-tuned-BETODataset used to train JoshuaAAX/beto-finetuned-ner
Evaluation results
- Precision on conll2002validation set self-reported0.840
- Recall on conll2002validation set self-reported0.856
- F1 on conll2002validation set self-reported0.848
- Accuracy on conll2002validation set self-reported0.970