SkillsReviewed · maziyarpanahi

Running OpenMed on-device

Running OpenMed on-device is an assistant skill for developers deploying clinical text models locally, but model compression can make detection miss sensitive patient details. It documents MLX, Core ML and ONNX/WebGPU deployment, plus local MLX language-model generation. Runtime behavior, performance and privacy guarantees have not been independently verified.

Researched 17 Nov 2026

In short.

Running OpenMed on-device is a deployment skill for developers processing clinical text locally, but the guide alone does not establish accurate removal of sensitive information or that data stays on the device. It describes model conversion and compression for MLX, Core ML and ONNX/WebGPU, with a separate MLX language-model generation path. MLX artifacts use OpenMed APIs; Core ML and ONNX exports require integration with their respective runtimes. No commands or models were run, and no measured accuracy, latency, memory use or network behavior is established.

Researched and written by an AI model and checked by a second AI model. How it works

The selected scope is skills/running-openmed-ondevice at revision e8325586e1ce2da73e9e865f34bd0345bb64301a. Its complete supplied folder content is SKILL.md; the repository LICENSE and NOTICE provide related licensing context from outside that folder. OpenMed source modules, sibling skills, dependencies, models, datasets and external references are excluded. No code or models were executed. Conversion success, runtime compatibility, accuracy retention, performance, offline operation and privacy claims remain unverified.

The overview

identity

The resource is running-openmed-ondevice, an assistant skill in the maziyarpanahi/openmed repository. Its instruction file explains how to deploy OpenMed models on Apple Silicon Macs, Apple mobile devices and cross-platform or browser runtimes.

