Downloads · 30 days
17
2% of all-time downloads
DipaHealth/DipaMed-1
DipaMed-1 is a text generation model from DipaHealth. Use it when you need the model to write or continue text. The card lists the license as llama3.1.
A language model specialised on Nigerian clinical guidelines.
Downloads · 30 days
17
2% of all-time downloads
All-time downloads
702
Public
Parameters
8B
16.1 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors16.1 GB · 100%
From the Hugging Face model README
A language model specialised on Nigerian clinical guidelines.
DipaMed-1 adapts Meta's Llama-3.1-8B to Nigerian medicine, grounded in Federal Ministry of Health (FMOH) and Nigeria Centre for Disease Control (NCDC) clinical guidelines. It is built to give locally-appropriate clinical guidance that reflects Nigerian disease priorities, the Nigerian Essential Medicines List, and national treatment protocols.
Intended use: clinical decision support for trained health workers. DipaMed-1 is not an autonomous diagnostic system and must not be used to make patient-care decisions without a qualified clinician.
On NigeriaMedQA, DipaMed-1 outperforms its base model on the Nigeria-specific clinical topics it was built for:
| Topic | DipaMed-1 | Base Llama-3.1-8B | Improvement |
|---|---|---|---|
| Mental health | 95.8% | 87.5% | +8.3 |
| Maternal emergencies | 90.6% | 84.4% | +6.2 |
| Drug availability | 72.8% | 67.0% | +5.8 |
| Hypertension | 68.5% | 64.8% | +3.7 |
| Tuberculosis-HIV | 82.4% | 79.4% | +3.0 |
| Lassa fever | 79.5% | 76.9% | +2.6 |
| Sickle cell disease | 81.8% | 80.0% | +1.8 |
| Outbreak diseases | 62.1% | 60.3% | +1.8 |
These are the diseases and decisions that matter most in Nigerian practice. Across the full benchmark, DipaMed-1 performs comparably to the base model overall (76.3% vs 77.0%), while delivering these gains where Nigerian specialisation counts.
General medical models are trained on North American and European data. DipaMed-1 is grounded in Nigerian guidelines, giving Nigeria-appropriate answers a general model cannot: correct local first-line treatments, Essential-Medicines-List-aware choices, and NCDC/FMOH-aligned protocols.
| Stage | Purpose | Data |
|---|---|---|
| Continued pretraining | Absorb Nigerian medical knowledge | 156 million words of Nigerian biomedical text (PubMed abstracts, open-access PMC full-text, clinical guidelines); approx. 254M tokens |
| Instruction tuning | Learn to answer clinical questions | Q&A generated from and independently verified against real Nigerian guidelines, plus cleaned expert-created sources (PubMedQA, MedQA-USMLE, WikiDoc) |
Training used QLoRA (rank 16), a learning-rate sweep with model selection on a held-out validation set, and completion-only loss masking. The evaluation benchmark was kept fully uncontaminated and used only once for final scoring. The pretraining corpus is not released; its construction methodology is described in the accompanying paper.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "DipaHealth/DipaMed-1"
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
tok = AutoTokenizer.from_pretrained(model_id)
messages = [
{"role": "system", "content": "You are DipaMed-1, a clinical AI assistant grounded in Nigerian guidelines."},
{"role": "user", "content": "First-line treatment for uncomplicated malaria in a non-pregnant adult in Nigeria?"},
]
input_ids = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(input_ids=input_ids, max_new_tokens=256, do_sample=False, pad_token_id=tok.eos_token_id)
print(tok.decode(out[0][input_ids.shape[1]:], skip_special_tokens=True))
For production, wrap DipaMed-1 in a retrieval-augmented (RAG) pipeline over the Nigerian guidelines: retrieve the relevant passage, give it to the model, and have it answer from that passage with a citation. This substantially improves factual reliability, especially for exact drug doses where all language models are unreliable from memory, and lets the system cite its source. A dedicated DipaMed RAG service is planned as a separate release.
@misc{dipamed2026,
title = {DipaMed-1: A Nigerian Guideline-Specialised Clinical Language Model},
author = {Ibhate, Destiny Ebhodaghe},
year = {2026},
howpublished = {\url{https://huggingface.co/DipaHealth/DipaMed-1}}
}
Built on Meta Llama-3.1-8B. Evaluated with NigeriaMedQA. Grounded in FMOH and NCDC clinical guidelines.