Download Latest Version OpenMed v1.4.0 source code.tar.gz (15.9 MB)
Email in envelope

Get an email when there's a new version of OpenMed

Home / v1.2.0
Name Modified Size InfoDownloads / Week
Parent folder
OpenMed v1.2.0 source code.tar.gz 2026-04-24 8.5 MB
OpenMed v1.2.0 source code.zip 2026-04-24 8.6 MB
README.md 2026-04-24 8.8 kB
Totals: 3 Items   17.1 MB 0

OpenMed v1.2.0 is the on-device healthcare AI release.

This release takes the Apple and MLX foundation from v1.0.0 and turns it into a fuller local inference platform: Python MLX, Swift OpenMedKit, public Privacy Filter artifacts, experimental GLiNER-family extraction, and a redesigned iPhone scan demo that feels like a product instead of a debug console.

The headline: OpenMed can now run more of the clinical document workflow locally, from PII de-identification to clinical entity and relation extraction, across Python, macOS, and iOS.

Highlights

  • Expanded Python MLX runtime support for OpenMed token-classification artifacts, OpenAI Privacy Filter artifacts, GLiNER span NER, GLiClass zero-shot classification, and GLiNER-Relex relation extraction.
  • Added native Swift OpenMedKit MLX runtimes for DeBERTa-v2/v3-backed GLiNER-family artifacts and OpenAI Privacy Filter.
  • Added public Swift APIs for zero-shot NER, zero-shot classification, and relation extraction.
  • Added local support for OpenMed/privacy-filter-mlx and OpenMed/privacy-filter-mlx-8bit, including the smaller 8-bit artifact for Apple apps.
  • Rebuilt the scan demo into a guided iPhone workflow: document input, OCR review, PII de-identification, clinical extraction, summary, comparison, and export.
  • Improved model download and cache behavior so public artifacts are prepared once and reused offline.
  • Removed Hugging Face token UI from demo flows now that release artifacts are public.

Why This Release Matters

Healthcare AI demos often look impressive until the document leaves the device.

OpenMed v1.2.0 moves in the opposite direction. The goal is a practical local-first workflow where a clinical note can be scanned, reviewed, de-identified, analyzed, and summarized without requiring inference through an external service.

That matters for:

  • clinical app prototypes that need to feel real on iPhone and macOS
  • teams evaluating local PII and de-identification workflows
  • developers building Swift apps around OpenMed models
  • researchers comparing OpenMed PII, OpenAI Privacy Filter, and GLiNER-style extraction
  • anyone who wants healthcare NLP to be portable, inspectable, and less dependent on vendor-hosted inference

Python MLX

Python MLX now understands OpenMed custom task artifacts through openmed-mlx.json manifests.

New or expanded runtime paths include:

  • token-classification
  • openai-privacy-filter
  • zero-shot-ner
  • zero-shot-sequence-classification
  • zero-shot-relation-extraction

The Privacy Filter runtime includes:

  • tiktoken-style tokenization
  • byte-offset reconstruction
  • BIOES/Viterbi decoding
  • model-led span repair
  • support for weights.safetensors with weights.npz fallback

Install:

:::bash
pip install -U "openmed[mlx]"

Run the public 8-bit Privacy Filter artifact:

:::python
from huggingface_hub import snapshot_download
from openmed.mlx.inference import create_mlx_pipeline

model_path = snapshot_download("OpenMed/privacy-filter-mlx-8bit")
pipe = create_mlx_pipeline(model_path)

entities = pipe("Alice Smith emailed alice@example.com and called 415-555-0101.")
print(entities)

Run GLiNER-Relex relation extraction:

:::python
from huggingface_hub import snapshot_download
from openmed.mlx.inference import GLiNERRelexMLXPipeline

model_path = snapshot_download("OpenMed/gliner-relex-base-v1.0-mlx")
extractor = GLiNERRelexMLXPipeline(model_path)

result = extractor.inference(
    "Aspirin was prescribed for headache after the patient reported migraine symptoms.",
    labels=["medication", "condition", "symptom"],
    relations=["treats", "associated with"],
    threshold=0.5,
    relation_threshold=0.9,
)

print(result["entities"])
print(result["relations"])

Swift And OpenMedKit

OpenMedKit now goes well beyond the first token-classification milestone.

