← all repositories
maziyarpanahi/openmed

Medical NLP that runs in a Swift app, not a $50k contract

OpenMed packages clinical entity extraction and HIPAA-grade de-identification into models small enough for Apple Silicon and impatient DevOps teams.

Feature · 16 Jun 2026
OpenMed’s Thousand-Model Bet on Clinical NLP Without the Cloud

An open-source toolkit tries to solve healthcare’s unstructured-data problem by running specialized NER and de-identification models entirely on-device.

Read the in-depth article
openmed
Velocity · 7d
+12
★ / day
Trend
cooling
star history

What it does OpenMed is a Python toolkit and Swift package for extracting structured medical entities from clinical text. It bundles a registry of 12+ specialized transformer models—disease detection, drug identification, anatomy, genes, and PII—behind a single analyze_text() call. A FastAPI service and batch processor wrap the same models for backend use, while OpenMedKit ports the PII and privacy-filter workloads to MLX on macOS and iOS.

The interesting bit The project treats “production-ready” as a feature, not a slogan. It ships configuration profiles (dev/prod/fast), request validation with unified error envelopes, and smart entity merging to fix tokenization fragmentation on dates and clinical IDs. The de-identification layer is unusually thorough: six masking strategies including Faker-backed locale-aware surrogates, cryptographic hashing, and deterministic replacement with per-document consistency.

Key highlights

  • Runs fully offline with local model paths; explicitly blocks Hugging Face Hub calls when a local directory is supplied
  • Apple Silicon acceleration via both Python MLX and Swift OpenMedKit; CoreML fallback for bundled models
  • Privacy Filter family re-implements OpenAI’s sparse-MoE architecture (local attention, sink tokens, RoPE+YaRN) on three training sets: OpenAI’s own, NVIDIA Nemotron-PII, and a multilingual variant
  • PII coverage claims all 18 HIPAA Safe Harbor identifiers with configurable confidence thresholds
  • Apache 2.0 licensed; Docker image and Colab notebook provided

Caveats

  • The broader OpenMed model-to-Swift conversion pipeline is still “active work,” so only PII, Privacy Filter, and experimental GLiNER tasks are currently portable to iOS
  • README claims models “outperform proprietary solutions” but cites no benchmarks or comparison numbers
  • Most models are in the 109M–434M range; the “12+” registry is real but the catalog table only shows five entries

Verdict Worth a look if you need clinical NER or de-identification without cloud lock-in, especially in Apple-ecosystem deployments. Skip if you require validated accuracy claims against commercial competitors or mature Android/Windows on-device support.

Frequently asked

What is maziyarpanahi/openmed?
OpenMed packages clinical entity extraction and HIPAA-grade de-identification into models small enough for Apple Silicon and impatient DevOps teams.
Is openmed open source?
Yes — maziyarpanahi/openmed is open source, released under the Apache-2.0 license.
What language is openmed written in?
maziyarpanahi/openmed is primarily written in Python.
How popular is openmed?
maziyarpanahi/openmed has 4.7k stars on GitHub and is currently cooling off.
Where can I find openmed?
maziyarpanahi/openmed is on GitHub at https://github.com/maziyarpanahi/openmed.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.