Instructions to use Rishabh157/spanmarker-multinerd-mdeberta with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- SpanMarker
How to use Rishabh157/spanmarker-multinerd-mdeberta with SpanMarker:
from span_marker import SpanMarkerModel model = SpanMarkerModel.from_pretrained("Rishabh157/spanmarker-multinerd-mdeberta") - Notebooks
- Google Colab
- Kaggle
SpanMarker-mDeBERTa-v3-MultiNERD
Developed by: Rishabh Kumar
Model Name: Rishabh157/spanmarker-multinerd-mdeberta
Base Architecture: microsoft/mdeberta-v3-base
A state-of-the-art multilingual Named Entity Recognition (NER) model developed by Rishabh Kumar, built on microsoft/mdeberta-v3-base using the SpanMarker framework.
This model is fine-tuned on the full MultiNERD dataset across 10 languages (English, German, Spanish, French, Italian, Dutch, Polish, Portuguese, Russian, and Chinese) covering 15 fine-grained entity types.
Unlike traditional sequence taggers that assign BIO labels token-by-token (which often suffer from boundary fragmentation), SpanMarker explicitly scores candidate phrase spans [S_i, E_j] directly inside mDeBERTa's disentangled attention mechanism, yielding high boundary accuracy (87.31% Overall Precision and 92.71% Overall Accuracy).
Model Details
- Developer / Creator: Rishabh Kumar (@Rishabh157)
- Base Backbone:
microsoft/mdeberta-v3-base(276M parameters) - Framework: SpanMarker (PL-Marker candidate span formulation)
- Languages (10): English (
en), German (de), Spanish (es), French (fr), Italian (it), Dutch (nl), Polish (pl), Portuguese (pt), Russian (ru), Chinese (zh) - Number of Entity Classes: 15 entity types (31 classification classes including labels +
O) - Max Sequence Length (
model_max_length): 384 tokens (empirically covers 100% of sentences across all 10 languages without truncation) - Max Entity Length (
entity_max_length): 24 words (covers 99.993% of entity spans) - Marker Window Size (
marker_max_length): 128 tokens
Evaluation Results
Evaluated on the official MultiNERD validation set (167,400 sentences across 10 languages):
Overall Metrics
| Metric | Score |
|---|---|
| Overall F1 | 73.35% |
| Overall Precision | 87.31% |
| Overall Recall | 63.24% |
| Overall Accuracy | 92.71% |
| Validation Loss | 0.0089 |
Per-Class Performance Breakdown
| Entity Class | Description | Precision | Recall | F1 Score | Support (# Spans) |
|---|---|---|---|---|---|
| LOC | Location (cities, countries, geography) | 93.53% | 70.08% | 80.12% | 82,574 |
| PER | Person (names, public figures) | 91.35% | 65.66% | 76.40% | 61,945 |
| ORG | Organization (companies, institutions) | 89.47% | 66.54% | 76.32% | 15,560 |
| ANIM | Animal (fauna, species) | 79.99% | 63.62% | 70.87% | 15,995 |
| TIME | Time / Eras / Historical periods | 80.43% | 62.78% | 70.52% | 31,701 |
| EVE | Events (wars, sports, festivals) | 87.20% | 58.70% | 70.16% | 5,767 |
| MYTH | Mythological entities | 78.25% | 52.01% | 62.48% | 1,819 |
| VEHI | Vehicles (aircraft, cars, ships) | 77.56% | 51.85% | 62.15% | 540 |
| MEDIA | Media (books, movies, albums) | 85.72% | 48.09% | 61.61% | 15,259 |
| CEL | Celestial bodies (planets, stars) | 80.97% | 49.70% | 61.60% | 2,012 |
| PLANT | Plant / Flora species | 65.29% | 50.50% | 56.95% | 7,539 |
| DIS | Disease / Medical conditions | 71.70% | 39.65% | 51.06% | 6,934 |
| INST | Instruments / Tools | 75.42% | 37.27% | 49.89% | 609 |
| FOOD | Food / Beverages | 63.71% | 38.62% | 48.09% | 6,703 |
| BIO | Biological entities | 60.94% | 23.35% | 33.77% | 167 |
Note on "Support (# Spans)": In Named Entity Recognition benchmarks, Support indicates the exact number of ground-truth entity spans belonging to that category in the evaluation set. It defines the sample size over which Recall and F1 are computed, providing transparency into entity frequency across the corpus.
Quickstart & Usage
1. Installation
pip install span-marker transformers torch
2. Direct Inference
from span_marker import SpanMarkerModel
# Load the model
model = SpanMarkerModel.from_pretrained("Rishabh157/spanmarker-multinerd-mdeberta")
# Example 1: English
text_en = "AstraZeneca developed the Oxford vaccine for COVID-19 in London during 2020."
entities_en = model.predict(text_en)
print("English Entities:", entities_en)
# Example 2: German
text_de = "Alexander von Humboldt reiste nach Südamerika und erforschte den Orinoco."
entities_de = model.predict(text_de)
print("German Entities:", entities_de)
# Example 3: Chinese
text_zh = "北京大学和清华大学位于中国北京市海淀区。"
entities_zh = model.predict(text_zh)
print("Chinese Entities:", entities_zh)
Output Format
[
{'span': 'AstraZeneca', 'label': 'ORG', 'score': 0.992, 'char_start_index': 0, 'char_end_index': 11},
{'span': 'COVID-19', 'label': 'DIS', 'score': 0.985, 'char_start_index': 44, 'char_end_index': 52},
{'span': 'London', 'label': 'LOC', 'score': 0.998, 'char_start_index': 56, 'char_end_index': 62},
{'span': '2020', 'label': 'TIME', 'score': 0.941, 'char_start_index': 70, 'char_end_index': 74}
]
Training Details
- Dataset Source:
Babelscape/multinerd(1,339,200 training sentences, 167,400 validation sentences) - Effective Batch Size: 16 (per-device batch size 8 × gradient accumulation 2)
- Optimizer: AdamW (
betas=(0.9, 0.999),eps=1e-08,weight_decay=0.01) - Learning Rate: 3.0e-5 with Linear Decay
- Warmup Ratio: 0.1 (first 13,545 steps)
- Precision: FP16 mixed precision
- Total Optimization Steps: 135,450 steps (1 full pass over 2,167,200 candidate span windows)
Author & Citation
This model was trained, evaluated, and published by Rishabh Kumar (@Rishabh157).
If you use this model or refer to this work, please cite:
@misc{rishabhkumar2026_spanmarker_multinerd,
author = {Rishabh Kumar},
title = {SpanMarker Multilingual NER with mDeBERTa-v3 on MultiNERD},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/Rishabh157/spanmarker-multinerd-mdeberta}}
}
- Downloads last month
- 18
Model tree for Rishabh157/spanmarker-multinerd-mdeberta
Base model
microsoft/mdeberta-v3-baseDataset used to train Rishabh157/spanmarker-multinerd-mdeberta
Evaluation results
- Overall F1 on MultiNERD (10 Languages)validation set self-reported0.734
- Overall Precision on MultiNERD (10 Languages)validation set self-reported0.873
- Overall Recall on MultiNERD (10 Languages)validation set self-reported0.632
- Overall Accuracy on MultiNERD (10 Languages)validation set self-reported0.927