New Swift runtime support includes:

  • native DeBERTa-v2/v3 MLX modules for GLiNER-family artifacts
  • native OpenAI Privacy Filter MLX model support
  • native Privacy Filter tokenizer and post-processing
  • OpenMed MLX artifact task/family validation
  • cached public model downloads through OpenMedModelStore

New public APIs:

:::swift
OpenMedZeroShotNER
OpenMedZeroShotClassifier
OpenMedRelationExtractor

Swift Package Manager:

:::swift
dependencies: [
    .package(url: "https://github.com/maziyarpanahi/openmed.git", from: "1.2.0"),
]

Run Privacy Filter on device:

:::swift
import OpenMedKit

let modelURL = try await OpenMedModelStore.downloadMLXModel(
    repoID: "OpenMed/privacy-filter-mlx-8bit"
)

let openmed = try OpenMed(backend: .mlx(modelDirectoryURL: modelURL))

let entities = try openmed.extractPII(
    "Alice Smith emailed alice@example.com and called 415-555-0101."
)

Run GLiNER-Relex relation extraction:

:::swift
import OpenMedKit

let modelURL = try await OpenMedModelStore.downloadMLXModel(
    repoID: "OpenMed/gliner-relex-base-v1.0-mlx"
)

let extractor = try OpenMedRelationExtractor(modelDirectoryURL: modelURL)

let result = try extractor.extract(
    "Aspirin was prescribed for headache after migraine symptoms.",
    entityLabels: ["medication", "condition", "symptom"],
    relationLabels: ["treats", "associated with"],
    threshold: 0.5,
    relationThreshold: 0.9
)

Demo Apps

The demo apps are now much closer to the release experience we want users to see.

swift/OpenMedDemo now includes the public 8-bit Privacy Filter artifact as a selectable MLX model for macOS and iOS testing.

swift/OpenMedScanDemo has been redesigned around a guided clinical workflow:

  1. Add a document by scanning, loading the sample, or pasting text.
  2. Review OCR output before analysis.
  3. Run de-identification with a selectable PII engine.
  4. Run clinical extraction with GLiNER-Relex presets.
  5. Review safe text, identifiers removed, clinical entities, and export-ready results.

The scan demo also includes:

  • a generated clinical sample document image
  • model preparation and download progress UI
  • offline cache reuse after first download
  • PII engine comparison
  • App Store privacy assets for local document scanning
  • no visible token setup flow in the public release path

Upgrade Notes

  • No intentional Python API breaking changes from v1.0.0.
  • Update Swift package requirements to from: "1.2.0" after the release tag is published.
  • MLX inference should be validated on Apple Silicon macOS or a physical iPhone/iPad.
  • iOS Simulator remains outside the MLX acceptance path.
  • GLiNER-family MLX support is experimental while parity and quality testing continue.
  • Conversion/export internals remain active platform work. Public users should consume the published OpenMed MLX artifacts.

Validation

Release-prep validation completed on April 24, 2026:

:::bash
python -m pytest tests/unit/mlx/test_mlx_inference.py tests/unit/mlx/test_privacy_filter_mlx.py tests/unit/test_pii.py tests/unit/test_pii_entity_merger.py
cd swift/OpenMedKit && swift test
xcodebuild -project swift/OpenMedDemo/OpenMedDemo.xcodeproj -scheme OpenMedDemo -destination 'generic/platform=iOS' build
xcodebuild -project swift/OpenMedScanDemo/OpenMedScanDemo.xcodeproj -scheme OpenMedScanDemo -destination 'generic/platform=iOS' build

Results:

  • Python targeted tests: 143 passed, 1 skipped
  • Swift OpenMedKit tests: 47 passed, 12 skipped
  • OpenMedDemo generic iOS build: passed
  • OpenMedScanDemo generic iOS build: passed

The Swift skips are the existing SwiftPM CLI guard for tests that require real MLX runtime resources. Physical-device MLX smoke testing remains the acceptance path for those gated artifact tests.

Thank You

OpenMed v1.2.0 is a release about making healthcare NLP feel more local, more practical, and more usable by real app developers.

Thank you to everyone testing the models, trying the Apple demos, filing sharp feedback, and pushing OpenMed toward a better open-source healthcare AI stack.

What's Changed

Full Changelog: https://github.com/maziyarpanahi/openmed/compare/v1.1.0...v1.2.0

Source: README.md, updated 2026-04-24