safetensors bert ner mountain-ner named-entity-recognition token-classification en dataset:NERetrieve dataset:Few-NERD dataset:mountain-ner-dataset arxiv:2310.14282 arxiv:2105.07464 license:mit model-index region:us
---
datasets:
- NERetrieve
- Few-NERD
- mountain-ner-dataset
language: en
license: mit
metrics:
- accuracy
- f1
- precision
- recall
pipeline_tag: token-classification
tags:
- ner
- bert
- mountain-ner
- named-entity-recognition
model-index:
- name: mountain-ner-bert-base
  results:
  - task:
      type: token-classification
      name: Named Entity Recognition
    dataset:
      name: mountain-ner-dataset
      type: Gepe55o/mountain-ner-dataset
    metrics:
    - type: accuracy
      value: 0.9919
    - type: f1
      value: 0.9048
    - type: precision
      value: 0.8899
    - type: recall
      value: 0.9202
---
## Model Description
mountain-ner-bert-base is a fine-tuned model based on the BERT base architecture for mountain names Entity Recognition tasks. The model is trained on the merging of two datasets: [NERetrieve](https://arxiv.org/pdf/2310.14282), [Few-NERD](https://arxiv.org/pdf/2105.07464v6), [Mountain-ner-dataset](https://huggingface.co/datasets/Gepe55o/mountain-ner-dataset). The model is trained to recognize two types of entities: `LABEL_0` (other), `LABEL_1` (mountain names).

- Model Architecture: BERT base
- Task: mountain names entity recognition
- Training Data: [mountain-ner-dataset](https://huggingface.co/datasets/Gepe55o/mountain-ner-dataset)

## Performance
Metrics: 
| Epoch | Training Loss | Validation Loss | Accuracy | Precision | Recall   | F1       |
|-------|---------------|----------------|----------|-----------|----------|----------|
| 1     | 0.027400      | 0.030793       | 0.988144 | 0.815692  | 0.924621 | 0.866748 |
| 2     | 0.020600      | 0.024568       | 0.991119 | 0.872988  | 0.921036 | 0.896369 |
| 3     | 0.012900      | 0.024072       | 0.991923 | 0.889878  | 0.920171 | 0.904771 |


Best model performance achieved at epoch 3 with:
- F1 Score: 0.9048
- Accuracy: 0.9919
- Precision: 0.8899
- Recall: 0.9202

## How to use
```python
from transformers import AutoModel, AutoTokenizer, pipeline

model = AutoModel.from_pretrained("Gepe55o/mountain-ner-bert-base")
tokenizer = AutoTokenizer.from_pretrained("Gepe55o/mountain-ner-bert-base")

text = "Mount Everest is the highest mountain in the world."

nlp = pipeline("ner", model=model, tokenizer=tokenizer)
result = nlp(text)
```