File size: 4,110 Bytes
15121a6 cea8526 15121a6 cea8526 15121a6 cea8526 15121a6 cea8526 15121a6 cea8526 15121a6 20d9315 15121a6 20d9315 15121a6 de09704 5e8eda0 15121a6 441b03f 15121a6 cea8526 15121a6 cea8526 15121a6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
---
license: cc-by-4.0
base_model: NazaGara/NER-fine-tuned-BETO
tags:
- generated_from_trainer
datasets:
- conll2002
metrics:
- precision
- recall
- f1
- accuracy
model-index:
- name: beto-finetuned-ner
results:
- task:
name: Token Classification
type: token-classification
dataset:
name: conll2002
type: conll2002
config: es
split: validation
args: es
metrics:
- name: Precision
type: precision
value: 0.8402527075812274
- name: Recall
type: recall
value: 0.8556985294117647
- name: F1
type: f1
value: 0.8479052823315117
- name: Accuracy
type: accuracy
value: 0.9701834862385321
---
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->
# beto-finetuned-ner
This model is a fine-tuned version of [NazaGara/NER-fine-tuned-BETO](https://huggingface.co/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
```python
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
|