CoolFace
Modelpublic

khoirif/xlm-roberta-base-indonesian-ner

sourceHugging Faceupdated 8mo agoView on Hugging Face
0likes1.1kdownloads
Model Card

About this Model

Fine-tuned XLM-RoBERTa Base model for Named Entity Recognition (NER) on Indonesian news articles, with built-in rule-based post-processing for Indonesian text.

Model Performance

MetricScore
F10.9120
Precision0.8928
Recall0.9320
Accuracy0.9779

Evaluated on held-out test set

Supported Entities

The model recognizes 9 entity types commonly found in Indonesian news:

  • —PER - Person names
  • —ORG - Organizations
  • —GPE - Geopolitical entities (countries, cities, states)
  • —LOC - Locations (non-GPE)
  • —DATE - Dates and time periods
  • —EVENT - Named events
  • —FAC - Facilities
  • —MONEY - Monetary values
  • —LAW - Laws and regulations

Quick Start

python
from transformers import pipeline

# Load the NER pipeline
ner = pipeline("token-classification", model="khoirif/xlm-roberta-base-indonesian-ner", aggregation_strategy="simple")

# Run inference
text = "Gubernur Jawa Barat meresmikan proyek senilai Rp 10 miliar."
results = ner(text)

# Display results
for entity in results:
    print(f"{entity['word']} -> {entity['entity_group']} (score: {entity['score']:.2f})")

Use Cases

Recommended for:

  • —News article analysis and information extraction
  • —Entity-based search and retrieval systems
  • —Financial and regulatory document processing
  • —Indonesian-language knowledge graphs

Limitations:

  • —Optimized for formal Indonesian news text
  • —Not designed for informal language or slang
  • —Single language inference only

Training Details

Hyperparameters

yaml
Learning rate: 3e-5
Train batch size: 4
Eval batch size: 8
Gradient accumulation steps: 4
Effective batch size: 16 (4 × 4)
Epochs: 10
Weight decay: 0.02
LR scheduler: Linear
Warmup ratio: 0.03
Max gradient norm: 0.5
Label smoothing: 0.05
Mixed precision: FP16
Optimizer: AdamW (default)

Training Progress

EpochTrain LossVal LossPrecisionRecallF1Accuracy
10.43380.40000.85630.89390.87470.9781
20.39840.39390.86200.91900.88960.9801
30.38230.38940.87490.92100.89730.9812
40.37020.39590.88220.92950.90520.9806
50.36310.38920.89550.91780.90650.9820
60.35970.39380.89320.93020.91130.9824
70.35340.39750.88640.92340.90460.9817
80.34680.39850.89220.91050.90130.9805
90.34520.39750.89410.92240.90800.9820

Best Validation: Epoch 6 (F1: 0.9113, Precision: 0.8932, Recall: 0.9302, Accuracy: 0.9824)

Final Test Results

MetricScore
Loss0.4107
Precision0.8928
Recall0.9320
F10.9120
Accuracy0.9779

Technical Specifications

Base Model: xlm-roberta-base Framework: Transformers 4.57.3, PyTorch 2.1.0+cu124 Language: Indonesian Task: Token Classification (NER)

License

MIT License

This fine-tuned model inherits the MIT License from the base model XLM-RoBERTa.

Citation

bibtex
@misc{ner-irish-roberta-base,
  author = {TLab Developer and Muhammad Faiz Khoiri},
  title = {ner-irish-roberta-base},
  year = {2025},
  publisher = {HuggingFace},
  howpublished = {\url{https://huggingface.co/tlabdev/ner-irish-roberta-base}}
}

Please also cite the original XLM-RoBERTa paper:

bibtex
@article{DBLP:journals/corr/abs-1911-02116,
  author    = {Alexis Conneau and
               Kartikay Khandelwal and
               Naman Goyal and
               Vishrav Chaudhary and
               Guillaume Wenzek and
               Francisco Guzm{\'{a}}n and
               Edouard Grave and
               Myle Ott and
               Luke Zettlemoyer and
               Veselin Stoyanov},
  title     = {Unsupervised Cross-lingual Representation Learning at Scale},
  journal   = {CoRR},
  volume    = {abs/1911.02116},
  year      = {2019},
  url       = {http://arxiv.org/abs/1911.02116},
  eprinttype = {arXiv},
  eprint    = {1911.02116}
}