GLiNER2.5 Indonesian
GLiNER2.5 Indonesian is a schema-based entity extraction model for Bahasa Indonesia. It is fine-tuned from
fastino/gliner2.5-multi-v1, which is an mDeBERTa-v3-base encoder with a boundary-architecture extraction head (287M parameters).
The model targets the main registers of written Indonesian: news, encyclopedic text, and informal reviews and conversation. It keeps the base model's ability to extract arbitrary, user-defined entity types.
| Developed by | AIbnuHibban |
| Base model | fastino/gliner2.5-multi-v1 |
| Language | Indonesian (id) |
| Task | Named-entity recognition / span extraction |
| Parameters | 287M |
| License | Apache-2.0 |
| Demo | GLiNER2.5 Indonesian Entity Extraction |
| Benchmark | AIbnuHibban/indonesian-gliner-benchmark |
Quick start
pip install gliner2==2.0.0 peft safetensors
from gliner2 import AutoExtractor
model = AutoExtractor.from_pretrained("AIbnuHibban/gliner2.5-indonesian")
text = (
"Gubernur Jawa Barat meresmikan Jalan Tol Cisumdawu di Kabupaten Sumedang "
"pada Selasa, 11 Juli 2023, pukul 10.00 WIB."
)
labels = {
"person": "Nama individu atau orang.",
"job_title": "Jabatan, posisi pekerjaan, atau peran profesional.",
"province": "Nama provinsi.",
"city_regency": "Nama kota atau kabupaten.",
"date": "Tanggal atau referensi tanggal.",
"time": "Waktu atau jam.",
}
result = model.extract_entities(text, labels, threshold=0.65, include_confidence=True)
print(result)
Recommended settings
| Use case | Threshold | Overlap policy |
|---|---|---|
20-label Indonesian schema (ner-general-v0.1) | 0.65 | nested |
| General / NERGrit-style labels | 0.75 | nested |
Label descriptions (as in the example above) are optional, but they improve precision for domain-specific labels.
Entity schema
The model is optimized for the 20 labels of ner-general-v0.1:
| Category | Labels |
|---|---|
| People & roles | person, job_title |
| Organizations | company, government_agency, educational_institution, organization |
| Products & events | product, brand, event |
| Locations | country, province, city_regency, district, village, address |
| Temporal & numeric | date, time, money, percentage |
| Legal | legal_document |
Any other label can be supplied at inference time for zero-shot extraction.
Evaluation
All scores are exact-match (span and label) micro-F1. The 20-label benchmark and the scoring script are public: AIbnuHibban/indonesian-gliner-benchmark. Every model, the base model included, had its threshold and overlap policy selected on a development set. Those settings were then applied once to the held-out test set.
| Benchmark | Base | v2 | v3 (current) |
|---|---|---|---|
| Indonesian 20-label schema: test (450 real sentences) | 0.503 | 0.854 | 0.862 |
| News (NERGrit sentences) | 0.473 | 0.874 | 0.888 |
| Informal reviews (NusaX) | 0.398 | 0.804 | 0.821 |
| Wikipedia (Indonesian) | 0.587 | 0.834 | 0.828 |
| NERGrit: test (human-annotated, 19 types) | 0.482 | 0.809 | 0.818 |
| Zero-shot retention: 6 NERGrit types unseen in training | 0.085 | 0.098 | 0.092 |
| Name-ambiguity challenge: pair accuracy (200 minimal pairs) | 0.400 | 0.610 | 0.720 |
On the 20-label schema, macro-F1 is 0.794 (v2: 0.789, base: 0.440). Per-label F1:
| Label | Base | v2 | v3 |
|---|---|---|---|
person | – | 0.93 | 0.94 |
brand | 0.00 | 0.86 | 0.86 |
product | 0.06 | 0.73 | 0.82 |
job_title | 0.26 | 0.80 | 0.81 |
organization | 0.22 | 0.80 | 0.80 |
event | 0.31 | 0.84 | 0.84 |
government_agency | 0.34 | 0.76 | 0.79 |
date | 0.51 | 0.92 | 0.92 |
address | – | 0.77 | 0.67 |
address is rare in the test set, so its score has high variance. Even so, it is the one label that got worse in v3.
Name-ambiguity challenge set
This is a targeted robustness test. It has 200 minimal pairs in which the same word is a person's name in one sentence and an ordinary word in the other, for example "bunga pergi ke pasar" against "bunga mawar sudah mekar". It covers short and often lower-case text. Scoring:
- A pair counts as correct only if both sentences are right: the name is found with its exact span, and no name is invented.
- Every word in the challenge set was held out of the iteration-3 training data.
| Category | Base | v2 | v3 |
|---|---|---|---|
| A. Given names that are also common words (Bunga, Indah, Budi, …) | 0.51 | 0.61 | 0.79 |
| B. Honorifics and kinship terms without a name (mas, ibu, kak, …) | 0.13 | 0.33 | 0.65 |
| C. Name particles in non-name use (ibnu, bin, wa, cut, …) | 0.30 | 0.60 | 0.47 |
| D. Heroes vs. streets, airports and universities named after them | 0.63 | 0.80 | 0.77 |
| E. Lower-case chat nicknames | 0.37 | 0.80 | 0.87 |
| Overall pair accuracy | 0.40 | 0.61 | 0.72 |
| Name recall | 0.56 | 0.68 | 0.83 |
| Ordinary words wrongly tagged as names | 32% | 12% | 15% |
Category C regressed in v3: "wa aja ya" (WhatsApp) and "cut scene" are now more often tagged as names.
Evaluation protocol and caveats
- Indonesian 20-label schema. 450 real sentences from news, Indonesian Wikipedia and informal reviews. They were annotated under a written guideline in two passes: model-assisted annotation, then independent adjudication. The training data follows the same guideline, so part of the improvement reflects consistent span conventions, not only better language understanding.
- NERGrit. Human-annotated. The NERGrit training split was used during fine-tuning, so this result is in-domain supervised, not zero-shot.
- Zero-shot retention. Six NERGrit types (quantity, ordinal, facility, religion, work of art, language) were removed from fine-tuning entirely and evaluated only at test time. This row checks that fine-tuning did not degrade open-label extraction. Absolute scores are low for both models because of NERGrit's annotation conventions for these types.
- The training data, development sets and test sets have no text overlap.
Training
| Data | ~2.6k real Indonesian sentences (news, Wikipedia, reviews) annotated with the 20-label schema (upsampled ×2); NERGrit train, 12.5k sentences, with six types held out; 104 curated rows from the author's Indonesian GLiNER dataset (forthcoming) |
| Label augmentation | Label-set dropout (p = 0.5): each example sees a random subset of negative labels, which preserves open-label behaviour |
| Hyperparameters | 3 epochs · batch size 8 · encoder LR 2e-5 · head LR 1e-4 · linear schedule, 10% warm-up · fp32 |
| Selection | Best mean F1 across the two development sets (20-label schema and NERGrit) |
| Hardware | Single NVIDIA GPU (Kaggle) |
Iteration 3 (current). Training continued from v2 for 2 epochs (encoder LR 1e-5, head LR 5e-5, fp32, one RTX 4090) on:
- the v2 training mix;
- 4,000 person-only contrastive examples: lower-case chat nicknames, given names that are also common words, honorifics without a name, and proper nouns that are not people. 1,136 of them contain no person.
Only the person label is queried in those examples, so unannotated entities of other types are never treated as negatives. The checkpoint was selected with the same dev-set protocol as v2.
Versions
| Revision | Description |
|---|---|
main (v3) | Iteration 3: contrastive person-name data |
v2 | Iteration 2. Load it with AutoExtractor.from_pretrained("AIbnuHibban/gliner2.5-indonesian", revision="v2") |
Intended use and limitations
Intended use: information extraction from Indonesian text, for example document processing, news analytics, customer-feedback mining, and search indexing.
Known limitations:
- Informal product and institution mentions (e.g. lower-case product names in chat or slang) are the weakest area.
- Name particles used as ordinary words ("wa" for WhatsApp, "cut" in film jargon) are sometimes tagged as
person. This is category C of the challenge set, and it is worse in v3 than in v2. - Indonesian administrative levels (
district,village) are hard to tell apart when the text does not state the level explicitly. - Texts longer than the encoder window should be processed in chunks.
- The model has not been evaluated on regional languages (Javanese, Sundanese, etc.) or on domain-specific corpora such as clinical text.
License
Apache-2.0, following the base model. NERGrit is distributed under its own BSD-style license; NusaX under Apache-2.0; Wikipedia text under CC BY-SA.