Downloads ยท 30 days
25
24% of all-time downloads
Rishabh157/unified-multilingual-ner-mdeberta
unified-multilingual-ner-mdeberta is a token classification model from Rishabh157. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as mit.
This model is a fine-grained Multilingual Named Entity Recognition (NER) model fine-tuned on 1.53+ million sentences across three major benchmark suites: WikiANN MultiCoNER 2023 (v2) MultiNERD
Downloads ยท 30 days
25
24% of all-time downloads
All-time downloads
106
Public
Parameters
278M
573 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors557 MB ยท 97%
From the Hugging Face model README
This model is a fine-grained Multilingual Named Entity Recognition (NER) model fine-tuned on 1.53+ million sentences across three major benchmark suites:
Built on top of microsoft/mdeberta-v3-base, it supports 47 fine-grained entity categories (95 BIO logit tags) across 12+ languages.
Developed by Rishabh Kumar.
microsoft/mdeberta-v3-base (278M parameters, 12 Transformer layers, 768 hidden size, 250k vocabulary)query_proj, key_proj, value_proj, intermediate.dense, output.dense) merged into standalone base weights.torch.float16, ~530 MB footprint)en), Spanish (es), French (fr), German (de), Italian (it), Portuguese (pt), Swedish (sv), Dutch (nl), Polish (pl), Russian (ru), Farsi (fa), Bengali (bn), Hindi (hi), Ukrainian (uk), Chinese (zh), and multilingual mixed text.The model combines the taxonomy of three major Hugging Face NER datasets into a single unified classification head (47 ร 2 + 1 = 95 BIO output logits):
de), English (en), Spanish (es), French (fr), Italian (it), Portuguese (pt), Swedish (sv)PER (Person), LOC (Location), ORG (Organization)de), English (en), Spanish (es), French (fr), Italian (it), Dutch (nl), Polish (pl), Portuguese (pt), Russian (ru), Chinese (zh)PER, LOC, ORG, TIMEANIM (Animal species, breeds, fauna)PLANT (Plants, trees, botanical species, fungi)FOOD (Food, dishes, beverages, culinary items)DIS (Diseases, disorders, medical conditions)CEL (Celestial bodies, stars, planets, galaxies)EVE (Historical, sports, cultural events)INST (Public institutions, international bodies)MEDIA (Newspapers, networks, press outlets)MYTH (Mythological entities, deities, folklore)VEHI (Vehicles, ships, aircraft, spacecraft)BIO (Biological compounds, genes, proteins)BN), German (DE), English (EN), Spanish (ES), Farsi (FA), French (FR), Hindi (HI), Italian (IT), Portuguese (PT), Swedish (SV), Ukrainian (UK), Chinese (ZH), and Multilingual Mixed (MULTI)Artist, Athlete, Cleric, Politician, Scientist, SportsManager, OtherPERAerospaceManufacturer, CarManufacturer, MusicalGRP, PrivateCorp, PublicCorp, SportsGRPFacility, HumanSettlement, Station, OtherLOCArtWork, MusicalWork, VisualWork, WrittenWork, Software, Clothing, Drink, Food, OtherPRODAnatomicalStructure, Disease, MedicalProcedure, Medication/Vaccine, Symptom 1. ANIM 13. Disease 25. Medication/Vaccine 37. Scientist
2. AerospaceManufacturer 14. Drink 26. MusicalGRP 38. Software
3. AnatomicalStructure 15. EVE 27. MusicalWork 39. SportsGRP
4. ArtWork 16. FOOD 28. ORG 40. SportsManager
5. Artist 17. Facility 29. OtherLOC 41. Station
6. Athlete 18. Food 30. OtherPER 42. Symptom
7. BIO 19. HumanSettlement 31. OtherPROD 43. TIME
8. CEL 20. INST 32. PER 44. VEHI
9. CarManufacturer 21. Cleric 33. PLANT 45. Vehicle
10. Cleric 22. MEDIA 34. Politician 46. VisualWork
11. Clothing 23. MYTH 35. PrivateCorp 47. WrittenWork
12. DIS 24. MedicalProcedure 36. PublicCorp
The model was fine-tuned for 5 epochs (~28.3 hours across 1.53M training sentences) using AdamW (lr=2e-5, linear scheduler, effective batch size 16).
| Metric | Score |
|---|---|
| Validation Entity F1 | 0.7693 |
| Validation Precision | 0.8449 |
| Validation Recall | 0.7061 |
| Validation Accuracy | 0.9587 |
| Validation Loss | 0.0276 |
To evaluate cross-lingual generalization across diverse datasets, the table below aggregates performance per language weighted by sentence support across all test splits:
| Language | Total Test Sentences | Precision | Recall | Entity-Span F1 | Token Accuracy | Source Benchmarks Included |
|---|---|---|---|---|---|---|
| ๐ท๐บ Russian (RU) | 8,338 | 82.11% | 71.70% | 76.56% | 96.31% | MultiNERD |
| ๐ณ๐ฑ Dutch (NL) | 17,181 | 83.13% | 66.41% | 73.84% | 96.47% | MultiNERD |
| ๐ต๐ฑ Polish (PL) | 19,555 | 80.46% | 63.69% | 71.10% | 95.10% | MultiNERD |
| ๐ฉ๐ช German (DE) | 45,907 | 70.64% | 67.17% | 68.72% | 93.13% | WikiANN + MultiNERD + MultiCoNER 2023 |
| ๐ฎ๐น Italian (IT) | 276,098 | 66.20% | 65.93% | 66.00% | 92.20% | WikiANN + MultiNERD + MultiCoNER 2023 |
| ๐ธ๐ช Swedish (SV) | 241,190 | 64.97% | 63.46% | 64.21% | 91.68% | WikiANN + MultiCoNER 2023 |
| ๐ซ๐ท French (FR) | 277,481 | 61.47% | 60.23% | 60.83% | 91.01% | WikiANN + MultiNERD + MultiCoNER 2023 |
| ๐บ๐ฆ Ukrainian (UK) | 238,296 | 61.23% | 59.94% | 60.58% | 92.32% | MultiCoNER 2023 |
| ๐ช๐ธ Spanish (ES) | 274,299 | 60.23% | 60.98% | 60.55% | 91.86% | WikiANN + MultiNERD + MultiCoNER 2023 |
| ๐ต๐น Portuguese (PT) | 257,305 | 60.23% | 59.93% | 60.02% | 91.59% | WikiANN + MultiNERD + MultiCoNER 2023 |
| ๐ฌ๐ง English (EN) | 276,434 | 58.13% | 59.35% | 58.72% | 90.70% | WikiANN + MultiNERD + MultiCoNER 2023 |
| ๐ฎ๐ณ Hindi (HI) | 18,399 | 53.08% | 55.75% | 54.38% | 93.12% | MultiCoNER 2023 |
| ๐ง๐ฉ Bangla (BN) | 19,859 | 50.29% | 52.75% | 51.49% | 90.79% | MultiCoNER 2023 |
| ๐ฎ๐ท Farsi (FA) | 219,168 | 52.86% | 46.06% | 49.23% | 90.72% | MultiCoNER 2023 |
| ๐จ๐ณ Chinese (ZH) | 39,842 | 36.69% | 36.51% | 36.11% | 84.05% | MultiNERD + MultiCoNER 2023 |
Note on Evaluated Splits & Benchmarks:
- 3-Benchmark Languages (DE, EN, ES, FR, IT, PT) appear in all three datasets (WikiANN + MultiNERD + MultiCoNER 2023). Their scores represent joint generalizability across coarse Wikipedia text, domain-specific corpora, and noisy query contexts.
- 2-Benchmark Languages (SV, ZH) appear across two datasets (SV: WikiANN + MultiCoNER; ZH: MultiNERD + MultiCoNER).
- 1-Benchmark Languages (RU, NL, PL, UK, HI, BN, FA) are evaluated on their respective source benchmark splits (RU, NL, PL from MultiNERD; UK, HI, BN, FA from MultiCoNER 2023).
Evaluation across WikiANN, MultiNERD (10 languages + full), and MultiCoNER 2023 (13 languages + full):
| Dataset | Subset / Lang | Sentences | Precision | Recall | F1 Score | Accuracy |
|---|---|---|---|---|---|---|
combined | combined | 536,661 | 0.6639 | 0.6298 | 0.6464 | 0.9313 |
multinerd | ๐น multinerd_full | 167,993 | 0.8906 | 0.7298 | 0.8022 | 0.9646 |
multinerd | ๐ฌ๐ง EN-English | 16,454 | 0.9097 | 0.8103 | 0.8571 | 0.9771 |
multinerd | ๐ฉ๐ช DE-German | 15,762 | 0.9025 | 0.7874 | 0.8410 | 0.9761 |
multinerd | ๐ท๐บ RU-Russian | 8,338 | 0.8211 | 0.7170 | 0.7656 | 0.9631 |
multinerd | ๐ณ๐ฑ NL-Dutch | 17,181 | 0.8313 | 0.6641 | 0.7384 | 0.9647 |
multinerd | ๐ซ๐ท FR-French | 17,695 | 0.7738 | 0.6725 | 0.7196 | 0.9668 |
multinerd | ๐ต๐ฑ PL-Polish | 19,555 | 0.8046 | 0.6369 | 0.7110 | 0.9510 |
multinerd | ๐ช๐ธ ES-Spanish | 17,399 | 0.7893 | 0.6374 | 0.7053 | 0.9653 |
multinerd | ๐ต๐น PT-Portuguese | 17,815 | 0.7471 | 0.6083 | 0.6706 | 0.9585 |
multinerd | ๐ฎ๐น IT-Italian | 18,217 | 0.7424 | 0.5844 | 0.6540 | 0.9619 |
multinerd | ๐จ๐ณ ZH-Chinese | 19,577 | 0.3193 | 0.2353 | 0.2709 | 0.8184 |
wikiann | ๐น wikiann_full | 70,000 | 0.6214 | 0.6199 | 0.6202 | 0.8099 |
wikiann | sv (Swedish) | 10,000 | 0.7174 | 0.6662 | 0.6909 | 0.8843 |
wikiann | de (German) | 10,000 | 0.6874 | 0.6352 | 0.6603 | 0.8938 |
wikiann | it (Italian) | 10,000 | 0.6506 | 0.6459 | 0.6482 | 0.8362 |
wikiann | es (Spanish) | 10,000 | 0.6076 | 0.6560 | 0.6309 | 0.7726 |
wikiann | fr (French) | 10,000 | 0.6017 | 0.6080 | 0.6049 | 0.7581 |
wikiann | pt (Portuguese) | 10,000 | 0.5613 | 0.5976 | 0.5789 | 0.7517 |
wikiann | en (English) | 10,000 | 0.5238 | 0.5304 | 0.5271 | 0.7729 |
multiconer2023 | ๐น multiconer2023_full | 1,991,359 | 0.5957 | 0.5923 | 0.5937 | 0.9160 |
multiconer2023 | IT-Italian | 247,881 | 0.6566 | 0.6654 | 0.6609 | 0.9225 |
multiconer2023 | SV-Swedish | 231,190 | 0.6468 | 0.6332 | 0.6400 | 0.9182 |
multiconer2023 | UK-Ukrainian | 238,296 | 0.6123 | 0.5994 | 0.6058 | 0.9232 |
multiconer2023 | FR-French | 249,786 | 0.6039 | 0.5971 | 0.6005 | 0.9122 |
multiconer2023 | ES-Spanish | 246,900 | 0.5889 | 0.6060 | 0.5974 | 0.9212 |
multiconer2023 | PT-Portuguese | 229,490 | 0.5928 | 0.5987 | 0.5957 | 0.9197 |
multiconer2023 | MULTI-Multilingual | 358,668 | 0.5787 | 0.5840 | 0.5813 | 0.9118 |
multiconer2023 | DE-German | 20,145 | 0.5625 | 0.5993 | 0.5803 | 0.9148 |
multiconer2023 | EN-English | 249,980 | 0.5620 | 0.5818 | 0.5718 | 0.9078 |
multiconer2023 | HI-Hindi | 18,399 | 0.5308 | 0.5575 | 0.5438 | 0.9312 |
multiconer2023 | BN-Bangla | 19,859 | 0.5029 | 0.5275 | 0.5149 | 0.9079 |
multiconer2023 | FA-Farsi | 219,168 | 0.5286 | 0.4606 | 0.4923 | 0.9072 |
multiconer2023 | ZH-Chinese | 20,265 | 0.4129 | 0.4904 | 0.4483 | 0.8619 |
During inference, for any input text, our fine-tuned model (microsoft/mdeberta-v3-base with merged LoRA parameters) passes subword token representations through its 12 Transformer layers to output a 95-dimensional logit vector per token. PyTorch applies a softmax function across all 95 output tags to compute normalized probability confidence scores:
P(tag_k | token_i) = exp(z_k) / ฮฃ exp(z_j) for k โ {1, 2, ..., 95}
B-INST: 72.4%, B-ORG: 21.1%, B-Facility: 5.3%), capturing semantic cross-taxonomy relationships.from transformers import pipeline
ner_pipeline = pipeline(
"token-classification",
model="Rishabh157/unified-multilingual-ner-mdeberta",
aggregation_strategy="simple"
)
text = "Barack Obama visited the United Nations headquarters in New York City."
entities = ner_pipeline(text)
for entity in entities:
print(f"{entity['word']:<25} | {entity['entity_group']:<15} | Score: {entity['score']:.4f}")
import torch
from transformers import AutoTokenizer, AutoModelForTokenClassification
model_name = "Rishabh157/unified-multilingual-ner-mdeberta"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForTokenClassification.from_pretrained(model_name)
text = "Emmanuel Macron est le prรฉsident de la Rรฉpublique franรงaise ร Paris."
inputs = tokenizer(text, return_tensors="pt")
with torch.no_grad():
outputs = model(**inputs)
predictions = torch.argmax(outputs.logits, dim=2)
tokens = tokenizer.convert_ids_to_tokens(inputs["input_ids"][0])
labels = [model.config.id2label[p.item()] for p in predictions[0]]
for token, label in zip(tokens, labels):
if label != "O":
print(f"{token:<20} -> {label}")
0.76โ0.86 on MultiNERD) due to richer training data availability.ZH), Farsi (FA), Bangla (BN), and Hindi (HI) show room for improvement and can benefit from additional fine-tuning on language-specific corpora.Food from MultiCoNER and FOOD from MultiNERD) and are treated as distinct classes to preserve dataset fidelity.If you use this model, dataset pipeline, or findings in your research, please cite:
@misc{kumar2026multilingualner,
author = {Rishabh Kumar},
title = {Unified Fine-Grained Multilingual NER with mDeBERTa-v3},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/Rishabh157/unified-multilingual-ner-mdeberta}}
}