CoolFace
Modelpublic

OpenMed/OpenMed-PII-French-BioClinicalModern-Base-149M-v1-onnx-android

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes13downloads
Model Card

<div align="center"> <img src="https://raw.githubusercontent.com/maziyarpanahi/openmed/master/docs/brand/openmed-mascot-lockup.png" alt="OpenMed: on-device clinical AI" width="360">

OpenMed PII Detection 149M

OpenMed/OpenMed-PII-French-BioClinicalModern-Base-149M-v1-onnx-android

A 149M ModernBERT model for detecting personal and clinical identifiers in French clinical and biomedical text. Runs locally after download on Python CPU, in the browser, and on Android.

OpenMed | Documentation | Model collection | Paper </div>

Model

FieldValue
TaskPII token classification
LanguageFrench
ArchitectureModernBERT
Parameters149M (149,000,000)
Maximum sequence length512 tokens
Entity labelsACCOUNTNAME, AGE, AMOUNT, BANKACCOUNT, BIC, BITCOINADDRESS, BUILDINGNUMBER, CITY, COUNTY, CREDITCARD, CREDITCARDISSUER, CURRENCY, CURRENCYCODE, CURRENCYNAME, CURRENCYSYMBOL, CVV, DATE, DATEOFBIRTH, EMAIL, ETHEREUMADDRESS, EYECOLOR, FIRSTNAME, GENDER, GPSCOORDINATES, HEIGHT, IBAN, IMEI, IPADDRESS, JOBDEPARTMENT, JOBTITLE, LASTNAME, LITECOINADDRESS, MACADDRESS, MASKEDNUMBER, MIDDLENAME, OCCUPATION, ORDINALDIRECTION, ORGANIZATION, PASSWORD, PHONE, PIN, PREFIX, SECONDARYADDRESS, SEX, SSN, STATE, STREET, TIME, URL, USERAGENT, USERNAME, VIN, VRM, ZIPCODE
Source model`OpenMed/OpenMed-PII-French-BioClinicalModern-Base-149M-v1`
Licenseapache-2.0

OpenMed in Python on CPU

bash
pip install --upgrade "openmed[onnx-runtime]"
python
from openmed import OnnxModel

model = OnnxModel.from_pretrained("OpenMed/OpenMed-PII-French-BioClinicalModern-Base-149M-v1-onnx-android")
entities = model("Patient Alice Nguyen can be reached at alice@example.org.")

for entity in entities:
    print(entity.to_dict())

OpenMed selects the CPU-oriented INT8 graph by default and returns labels, confidence scores, exact character offsets, and source text.

OpenMed in Web

bash
npm install openmed @huggingface/transformers onnxruntime-web
typescript
import { loadOnnxModel } from "openmed";

const repo = "OpenMed/OpenMed-PII-French-BioClinicalModern-Base-149M-v1-onnx-android";
const model = await loadOnnxModel(repo);
const entities = await model("Patient Alice Nguyen can be reached at alice@example.org.");

The default INT8 path runs with WebAssembly. For WebGPU, select the FP16 graph:

typescript
const model = await loadOnnxModel(repo, {
  variant: "fp16",
  device: "webgpu",
});

OpenMedKit for Android

Add JitPack to the consumer application's settings.gradle.kts:

kotlin
dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
        maven {
            url = uri("https://jitpack.io")
            content { includeGroup("com.github.maziyarpanahi") }
        }
    }
}

Use the latest OpenMed build from the master branch:

kotlin
dependencies {
    implementation("com.github.maziyarpanahi:openmed:master-SNAPSHOT")
}

After downloading this model repository into an app-controlled directory:

kotlin
import com.openmed.openmedkit.OpenMedKit

OpenMedKit.fromDirectory(modelDirectory).use { model ->
    val entities = model.analyzeText("Patient Alice Nguyen can be reached at alice@example.org.")
}

Inference and tokenization remain on-device.

Included Artifacts

ArtifactRecommended use
model_int8.onnxCPU, WebAssembly, and Android default
model_fp16.onnxWebGPU and compatible accelerated runtimes
model.onnxFull-precision reference
model.ortCustom ONNX Runtime Mobile integration
tokenizer.jsonCross-platform tokenizer
openmed-onnx.jsonRuntime contract and operator metadata

All graphs use opset 18, dynamic batch and sequence axes, stable tensor names, and source-text offset metadata.

The OpenMed Ecosystem

This model is part of OpenMed, an Apache-2.0, local-first clinical AI stack:

  • 2,000+ medical models for clinical NER, biomedical extraction, and privacy.
  • PII detection and de-identification across 55+ identifier types and 17 languages.
  • Python, MLX, Swift, Android, React Native, Web, REST, and gRPC runtimes.
  • Structured and multimodal intake for OCR, documents, DICOM, FHIR, and HL7.
  • Offline and air-gapped deployment with no telemetry by default.

Intended Use and Limitations

This model is intended for detecting personal and clinical identifiers. It does not diagnose conditions or make clinical decisions. Evaluate recall, thresholds, and span behavior on appropriately governed data before deployment. Local execution supports privacy-preserving workflows but does not by itself guarantee regulatory compliance.

All examples in this card are synthetic.

Citation

bibtex
@misc{panahi2025openmedneropensourcedomainadapted,
  title={OpenMed NER: Open-Source, Domain-Adapted State-of-the-Art
         Transformers for Biomedical NER Across 12 Public Datasets},
  author={Maziyar Panahi},
  year={2025},
  eprint={2508.01630},
  archivePrefix={arXiv},
  primaryClass={cs.CL}
}