Instructions to use OpenMed/OpenMed-NER-OncologyDetect-BioMed-335M-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use OpenMed/OpenMed-NER-OncologyDetect-BioMed-335M-mlx with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir OpenMed-NER-OncologyDetect-BioMed-335M-mlx OpenMed/OpenMed-NER-OncologyDetect-BioMed-335M-mlx
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
|
Download README.md from OpenMed/OpenMed-NER-OncologyDetect-BioMed-335M-mlx: direct link, hf CLI and curl.
- Browser
- Download file 3.01 kB
-
https://huggingface.co/OpenMed/OpenMed-NER-OncologyDetect-BioMed-335M-mlx/resolve/9f84ec859ee06fc3a4f4d01539492e81714259c6/README.md
- Command line
-
hf download hf://OpenMed/OpenMed-NER-OncologyDetect-BioMed-335M-mlx@9f84ec859ee06fc3a4f4d01539492e81714259c6/README.md
-
curl -L -o README.md https://huggingface.co/OpenMed/OpenMed-NER-OncologyDetect-BioMed-335M-mlx/resolve/9f84ec859ee06fc3a4f4d01539492e81714259c6/README.md
3.01 kB
metadata
license: apache-2.0
base_model: OpenMed/OpenMed-NER-OncologyDetect-BioMed-335M
pipeline_tag: token-classification
library_name: openmed
tags:
- openmed
- mlx
- apple-silicon
- token-classification
- pii
- de-identification
- medical
- clinical
OpenMed-NER-OncologyDetect-BioMed-335M for OpenMed MLX
This repository contains an OpenMed MLX conversion of OpenMed/OpenMed-NER-OncologyDetect-BioMed-335M for Apple Silicon inference with OpenMed.
Artifact metadata:
- OpenMed MLX task:
token-classification - OpenMed MLX family:
bert - Weight format:
safetensors - Runtime API:
OpenMed MLX token-classification backend
OpenMed is the main product experience:
- Install the Python package with
pip install openmed - Enable Apple Silicon acceleration with
pip install "openmed[mlx]" - Load this MLX model directly from the Hub or from a local snapshot
- For Apple apps, use OpenMedKit from the same GitHub repository with a compatible CoreML bundle
This MLX repo is meant to pair with:
- OpenMed GitHub: https://github.com/maziyarpanahi/openmed
- OpenMed website: https://openmed.life
- Source checkpoint:
OpenMed/OpenMed-NER-OncologyDetect-BioMed-335M
Quick Start
pip install openmed
pip install "openmed[mlx]"
from openmed import analyze_text
from openmed.core.config import OpenMedConfig
result = analyze_text(
"Patient John Doe, DOB 1990-05-15, SSN 123-45-6789",
model_name="OpenMed/OpenMed-NER-OncologyDetect-BioMed-335M",
config=OpenMedConfig(backend="mlx"),
)
for entity in result.entities:
print(entity.label, entity.text, round(entity.confidence, 4))
Swift and Apple Apps
Use Swift with OpenMedKit, not with MLX weight files directly.
- Open Xcode and go to File > Add Package Dependencies.
- Paste the OpenMed repository URL:
https://github.com/maziyarpanahi/openmed - Choose the package product OpenMedKit from the repository.
- Add a compatible CoreML model bundle plus
id2label.jsonto your app target.
This MLX model is for Python services on Apple Silicon, local MLX inference on macOS, and Hub-hosted model distribution. If a given environment cannot write weights.safetensors, OpenMed falls back to weights.npz so the model remains usable.
Credits
- Base checkpoint:
OpenMed/OpenMed-NER-OncologyDetect-BioMed-335M - OpenMed GitHub: https://github.com/maziyarpanahi/openmed
- OpenMed website: https://openmed.life
- MLX conversion and runtime support: OpenMed
- Swift runtime for Apple apps: OpenMedKit from the OpenMed repository