Export Format Support Matrix¶
Which combinations of architecture family, export backend, and precision tier does OpenMed actually support today? This page is the single answer, kept honest against the code by a coherence test in tests/unit/test_export_matrix.py.
Use it before you plan a conversion so you know up front whether your architecture reaches your target runtime.
Support levels¶
- ✅ Supported — a first-class path with a documented converter, unit tests, and (where relevant) a certification gate.
- ⚠️ Partial / conditional — path exists but has a documented restriction (for example a family allowlist, or "certified only when recall holds").
- ❌ Not supported — no converter, or explicitly rejected by the backend.
The matrix rows are the Hugging Face model-type strings and OpenMed family names most contributors search for. The MLX aliases column lists the token-classification aliases understood by openmed.mlx.models._SUPPORTED_TOKEN_CLASSIFICATION_MODEL_TYPES (or the MLX custom-family set). The coherence test asserts every entry in that allowlist appears here as a backtick-wrapped alias, so the matrix cannot drift silently when a new family is added to the code.
Matrix¶
| Family | MLX aliases | MLX fp | MLX INT8 | MLX INT4 | CoreML fp16 | CoreML INT8 | ONNX (default) | ONNX Android | Transformers.js | GGUF (embedding) |
|---|---|---|---|---|---|---|---|---|---|---|
| BERT | bert | ✅ | ✅ | ⚠️ INT4-if-recall-holds | ✅ | ✅ | ✅ | ✅ | ✅ | ⚠️ backbone only (see limitations) |
| DistilBERT | distilbert | ✅ (via bert) | ✅ | ⚠️ INT4-if-recall-holds | ✅ | ✅ | ✅ | ✅ | ✅ | ⚠️ backbone only |
| Electra | electra | ✅ (via bert) | ✅ | ⚠️ INT4-if-recall-holds | ✅ | ✅ | ✅ | ✅ | ✅ | ⚠️ backbone only |
| RoBERTa | roberta | ✅ (via bert) | ✅ | ⚠️ INT4-if-recall-holds | ✅ | ✅ | ✅ | ✅ | ✅ | ⚠️ backbone only |
| XLM-RoBERTa | xlm-roberta, xlm_roberta | ✅ (via bert) | ✅ | ⚠️ INT4-if-recall-holds | ✅ | ✅ | ✅ | ✅ | ✅ | ⚠️ backbone only |
| DeBERTa-v2 | deberta, deberta-v2 | ✅ | ✅ | ⚠️ INT4-if-recall-holds | ✅ | ✅ | ✅ | ✅ | ✅ | ⚠️ backbone only |
| ModernBERT | — | ❌ family not in MLX allowlist | ❌ | ❌ | ❌ family not in CoreML allowlist | ❌ | ⚠️ upstream ONNX support required | ⚠️ same as ONNX (default) | ⚠️ same as ONNX (default) | ❌ |
| Longformer | — | ❌ family not in MLX allowlist | ❌ | ❌ | ❌ family not in CoreML allowlist | ❌ | ⚠️ upstream ONNX support required | ⚠️ same as ONNX (default) | ⚠️ same as ONNX (default) | ❌ |
| OpenAI Privacy Filter | openai-privacy-filter, privacy-filter, privacy-filter-nemotron, nemotron-privacy-filter, privacy-filter-multilingual, multilingual-privacy-filter | ✅ | ✅ | ⚠️ INT4-if-recall-holds | ❌ family not in CoreML allowlist | ❌ | ❌ no ONNX converter path today | ❌ | ❌ | ❌ |
| GLiNER (span) | gliner-uni-encoder-span | ✅ (MLX custom family) | ✅ | ⚠️ INT4-if-recall-holds | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| GLiClass | gliclass-uni-encoder | ✅ (MLX custom family) | ✅ | ⚠️ INT4-if-recall-holds | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| GLiNER (token-relex) | gliner-uni-encoder-token-relex | ✅ (MLX custom family) | ✅ | ⚠️ INT4-if-recall-holds | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
Known limitations¶
The cells above encode a handful of load-bearing constraints; the source of truth is the backend code, but the essentials are:
- GGUF is embedding-only.
openmed.gguf.convertdeliberately rejects token-classification heads: llama.cpp can run the BERT-family encoder embedding path but does not expose the token classifier head required to produce OpenMed entity labels. Export the encoder backbone (for example a checkpoint whoseconfig.jsonnamesBertModelrather thanBertForTokenClassification) instead. See GGUF Embedding Export. - CoreML is token-classification-only and enforces a family allowlist.
openmed.coreml.convert.SUPPORTED_TOKEN_CLASSIFICATION_MODEL_TYPESacceptsbert,distilbert,electra,roberta,xlm-roberta, anddeberta-v2. Any other architecture fails before tracing with an error that lists the supported families. See CoreML Packaging. - MLX enforces a family allowlist. The MLX dispatcher resolves architectures through
_SUPPORTED_TOKEN_CLASSIFICATION_MODEL_TYPES(BERT-family and DeBERTa-v2) plus the MLX-custom set (gliner-uni-encoder-span,gliclass-uni-encoder,gliner-uni-encoder-token-relex) and the privacy filter family. Architectures outside the allowlist raise a clear "unsupported family" error rather than falling through silently. See MLX Backend. - INT4 is certified only when recall holds.
openmed.mlx.convertwill emit an INT4 artifact for any allowlisted family, but the artifact is markedcertified: falseinrecall_delta.jsonwhen the measured per-label recall delta exceeds the INT4 limit. Release gates block over-budget INT4 formats. See MLX Quantized Export Certification.