OpenMed PII β ONNX
ONNX conversions of OpenMed PII
token-classification models, packaged for the
nym anonymization CLI's OpenMed NER backend.
These are not new models β they are straight ONNX exports of OpenMed's
DeBERTa-v2 PII checkpoints (106-label BIO PII taxonomy), provided because OpenMed
publishes PyTorch safetensors but no ONNX. All credit for the models belongs to
the OpenMed project; see Attribution below.
Contents
Each subfolder is a self-contained model (config.json, tokenizer.json,
model.onnx, β¦):
| Subfolder | Source model | Params | Files |
|---|---|---|---|
small/ |
OpenMed/OpenMed-PII-SuperClinical-Small-44M-v1 |
44M | model.onnx (fp32) + model_int8.onnx (dynamic int8) |
base/ |
OpenMed/OpenMed-PII-SuperClinical-Base-184M-v1 |
184M | model.onnx (fp32) |
large/ |
OpenMed/OpenMed-PII-SuperClinical-Large-434M-v1 |
434M | model.onnx (fp32) |
int8 note: dynamic int8 quantization is reliable only for the small model. It collapses the base/large models (every token predicted as one label), so those ship fp32 only. See the nym docs for details.
Conversion
Exported with π€ optimum-onnx (optimum-cli export onnx --task token-classification --opset 17); int8 via onnxruntime dynamic quantization.
Reproducible with scripts/convert_openmed_onnx.sh in the nym repo.
Usage with nym
[ner]
enabled = true
backend = "openmed"
openmed_model = "Wismut/openmed-onnx/small" # or /base, /large
threshold = 0.5
nym downloads and caches the selected subfolder automatically on first run.
Inputs / outputs
- Inputs:
input_ids,attention_mask(int64,[batch, seq]); max sequence 512. - Output:
logits[batch, seq, 106]. Decode with theid2labelmap inconfig.jsonusing BIO scheme.
Attribution
These artifacts are derived from OpenMed by Maziyar Panahi, released under the Apache-2.0 License. Original project: https://github.com/maziyarpanahi/openmed.
@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},
url={https://arxiv.org/abs/2508.01630},
}
License
Apache-2.0, inherited from the upstream OpenMed models. See the LICENSE file in
this repo. The conversion adds no additional restrictions.
Model tree for Wismut/openmed-onnx
Base model
microsoft/deberta-v3-base