pico-extractor / README.md
kubeheoriginal's picture
v1.0.0: convert zuzab/pico-extractor@ed4df86
a5a5a1c verified
|
Raw History Blame Contribute Delete
2.26 kB
---
license: apache-2.0
base_model: zuzab/pico-extractor
library_name: transformers
pipeline_tag: token-classification
language:
- en
tags:
- mlx
- safetensors
- fp16
- biomedical
- pico
- ner
- bert
---
# pico-extractor
BIO token classifier tagging PICO elements (Population, Intervention, Comparator, Outcome) in clinical-trial abstracts; used by Mineris for PICO span extraction.
This is a **format conversion** of [`zuzab/pico-extractor`](https://huggingface.co/zuzab/pico-extractor)
for Mineris' MLX inference stack (`mineris_inference`) — not a fine-tune. Weights are
the full upstream `BertForTokenClassification` (encoder + classification head) cast to fp16 and stored as `model.safetensors`; a
`tokenizer.json` is included so the model loads without `transformers` or `torch`.
## Labels
| id | label |
|---|---|
| 0 | `O` |
| 1 | `B-P` |
| 2 | `B-I` |
| 3 | `B-C` |
| 4 | `B-O` |
| 5 | `I-P` |
| 6 | `I-I` |
| 7 | `I-C` |
| 8 | `I-O` |
## Provenance
| | |
|---|---|
| Upstream repo | [`zuzab/pico-extractor`](https://huggingface.co/zuzab/pico-extractor) |
| Upstream commit | `ed4df86e482d9c53d953791a71c15caa5a687d96` |
| License | `apache-2.0` (declared by Mineris, the upstream owner) |
| Conversion notebook | `notebook/notebooks/converter/convert_pico_extractor.ipynb` (mineris repo) |
| Mineris commit | `9817fe7bbeb2a4b23fd683144a28a5843af94af9` |
| Version | `v1.0.0` |
| dtype | fp16 |
| Tensors / size | 199 / 215.3 MB |
## Conversion parity (fp16 mirror vs fp32 upstream, PyTorch)
| Metric | Value |
|---|---|
| Texts | 18 |
| Tokenizer id mismatches (`tokenizer.json` via `tokenizers` vs upstream tokenizer) | 0 |
| Token argmax label agreement, per text — min / mean | 1.000000 / 1.000000 |
| Logits, non-padding tokens — max abs diff / median relative diff | 9.82e-03 / 5.09e-04 |
| Threshold (min token argmax label agreement) | 0.995 |
MLX-runtime parity is tracked separately in the mineris `notebook/notebooks/benchmark/` notebooks.
## Versioning
Releases are semver git tags on this repo (`vMAJOR.MINOR.PATCH`); consumers pin a tag. MAJOR =
output-incompatible change, MINOR = compatible re-conversion, PATCH = card/metadata only.
## CHANGELOG
- `v1.0.0` — initial conversion from `zuzab/pico-extractor@ed4df86`.