A fine-tuned Named Entity Recognition (NER) model based on ai4bharat/indic-bert for extracting medical and regulatory entities from Indian language documents.
Model Details
Overview
This model is fine-tuned for NER tasks on medical and regulatory documents, specifically for identifying entities in adverse event reports and regulatory submissions. It extends the multilingual Indic-BERT base model with specialized training on pharmaceutical and medical regulatory terminology.
Complete entity taxonomy available in the dataset repository.
Usage
Installation
pip install transformers torch
Basic Usage
python
1from transformers import AutoTokenizer, AutoModelForTokenClassification
2from transformers import pipeline
34# Load model and tokenizer5model_name ="sharkdodo/Indic-Bert-NER-Model"6tokenizer = AutoTokenizer.from_pretrained(model_name)7model = AutoModelForTokenClassification.from_pretrained(model_name)89# Create NER pipeline10ner_pipeline = pipeline(11"token-classification",12 model=model,13 tokenizer=tokenizer,14 aggregation_strategy="simple"15)1617# Example text18text ="This drug is made from paracetamol and is used for headache treatment."1920# Perform NER21results = ner_pipeline(text)22print(results)
Advanced Usage with Custom Labels
python
1from transformers import AutoTokenizer, AutoModelForTokenClassification
2import torch
34model_name ="sharkdodo/Indic-Bert-NER-Model"5tokenizer = AutoTokenizer.from_pretrained(model_name)6model = AutoModelForTokenClassification.from_pretrained(model_name)78text ="The drug dosage is 500 milligrams daily."9inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)1011# Get predictions12outputs = model(**inputs)13predictions = torch.argmax(outputs.logits, dim=2)1415# Map predictions to labels16id2label = model.config.id2label
17tokens = tokenizer.convert_ids_to_tokens(inputs["input_ids"][0])1819for token, pred inzip(tokens, predictions[0].numpy()):20print(f"{token}: {id2label[pred]}")
Batch Processing
python
1from transformers import pipeline
23ner = pipeline(4"token-classification",5 model="redpanda/Indic-Bert-NER-Model",6 aggregation_strategy="simple"7)89texts =[10"Paracetamol is commonly used to treat headaches and fever.",11"Take Ibuprofen 400 milligrams tablet for pain relief."12]1314results =[ner(text)for text in texts]15for text, entities inzip(texts, results):16print(f"Text: {text}")17print(f"Entities: {entities}\n")
Model Card
Model Use
Intended Use: Named Entity Recognition for medical and regulatory documents in Indian languages.
Primary Users:
Healthcare professionals
Regulatory compliance teams
Medical document processors
Adverse event monitoring systems
Limitations
Model trained primarily on English-transliterated Indian languages and Hindi
Performance may vary on regional language variations
Best performance on well-formatted documents
Trained on specific pharmaceutical and regulatory domain
Ethical Considerations
Use only for legitimate regulatory and medical purposes
Ensure data privacy compliance when processing sensitive health information
Do not use for automated decision-making in clinical settings without human review
Respect patient confidentiality and HIPAA/DPDP compliance
License
This model is released under the MIT License.
MIT License
Copyright (c) 2026 Vivek Molleti
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
Citation
If you use this model in your research or application, please cite:
bibtex
1@model{indic_bert_ner_2026,
2 title = {Indic-Bert-NER-Model},
3 author = {Vivek Molleti},
4 year = {2026},
5 url = {https://huggingface.co/sharkdodo/Indic-Bert-NER-Model},
6 note = {Fine-tuned from AI4Bharat's Indic-BERT}
7}