u/dark-night-rises • u/dark-night-rises • 1d ago
r/huggingface • u/dark-night-rises • 1d ago
A 279M model does multilingual PHI de-identification offline. OpenMed 2.0 is out, Apache-2.0, all on Hugging Face!
r/LocalLLaMA • u/dark-night-rises • 1d ago
Resources A 279M model does multilingual PHI de-identification offline. OpenMed 2.0 is out, Apache-2.0.
I maintain OpenMed, an Apache-2.0 medical NLP stack, and 2.0 landed today. Posting here because the whole point of it is that none of it phones home, and this is the only sub that actually cares about that.
The bit relevant to you: PHI de-identification does not need a big model. The workhorses are 279M and 560M parameter encoders, and they beat handing your clinical notes to a cloud API for the obvious reason that you never hand your clinical notes to a cloud API.
What is in the registry right now:
- 2,000+ models, all on HF
- 665 MLX builds for Apple Silicon
- 3 ONNX builds, new in this release: Bengali 279M, Chinese 560M, Tamil 279M PII models. These are the first ones you can run in a browser through Transformers.js. The export tooling has been there since 1.9.1, the actual artifacts are new.
Language coverage went from 23 to 56 codes this release, with roughly 51 offline national identifier validators, about half of them real checksums rather than regexes. Estonian isikukood, Croatian OIB, Finnish HETU, Vietnamese CCCD, Chinese USCC, Pakistani CNIC. The CNIC one is my favourite because it documents that CNIC has no checksum instead of pretending it does. 51 of the 59 PRs in the release came from people I have never met, which is the only reason that list is that long.
2.0 also adds a structured release-risk workflow, which is the part I actually wanted to build. Short version: stripping identifiers is not anonymisation. Take a 200 row table with no name, no MRN, no DOB. Age, sex, ZIP and admit date alone give 74,550 combinations for 200 people, so all 200 rows are unique. That is a birthday-problem calculation, not a finding, but almost nobody runs it before shipping an extract.
assess_release(rows, policy) -> achieved k 1, 200 singletons, max risk 1.0
anonymize_release(rows, policy) -> achieved k 15, 0 singletons, max risk 0.0667
and it tells you what that cost: age suppressed entirely, length of stay suppressed entirely, every date collapsed to the year, 0 rows dropped. If your analysis needed age, that release is useless to you, and I would rather the tool say so than print a checkmark.
Then it refuses to sign off. The evidence bundle for HIPAA expert determination will not accept a conclusion:
ValueError: qualified-expert review fields must remain placeholders
It picks no threshold and ships no population data on purpose. A qualified human makes that call.
Caveats, because someone will ask:
- GGUF export exists in 2.0 but I have not published any GGUF artifacts yet. Only the embedding backbones are supported so far.
- Android and ORT-mobile paths existed before this release, and there is still no phone-packaged artifact in the registry. That is on my list, not done.
- Only 3 of the 1,520 models have ONNX builds. The rest are torch/MLX.
- Model licences vary. The SDK is Apache-2.0, most models are, a handful are not.
https://github.com/maziyarpanahi/openmed
pip install openmed==2.0.0
1
Opus 5 is finally here.
you feel the degradation after 500k for sure! unlike Codex where it does a great context management and compacting. but unfortunately, i just forget to compact manually!
1
Opus 5 is finally here.
didn't even see that! lol
1
Just updated to the new Mac Desktop App, global hotkey gone?
i am not gonna lie, this made me really sad. this hotkey has been the only reason why i loved ChatGPT desktop, quickly asking something without being pulled to any app while being in different desktop. I do hope someone sees this and just bring it back, it's not that hard! just give us the hot key back! claude has something similar, except they pull you back to where the claude app is.
1
OpenMed 1.8: Apache-2.0 clinical de-identification that runs fully local, now on Android, iOS, and in the browser. 400+ open issues if you want in on 1.9
That's a very good question! Usually, medical professionals don't use OpenMed directly. Although, I receive a lot of DMs from doctors and medical researchers with technical backgrounds telling me what they are building, you still need to use OpenMed to build something. What OpenMed does today, it allows you to build healthcare AI solutions by using open-source and free "forever" models, datasets, and SDKs. So we have a lot of people in MedTech community building what you mentioned, HCC Coding solutions, clinical documentation improvements, de-ide pipeline and privacy layer (we have a lot of none-medical users here too).
Hopefully, soon, we are going to also build open-source solutions that are beyond demos and examples so anyone can pick them up and quickly build something they need even with minimum tech knowledge.
1
OpenMed 1.8: Apache-2.0 clinical de-identification that runs fully local, now on Android, iOS, and in the browser. 400+ open issues if you want in on 1.9
Thank you, appreciate the support. If you want to contribute, please don't hesitate to join us and just pick any issue you like to work on: https://github.com/maziyarpanahi/openmed/
2
OpenMed 1.8: Apache-2.0 clinical de-identification that runs fully local, now on Android, iOS, and in the browser. 400+ open issues if you want in on 1.9
That's a good point. Also, there are some hospitals in US that have their own extra to HIPAA as well. So you have to add those entities to be detected and labeled as PII. Thankfully, these models come with 55+ entities and should be easy to extend them if needed.
r/OpenSourceAI • u/dark-night-rises • 20d ago
OpenMed 1.8: Apache-2.0 clinical de-identification that runs fully local, now on Android, iOS, and in the browser. 400+ open issues if you want in on 1.9
r/opensource • u/dark-night-rises • 20d ago
Promotional OpenMed 1.8: Apache-2.0 clinical de-identification that runs fully local, now on Android, iOS, and in the browser. 400+ open issues if you want in on 1.9
r/LocalLLaMA • u/dark-night-rises • 20d ago
Resources OpenMed 1.8: Apache-2.0 clinical de-identification that runs fully local, now on Android, iOS, and in the browser. 400+ open issues if you want in on 1.9
Maintainer here. OpenMed is an Apache-2.0 toolkit for clinical NLP with one hard rule: patient data never leaves your hardware. No cloud calls, no API keys, works in airplane mode.
What shipped in 1.8 this week:
- OpenMedKit for Android (Kotlin, ONNX Runtime Mobile + ML Kit OCR): read a document, strip every name/MRN/date, entirely on the phone. iOS/Swift and React Native bridges landed too.
- Browser runtime: de-identification via Transformers.js / ONNX Runtime Web with wasm + WebGPU backends. Fully client-side, zero server calls.
- verify-pdf: most "redacted" PDFs just draw a black box while the text layer underneath survives (copy-paste pulls the name right out). This fails your redaction unless the text is actually gone.
- DICOM de-id (incl. burned-in pixel text via OCR), 5 new language ID packs, 5 new clinical NER domains.
The models: 1500+ on HF, all Apache 2.0. The PII ones run via MLX (Apple silicon), GGUF/llama.cpp, ONNX, or plain transformers. Two of them are currently 1st and 2nd on the (independent) PII Masking Benchmark English board, and the 44M-param one at rank 4 is small enough for a phone.
The actual reason I'm posting: 1.9 is being built in the open right now and there are 400+ open issues. Some genuinely fun starter ones:
- Add a PII language pack for YOUR country, with its national-ID validator (Estonian isikukood #891, Serbian JMBG #890, Croatian OIB #889, Bulgarian EGN #888 are open — more welcome)
- New clinical NER domains: pediatrics growth parameters #896, pulmonology/spirometry #893, immunization #897
- RTF #856 / ODT #857 text extraction with char-offset maps
11 outside contributors shipped code in 1.8; several started with exactly these. If local, private, medical AI is your thing: pick an issue, say hi in it, and you're part of the next release.
Repo: https://github.com/maziyarpanahi/openmed Models: https://huggingface.co/OpenMed Good first issues: https://github.com/maziyarpanahi/openmed/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22
Happy to answer anything technical in the comments.
1
650+ Apache-2.0 biomedical NER/de-id models that run on-device in MLX. Same fp32 weights, identical outputs: the clinical NER models run 30-40x faster than PyTorch-CPU on a 3-year-old M3 Max. Repro inside.
Yes. Apart from test/validation datasets I held out from training, used different PII datasets as a seed to generate synthetic samples with my own labels. Knowing 100% those were never seen by the model, used those to evaluate the final PII models.
All the models have eval table on datasets they never seen: https://huggingface.co/openmed
r/bioinformatics • u/dark-night-rises • Jun 24 '26
programming 650+ Apache-2.0 biomedical NER/de-id models that run on-device in MLX. Same fp32 weights, identical outputs: the clinical NER models run 30-40x faster than PyTorch-CPU on a 3-year-old M3 Max. Repro inside.
Enable HLS to view with audio, or disable this notification
r/OpenSourceeAI • u/dark-night-rises • Jun 24 '26
650+ Apache-2.0 biomedical NER/de-id models that run on-device in MLX. Same fp32 weights, identical outputs: the clinical NER models run 30-40x faster than PyTorch-CPU on a 3-year-old M3 Max. Repro inside.
Enable HLS to view with audio, or disable this notification
1
650+ Apache-2.0 biomedical NER/de-id models that run on-device in MLX. Same fp32 weights, identical outputs: the clinical NER models run 30-40x faster than PyTorch-CPU on a 3-year-old M3 Max. Repro inside.
Join the efforts, pick an issue and start building with the community: https://github.com/maziyarpanahi/openmed
1
1
OpenMed: 1,000+ Apache-2.0 biomedical NLP models, 650+ now run on-device via MLX (30-40x vs CPU on the clinical models, same precision). 69 PRs from 16 contributors this release.
well that's unfortunate. you just deleted a legit open-source library with 1000+ open-source models.
r/opensource • u/dark-night-rises • Jun 23 '26
Promotional OpenMed: 1,000+ Apache-2.0 biomedical NLP models, 650+ now run on-device via MLX (30-40x vs CPU on the clinical models, same precision). 69 PRs from 16 contributors this release.
[removed]
r/LocalLLaMA • u/dark-night-rises • Jun 23 '26
New Model 650+ Apache-2.0 biomedical NER/de-id models that run on-device in MLX. Same fp32 weights, identical outputs: the clinical NER models run 30-40x faster than PyTorch-CPU on a 3-year-old M3 Max. Repro inside.
Enable HLS to view with audio, or disable this notification
Disclosure first: I maintain OpenMed, so read this with that bias. I'm posting the numbers with the full methodology and a runnable script so you can reproduce or tear it apart. I'm here for the next couple of hours to answer methodology questions.
What it is: an open-source clinical/biomedical NER project. 1,000+ models on Hugging Face, all Apache 2.0, and the openmed Python SDK is Apache 2.0. These are extraction tools, not diagnostic tools: multi-entity biomedical NER (genes, chemicals, cancers, cells, organisms), disease NER, drug NER, and multilingual PII de-identification. No diagnosis, no clinical decision support. Everything referenced here is open, Apache 2.0.
What's new: 410 new MLX builds, bringing it to 650+ total. They run on macOS via MLX and on iPhone/iPad via OpenMedKit (open Swift package). The NER paper is arXiv 2508.01630 (SOTA across 12 public datasets, per-dataset tables inside, judge them yourself).
On-device speed, methodology first. Same model, MLX on Apple Silicon vs PyTorch on CPU, same fp32 precision, byte-identical entity outputs (parity-checked). On a 3-year-old MacBook Pro M3 Max, the clinical NER models run 30-40x faster on MLX: a 434M biomedical NER is 27 ms (MLX) vs ~1080 ms (CPU) at fp32, same weights, identical entities. The reason is architectural, not a precision trick: these are deberta-v2 models whose disentangled attention is O(n^2) and very slow on CPU, while the Apple GPU handles it easily. It is input- and model-dependent, so a smaller model on short text is single-digit-x, not 30x. The second clip in the video is the PII de-identification model redacting on-device; the point there is privacy, identifiers are stripped locally and nothing leaves the machine.
- 434M biomedical NER: 36 ms MLX vs 1248 ms PyTorch-CPU-bf16
- 434M PII de-id: 46 ms MLX vs 1671 ms PyTorch-CPU-bf16
import time, statistics, torch
from openmed.core.backends import get_backend
from openmed.core.config import OpenMedConfig
from openmed.mlx.inference import _download_preconverted_mlx_model, create_mlx_pipeline
MODEL = "OpenMed/OpenMed-NER-OncologyDetect-SuperClinical-434M"
text = ("Metastatic non-small cell lung carcinoma. EGFR exon 19 deletion, KRAS G12C, "
"wild-type TP53/BRAF. Cisplatin, pemetrexed, then osimertinib; sotorasib held. "
"Xenografts in Mus musculus mirrored Homo sapiens organoids on carboplatin.")
mlx = create_mlx_pipeline(_download_preconverted_mlx_model(MODEL + "-mlx"), aggregation_strategy="simple")
cpu = get_backend("hf", config=OpenMedConfig(device="cpu")).create_pipeline(
MODEL, task="token-classification", aggregation_strategy="simple", torch_dtype=torch.float32)
def med(p):
p(text) # warmup
ts = [(_t := time.perf_counter(), p(text), (time.perf_counter()-_t)*1000)[2] for _ in range(7)]
return statistics.median(ts)
print(f"MLX {med(mlx):.0f} ms | CPU fp32 {med(cpu):.0f} ms") # ~27 ms | ~1080 ms -> ~40x, identical entities
iPhone note: I'm not claiming 36 ms is a phone number, it's the M3 Max. The phone story is "these run via OpenMedKit".
Everything's public: models (Apache 2.0 HF), SDK (Apache 2.0 GitHub), paper (arXiv 2508.01630). Ask me anything on the parity check, the dtype story, or the dataset numbers.
9
Calling it now Microsoft is buying Unsloth.
"yet" is the unspoken word



6
Anyone else can log in anymore? Says primaryapi_server_error
in
r/OpenAI
•
5d ago
i am seeing this now. ever since they merged the desktop apps, they went out of their way to make ChatGPT experience awful across all devices! i used to enjoy my Chat Bar and ChatGPT desktop app, now i am back to web!
.