Downloads · 30 days
14
41% of all-time downloads
newmindai/gliner-multi-v2.1-nemotron-pii-tr
gliner-multi-v2.1-nemotron-pii-tr is a token classification model from newmindai. Use it when you need labels on individual words, such as names. The card lists the license as apache-2.0.
This report outlines the architecture, training details, and comparative benchmark performance of the gliner-multi-v2.1-nemotron-pii-tr model against its base model (urchade/glinermulti-v2.1).
Downloads · 30 days
14
41% of all-time downloads
All-time downloads
34
Public
Repo size
2.7 GB
Likes
0
Public
Click a slice to open those files.
.onnx1.5 GB · 56%
From the Hugging Face model README
gliner-multi-v2.1-nemotron-pii-trThis report outlines the architecture, training details, and comparative benchmark performance of the gliner-multi-v2.1-nemotron-pii-tr model against its base model (urchade/gliner_multi-v2.1).
Model Name: gliner-multi-v2.1-nemotron-pii-tr
Base Model: urchade/gliner_multi-v2.1
Task: Span-level Named Entity Recognition (NER) for PII detection.
Language: Turkish (Fine-tuned on Nemotron-derived EN→TR translated data).
This model is designed for PII detection and general entity extraction in Turkish, utilizing a span-based GLiNER architecture with marker-based decoding. It predicts entities as token spans rather than token-level BIO tags.
This model’s saved gliner_config.json contains two layers of settings in one place:
encoder_configspan_mode, max_width, max_len, dropout)Because the full HuggingFace encoder config is embedded, the file looks unusually large — this is expected.
| Item | Value |
|---|---|
| Encoder (backbone) | microsoft/mdeberta-v3-base |
| Span mode | markerV0 |
| Max span width | 12 |
| Effective max length | 384 (max_len) |
| Encoder max positions | 512 (encoder_config.max_position_embeddings) |
| Subtoken pooling | first |
| Dropout (head) | 0.4 |
| Entity token | <<ENT>> (embed_ent_token=true) |
| Words splitter | whitespace |
| Vocab size | 250105 |
max_len), so 384 is the effective limit.encoder_config.hidden_size=768 is the encoder dimension, while the top-level hidden_size=512 is an internal GLiNER head size (they are not the same parameter).num_steps, train_batch_size, eval_every, and warmup_ratio can reflect the saved run artifact and may not match a separate YAML used in another run.The model was fine-tuned on newmindai/Nemotron-PII-EN-TR, a Turkish PII dataset translated from NVIDIA's Nemotron-PII.
Dataset Size:
Entity Labels (8): person, contact_info, digital_identifier, financial_identifier, identity_number, health_identifier, organization, other_identifier
For detailed dataset information, label distributions, and usage examples, see the dataset card.
The model was evaluated against the base model to measure the impact of fine-tuning on a specific test set.
The fine-tuned model demonstrated a ~173% relative increase in Micro F1-Score compared to the base model. While the base model failed to recognize specific PII formats, the fine-tuned model showed high adaptability.
| # | Model Name | F1-Score | Precision | Recall | ms/sample |
|---|---|---|---|---|---|
| 1 | gliner-multi-v2.1-nemotron-pii-tr | 0.5906 | 0.5380 | 0.6546 | 9.87 |
| 2 | gliner-multi-v2.1-nemotron-pii-tr (ONNX) | 0.5919 | 0.5386 | 0.6569 | 301.79 |
| 3 | gliner-multi-v2.1-nemotron-pii-tr (ONNX Quantized) | 0.1127 | 0.8650 | 0.0603 | 287.48 |
| 4 | Base Model | 0.2162 | 0.3406 | 0.1584 | 9.54 |
🏆 Best F1-Score: Model 2 (gliner-multi-v2.1-nemotron-pii-tr (ONNX)) with 0.5919
⚡ Fastest: Model 4 (Base Model) with 9.54 ms/sample
Comparison vs Baseline (Model 1: gliner-multi-v2.1-nemotron-pii-tr):
| Label | gliner-multi-v2.1-nemotron-pii-tr F1 | Base Model F1 | Observation |
|---|---|---|---|
contact_info | 0.5715 | 0.0857 | The base model struggled to recognize structured contact formats, while the fine-tuned model learned dataset-specific patterns. |
digital_identifier | 0.4733 | 0.0791 | Fine-tuning significantly improved detection of digital identifiers that were largely missed by the base model. |
financial_identifier | 0.4131 | 0.1122 | The model shows better coverage of financial identifiers, which the base model detected inconsistently. |
health_identifier | 0.4853 | 0.0945 | The model generalizes better on health-related identifiers compared to the base model. |
identity_number | 0.6289 | 0.3968 | Identity number patterns are captured more reliably after fine-tuning, improving both precision and recall. |
organization | 0.7297 | 0.6035 | Both models perform relatively well, but fine-tuning provides a consistent performance gain. |
other_identifier | 0.5630 | 0.0019 | The base model nearly failed on this category, while the model learned it effectively from the dataset. |
person | 0.6740 | 0.1812 | Fine-tuning greatly stabilizes person entity detection, reducing misses present in the base model. |
Overall Metrics:
| Label | Precision | Recall | F1-Score | Support |
|---|---|---|---|---|
| contact_info | 0.5099 | 0.6501 | 0.5715 | 3118 |
| digital_identifier | 0.4338 | 0.5206 | 0.4733 | 655 |
| financial_identifier | 0.3635 | 0.4783 | 0.4131 | 621 |
| health_identifier | 0.4559 | 0.5188 | 0.4853 | 239 |
| identity_number | 0.5646 | 0.7096 | 0.6289 | 1078 |
| organization | 0.7168 | 0.7431 | 0.7297 | 981 |
| other_identifier | 0.5229 | 0.6097 | 0.5630 | 2078 |
| person | 0.6109 | 0.7515 | 0.6740 | 1967 |
Rows = True Labels | Columns = Predicted Labels
| True \ Pred | contact_info | digital_identifier | financial_identifier | health_identifier | identity_number | organization | other_identifier | person | NONE (FN) |
|---|---|---|---|---|---|---|---|---|---|
| contact_info | 2027 | 0 | 0 | 1 | 0 | 0 | 5 | 3 | 1082 |
| digital_identifier | 2 | 341 | 0 | 0 | 3 | 0 | 5 | 1 | 303 |
| financial_identifier | 3 | 0 | 297 | 0 | 3 | 0 | 0 | 0 | 318 |
| health_identifier | 0 | 1 | 1 | 124 | 1 | 0 | 0 | 0 | 112 |
| identity_number | 1 | 3 | 2 | 0 | 765 | 0 | 1 | 1 | 305 |
| organization | 4 | 0 | 0 | 0 | 0 | 729 | 2 | 2 | 244 |
| other_identifier | 6 | 9 | 2 | 0 | 3 | 2 | 1267 | 5 | 784 |
| person | 4 | 0 | 0 | 3 | 1 | 0 | 2 | 1479 | 478 |
| NONE (FP) | 1928 | 432 | 515 | 144 | 579 | 286 | 1141 | 930 | - |
Overall Metrics:
| Label | Precision | Recall | F1-Score | Support |
|---|---|---|---|---|
| contact_info | 0.5108 | 0.6530 | 0.5732 | 3118 |
| digital_identifier | 0.4326 | 0.5191 | 0.4719 | 655 |
| financial_identifier | 0.3665 | 0.4799 | 0.4156 | 621 |
| health_identifier | 0.4579 | 0.5230 | 0.4883 | 239 |
| identity_number | 0.5695 | 0.7106 | 0.6323 | 1078 |
| organization | 0.7118 | 0.7452 | 0.7281 | 981 |
| other_identifier | 0.5239 | 0.6107 | 0.5640 | 2078 |
| person | 0.6092 | 0.7566 | 0.6750 | 1967 |
| True \ Pred | contact_info | digital_identifier | financial_identifier | health_identifier | identity_number | organization | other_identifier | person | NONE (FN) |
|---|---|---|---|---|---|---|---|---|---|
| contact_info | 2036 | 0 | 0 | 1 | 0 | 0 | 5 | 3 | 1073 |
| digital_identifier | 2 | 340 | 0 | 0 | 2 | 0 | 3 | 1 | 307 |
| financial_identifier | 3 | 1 | 298 | 0 | 2 | 0 | 0 | 0 | 317 |
| health_identifier | 0 | 1 | 0 | 125 | 0 | 0 | 0 | 0 | 113 |
| identity_number | 1 | 3 | 1 | 0 | 766 | 0 | 1 | 1 | 305 |
| organization | 4 | 0 | 0 | 0 | 0 | 731 | 2 | 2 | 242 |
| other_identifier | 5 | 9 | 2 | 0 | 3 | 2 | 1269 | 5 | 783 |
| person | 4 | 0 | 0 | 3 | 1 | 0 | 2 | 1489 | 468 |
| NONE (FP) | 1931 | 432 | 512 | 144 | 571 | 294 | 1140 | 943 | - |
Overall Metrics:
| Label | Precision | Recall | F1-Score | Support |
|---|---|---|---|---|
| contact_info | 0.8199 | 0.0423 | 0.0805 | 3118 |
| digital_identifier | 0.8077 | 0.0321 | 0.0617 | 655 |
| financial_identifier | 0.7222 | 0.0209 | 0.0407 | 621 |
| health_identifier | 0.5000 | 0.0167 | 0.0324 | 239 |
| identity_number | 0.8321 | 0.1011 | 0.1803 | 1078 |
| organization | 0.9375 | 0.0765 | 0.1414 | 981 |
| other_identifier | 0.0000 | 0.0000 | 0.0000 | 2078 |
| person | 0.9071 | 0.1489 | 0.2558 | 1967 |
| True \ Pred | contact_info | digital_identifier | financial_identifier | health_identifier | identity_number | organization | other_identifier | person | NONE (FN) |
|---|---|---|---|---|---|---|---|---|---|
| contact_info | 132 | 1 | 2 | 0 | 10 | 0 | 0 | 1 | 2972 |
| digital_identifier | 0 | 21 | 0 | 0 | 0 | 0 | 1 | 0 | 633 |
| financial_identifier | 0 | 0 | 13 | 1 | 1 | 0 | 0 | 1 | 605 |
| health_identifier | 0 | 0 | 0 | 4 | 2 | 0 | 0 | 1 | 232 |
| identity_number | 0 | 1 | 0 | 2 | 109 | 0 | 0 | 1 | 965 |
| organization | 0 | 0 | 0 | 0 | 0 | 75 | 0 | 0 | 906 |
| other_identifier | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 2076 |
| person | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 293 | 1674 |
| NONE (FP) | 29 | 2 | 3 | 1 | 9 | 5 | 0 | 25 | - |
Overall Metrics:
| Label | Precision | Recall | F1-Score | Support |
|---|---|---|---|---|
| contact_info | 0.2881 | 0.0504 | 0.0857 | 3118 |
| digital_identifier | 0.2403 | 0.0473 | 0.0791 | 655 |
| financial_identifier | 0.2166 | 0.0757 | 0.1122 | 621 |
| health_identifier | 0.3611 | 0.0544 | 0.0945 | 239 |
| identity_number | 0.3509 | 0.4564 | 0.3968 | 1078 |
| organization | 0.5563 | 0.6595 | 0.6035 | 981 |
| other_identifier | 0.0741 | 0.0010 | 0.0019 | 2078 |
| person | 0.2115 | 0.1585 | 0.1812 | 1967 |
| True \ Pred | contact_info | digital_identifier | financial_identifier | health_identifier | identity_number | organization | other_identifier | person | NONE (FN) |
|---|---|---|---|---|---|---|---|---|---|
| contact_info | 157 | 1 | 3 | 0 | 86 | 3 | 1 | 46 | 2821 |
| digital_identifier | 5 | 31 | 0 | 0 | 19 | 2 | 0 | 26 | 572 |
| financial_identifier | 1 | 0 | 47 | 0 | 72 | 1 | 0 | 1 | 499 |
| health_identifier | 0 | 3 | 1 | 13 | 11 | 0 | 0 | 0 | 211 |
| identity_number | 3 | 1 | 12 | 1 | 492 | 4 | 1 | 1 | 563 |
| organization | 1 | 0 | 0 | 0 | 1 | 647 | 0 | 2 | 330 |
| other_identifier | 4 | 1 | 0 | 0 | 4 | 6 | 2 | 13 | 2048 |
| person | 4 | 0 | 0 | 0 | 2 | 8 | 0 | 312 | 1641 |
| NONE (FP) | 370 | 92 | 154 | 22 | 715 | 492 | 23 | 1074 | - |
other_identifier and contact_info categories were virtually undetectable without fine-tuning.NONE in the confusion matrix). Increasing the inference threshold (currently 0.5) could improve Precision.This model performs span-based PII detection for Turkish text using the gliner library.
pip install gliner
from gliner import GLiNER
labels = [
"person",
"contact_info",
"digital_identifier",
"financial_identifier",
"identity_number",
"health_identifier",
"organization",
"other_identifier",
]
text = (
"Benim adım Ahmet Yılmaz ve e-posta adresim [email protected]. "
"23 Mayıs 1990 tarihinde İstanbul’da doğdum. "
"Telefon numaram 0555 123 45 67, TC kimlik numaram ise 12345678901’dir. "
"Ayrıca banka kartı numaram 5432 1234 5678 9012."
)
model = GLiNER.from_pretrained(
"newmindai/gliner-multi-v2.1-nemotron-pii-tr"
)
entities = model.predict_entities(text, labels, threshold=0.7)
for e in entities:
print(f"Text: {e['text']}")
print(f"Label: {e['label']}")
print(f"Score: {e['score']:.3f}")
print(f"Position: [{e['start']}:{e['end']}]")
print("---")
Below is a real model output, shortened for readability
(full output omitted with ...):
Text: Ahmet
Label: person
Score: 1.000
Position: [11:16]
---
Text: Yılmaz
Label: person
Score: 1.000
Position: [17:23]
---
Text: ahmet
Label: person
Score: 0.998
Position: [43:48]
---
Text: [email protected]
Label: contact_info
Score: 0.855
Position: [49:65]
---
Text: 23 Mayıs 1990
Label: other_identifier
Score: 0.891
Position: [67:80]
---
...
threshold: 0.5–0.75 depending on precision–recall tradeoff.