Downloads · 30 days
0
bh-healthcare/roberta-large-mnli-int8-onnx
roberta-large-mnli-int8-onnx is a zero-shot classification model from bh-healthcare. Use it when you need labels you did not train the model on. It is set up for transformers. The card lists the license as mit.
Quantized ONNX export of FacebookAI/roberta-large-mnli at commit 2a8f12d27941090092df78e4ba6f0928eb5eac98. Hosted as the canonical Layer 2 model for bh-sentinel-ml ≥ 0.2.2.
Downloads · 30 days
0
Access
Public
Updated May 14, 2026
Repo size
358 MB
Likes
0
Public
Click a slice to open those files.
.onnx358 MB · 99%
From the Hugging Face model README
Quantized ONNX export of FacebookAI/roberta-large-mnli at commit 2a8f12d27941090092df78e4ba6f0928eb5eac98. Hosted as the canonical Layer 2 model for bh-sentinel-ml ≥ 0.2.2.
This is clinical decision support software. It is not a diagnostic tool, not FDA-cleared, and not a substitute for clinical judgment. The bh-sentinel pipeline that consumes this artifact is intended only for flagging signals for clinician review — never for autonomous clinical action. All outputs are signals for clinician review. See the main repository's clinical disclaimer for the full notice.
| Layer | Model | License | Source |
|---|---|---|---|
| Pretraining base | FacebookAI/roberta-large | MIT | Facebook AI Research (Meta Platforms, Inc.) |
| Source (MNLI fine-tune) | FacebookAI/roberta-large-mnli | MIT | Facebook AI Research |
| This artifact | bh-healthcare/roberta-large-mnli-int8-onnx | MIT | bh-healthcare (this repo) |
| Consuming code | bh-sentinel-ml | Apache-2.0 | bh-healthcare |
The redistribution is permitted under the upstream MIT terms. The original copyright notice is preserved verbatim in LICENSE. The Python package that loads this artifact is Apache-2.0 — different copyrightable works can carry different terms; this is a common open-source pattern and is not contradictory.
| Field | Value |
|---|---|
| Source model | FacebookAI/roberta-large-mnli |
| Source revision | 2a8f12d27941090092df78e4ba6f0928eb5eac98 |
| Source paper | Liu et al. 2019, RoBERTa: A Robustly Optimized BERT Pretraining Approach |
| NLI fine-tune dataset | MultiNLI |
| Zero-shot method paper | Yin et al. 2019 |
| Export tool | optimum.exporters.onnx.main_export() (via scripts/export_onnx.py's Python API path) |
optimum version | 2.1.0 |
onnxruntime version | 1.26.0 |
onnx version | 1.21.0 |
| Quantization | onnxruntime.quantization.quantize_dynamic(weight_type=QInt8, per_channel=True, reduce_range=False) |
| Export date (UTC) | 2026-05-14 |
| Export script | scripts/export_onnx.py at tag ml-v0.2.2 |
To reproduce locally, install optimum[onnxruntime]>=2.0,<3 and onnx>=1.15 and run the export script against the source revision above. The artifact is fully reproducible from those inputs.
A prior iteration of this artifact pinned facebook/bart-large-mnli. BART is encoder-decoder; under INT8 dynamic quantization the classification head's discrimination collapsed (FP32 emitted entailment probabilities near 0.998 on clear positive cases, INT8 emitted near 0.24 with similar magnitudes for negative controls — effectively noise). Encoder-only models like RoBERTa quantize cleanly: this artifact preserves FP32 discrimination to within <1% on the same test cases. See the bh-sentinel repository's docs/ml-artifact-provenance.md for the full source-selection narrative.
| Metric | Value | Notes |
|---|---|---|
| ONNX file size (INT8) | 342 MB | Down from ~1.4GB FP32 |
SHA256 of model_int8.onnx | 49fa5562da7f1422525e88fd1145d2d06ca93b17c335adf3c4696a30908c91de | Pinned in bh-sentinel-ml's ml_config.yaml; verified at load time |
| First-call download time (typical broadband) | ~20–60s | One-time; subsequent calls hit the local platformdirs cache |
| Per-sentence inference latency (CPU, single thread) | ~40–80 ms | Per-pair (premise, hypothesis) NLI forward pass; encoder-only is faster than encoder-decoder |
| Per-flag inference cost | ~40–80 ms × N_hypotheses_per_flag | bh-sentinel-ml batches these; see max_batch_size in ml_config.yaml |
| Recommended Lambda memory | 1.5GB+ | INT8 model + onnxruntime CPU provider + tokenizer cache |
| Recommended Lambda image size budget | 600MB+ | Model baked in; BH_SENTINEL_ML_OFFLINE=1 Dockerfile pattern |
These numbers are operator-reported approximations for capacity planning. Real-world latency varies with CPU class, ARM vs x86, ONNX Runtime threading config, and concurrent load. The bh-sentinel-ml pipeline supports BH_SENTINEL_ML_OFFLINE=1 for fully air-gapped VPC deployments where the model is pre-baked into the container image.
| File | Purpose |
|---|---|
model_int8.onnx | Quantized model weights, 342 MB. SHA256 49fa5562da7f1422525e88fd1145d2d06ca93b17c335adf3c4696a30908c91de (consumed by TransformerClassifier's verify-on-load check) |
tokenizer.json | HF tokenizers library serialized BPE tokenizer (required by Tokenizer.from_file() in the runtime) |
tokenizer_config.json | Tokenizer config (model_max_length, special tokens) |
vocab.json | BPE vocabulary |
merges.txt | BPE merge rules |
special_tokens_map.json | Special token map (BOS, EOS, PAD, etc.) |
manifest.json | Machine-readable provenance metadata (matches the values in the Provenance section above) |
LICENSE | MIT license text + attribution to Facebook AI Research / Meta Platforms, Inc. |
Consumed by bh-sentinel-ml ≥ 0.2.2 via Pipeline(enable_transformer=True). The bh-sentinel pipeline performs zero-shot NLI inference against a curated set of clinical hypothesis templates (see config/ml/zero_shot_hypotheses.yaml) to surface candidate clinical safety flags.
Use cases this artifact is designed for:
bh-sentinel-examplesThis artifact is not appropriate for:
FixedDiscount(0.85) in bh-sentinel-ml's Phase A calibrator, but is not clinically validated. Validated calibration against clinician-labeled data is a bh-sentinel v0.3 deliverable.If you use this artifact, please cite both the upstream source and bh-sentinel:
@misc{roberta-large-mnli,
title = {roberta-large-mnli},
author = {Facebook AI Research},
year = {2019},
publisher = {Hugging Face},
url = {https://huggingface.co/FacebookAI/roberta-large-mnli}
}
@article{liu2019roberta,
title = {{RoBERTa}: A Robustly Optimized {BERT} Pretraining Approach},
author = {Liu, Yinhan and Ott, Myle and Goyal, Naman and Du, Jingfei and Joshi, Mandar and Chen, Danqi and Levy, Omer and Lewis, Mike and Zettlemoyer, Luke and Stoyanov, Veselin},
journal = {arXiv preprint arXiv:1907.11692},
year = {2019},
url = {https://arxiv.org/abs/1907.11692}
}
@article{yin2019benchmarking,
title = {Benchmarking Zero-shot Text Classification: Datasets, Evaluation and Entailment Approach},
author = {Yin, Wenpeng and Hay, Jamaal and Roth, Dan},
journal = {arXiv preprint arXiv:1909.00161},
year = {2019},
url = {https://arxiv.org/abs/1909.00161}
}
@software{bh_sentinel,
title = {bh-sentinel: Open-source clinical safety signal detection for behavioral health systems},
year = {2026},
publisher = {bh-healthcare},
url = {https://github.com/bh-healthcare/bh-sentinel}
}
FacebookAI/roberta-large-mnli was authored by Facebook AI Research (now Meta AI) and is redistributed here under its original MIT license.optimum library by Hugging Face provides the ONNX export path used here.