The original folder is [https://github.com/maziyarpanahi/openmed/tree/master/skills/running-openmed-ondevice]. The supplied source is pinned to revision e8325586e1ce2da73e9e865f34bd0345bb64301a. This resource is the skill and its deployment instructions; OpenMed implementation files and model weights are outside the supplied scope.

assessment

The skill offers a concrete starting point for moving clinical text processing onto local hardware. It identifies installation extras, conversion entry points, output artifacts and runtime choices, and distinguishes direct MLX loading through OpenMed from native Core ML or ONNX integration.

Its strongest practical caution concerns detection accuracy after compression. A smaller artifact may miss sensitive information, so successful conversion would not establish reliable de-identification. The guide supplies no measured results demonstrating accuracy retention, performance gains or offline operation.

users

The intended users are developers building local clinical text processing: named-entity recognition, which identifies entities in text; de-identification, which removes or replaces identifying information; and language-model generation on MLX.

Beginners can use the backend comparison to understand deployment options. Implementation assumes familiarity with Python packages and model artifacts. Apple app deployment also involves Xcode and Core ML integration, while browser deployment requires a JavaScript runtime integration such as transformers.js.

capabilities

For MLX, the guide documents conversion of token-classification models, optional 4-bit or 8-bit weight quantization, and loading a local artifact through analyze_text or deidentify. A separate path uses generate_text or OpenMedMLXLanguageModel for language-model generation.

For Core ML, it describes .mlpackage export, compute-unit selection, floating-point precision and optional int8 palettization. For ONNX, it describes fp32 export and an optional fp16 WebGPU artifact with an export manifest. The comparison table mentions int8 through ONNX Runtime, but no corresponding conversion recipe is supplied.

Using it

requirements

The documented installation extras are openmed[mlx], openmed[coreml] and openmed[onnx]. MLX targets Apple Silicon. Core ML targets iOS, iPadOS and macOS applications. ONNX artifacts require a compatible runtime, with transformers.js named for browser use.

A compatible source model and its tokenizer and labeling information are needed. Minimum Python, operating-system and dependency versions, device memory, storage requirements and supported model architectures beyond the stated token-classification interface are not specified.

The guide says unavailable MLX support can lead to a PyTorch fallback, and MLX-dependent quantization may be skipped with a warning. Developers should confirm the actual backend and artifact precision rather than infer them from the requested settings.

mechanism

The documented sequence is conversion, optional compression and local inference. MLX artifacts can be passed as a local model_name directory to OpenMed, with backend detection described as automatic or configurable. Core ML and ONNX artifacts run through their native runtimes.

The Core ML converter is described as writing an id2label map for decoding token predictions. The ONNX converter uses AutoModelForTokenClassification, documents opset 18 or later and says it checks exported models with onnx.checker.

The guide attributes its privacy benefit to inference happening locally. That architectural description does not establish end-to-end network behavior, offline dependency provisioning or the handling of application logs and cached outputs; those remain unverified.

setup

The MLX recipe starts with pip install "openmed[mlx]", followed by python -m openmed.mlx.convert --model OpenMed/<some-ner-model> --output ./mlx_ner --quantize 8. The model identifier is a placeholder that must be replaced with a compatible model.

The Core ML recipe installs openmed[coreml] and uses python -m openmed.coreml.convert to create a .mlpackage. The ONNX recipe installs openmed[onnx] and uses python -m openmed.onnx.convert to create an export directory. These are documented commands; installation and conversion were not executed.

For MLX quantization, the guide documents an optional --eval-suite argument that produces a recall comparison against the full-precision parent. It names no concrete evaluation dataset, acceptance threshold or completed comparison.

example

The MLX example calls openmed.analyze_text with the text "Patient received 75mg clopidogrel for NSTEMI.", model_name="./mlx_ner" and output_format="dict". It demonstrates how to reference a converted local artifact, but supplies no resulting entities, scores or de-identified output.

The generation example calls generate_text with model_name="OpenMed/laneformer-2b-it-q4-mlx" and max_tokens=128. The model identifier is an example from the guide; its availability, generated output and clinical suitability are not established by the supplied material.

Assessment & evidence

limitations

The documented converters target token-classification models. The separate MLX generation example does not establish that the Core ML and ONNX converters export language models.

Compression can reduce recall, meaning the model may detect fewer relevant entities. The guide specifically warns about rare sensitive entities and recommends examining missed identifying information rather than relying only on an aggregate score such as F1.

The guide also warns that some Core ML operations may fall back to the CPU and calls for latency validation on real devices. It supplies no device benchmarks, accuracy results, battery measurements or end-to-end privacy evidence. Local model files, logs and cached outputs remain relevant exposure points.

reasoning

Backend choice follows the deployment target: MLX for Apple Silicon and direct OpenMed artifact loading, Core ML for Apple application integration, and ONNX/WebGPU for portable or browser runtimes. No comparative measurements establish which is fastest for a particular workload.

Two separate questions determine suitability: whether processing remains local, and whether the resulting model detects the information the application needs. The guide identifies risks in both areas but supplies no completed validation. Compression choices therefore need evidence from the intended model, data and device.

alternatives

The three documented backend paths offer different integration choices. MLX retains the illustrated OpenMed API path; Core ML fits Apple app packaging; ONNX and WebGPU provide native-runtime and browser export options. Their relative accuracy, speed and integration effort are unknown.

For different deployment needs, the guide names serving-openmed-rest-api, deploying-openmed-mcp and batch-processing-clinical-text. Their contents are not supplied, so their capabilities and suitability cannot be compared here.

evidence

The supplied material contains the selected skills/running-openmed-ondevice/SKILL.md and the repository-level LICENSE and NOTICE. The immutable skill source is [https://raw.githubusercontent.com/maziyarpanahi/openmed/e8325586e1ce2da73e9e865f34bd0345bb64301a/skills/running-openmed-ondevice/SKILL.md].

The implementation files named by the guide, model cards, dependency manifests, model weights and evaluation results are not included. The available evidence supports descriptions of the documented interfaces and cautions, but does not establish their implementation correctness. No installation, conversion, inference or network inspection was performed.

Access & freshness

costs

Apache-2.0 grants rights without license royalties, subject to its conditions. The guide provides no deployment price, support pricing or measured operating cost.

Total cost is unknown. Hardware, storage, model acquisition, conversion time, runtime resource use and integration effort are not costed. No financial or performance savings are demonstrated.

rights

The skill declares Apache-2.0, and the repository LICENSE supplies the full terms. Redistribution requires a license copy, preservation of applicable attribution notices and prominent notices in modified files. Applicable NOTICE attributions must also be retained. The license provides no warranty.

The repository NOTICE describes third-party assets, including optional and planned integrations. Those descriptions do not establish that the assets are included in this skill folder or extend their licenses to other materials.

The guide directs users toward permissively licensed models and warns against embedding restricted terminologies. Rights to a chosen model, dataset, runtime or converted artifact must be established separately; the skill's license does not establish those permissions.

freshness

The supplied source snapshot was captured on 2026-11-17 at 06:06:48.434 UTC and identifies revision e8325586e1ce2da73e9e865f34bd0345bb64301a. These findings apply to that revision.

The skill metadata reports version 1.0. That is not an OpenMed package or model version. The installation examples do not pin package versions, and compatible dependency versions and behavior at other revisions are unknown.

actions

Choose a backend for the actual target device, identify a compatible model and confirm its redistribution terms. Establish a full-precision baseline before compression, then compare missed sensitive entities using representative, appropriately authorized evaluation data.

Confirm the resulting artifact's precision and active runtime, and measure latency and memory on the intended device. For an offline requirement, verify operation with networking disabled after provisioning and inspect application logging, caching and outbound behavior. None of these outcomes is established by the guide.

Before shipping a converted model, retain applicable license notices and establish rights for the model and runtime. Suitability remains unknown until the intended deployment has supporting accuracy, privacy and device evidence.

Evidence for this report

LICENSEnotice · checked 2026-11-17
NOTICEnotice · checked 2026-11-17
skills/running-openmed-ondevice/SKILL.mdselected · checked 2026-11-17