Polly NER token-classification model
Model summary
This standard Transformers token-classification model predicts these configured
contiguous entity types: GENE_PROTEIN. Token labels use deterministic BIO
encoding, while Polly NER returns character spans.
- Base model:
microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract-fulltextat immutable revisione1354b7a3a09615f6aba48dfad4b7a613eef7062 - Polly NER source:
https://github.com/ElucidataInc/polly-ner.gitat commit8372b7e9913dfc8d5bb1835c4a1efdd5cecbeb27 - W&B run: https://wandb.ai/mol-ml/polly-ner/runs/3jwbqco6
Training data references
The private training data is referenced for provenance only. No corpus text, record metadata, predictions, or error examples are included in this repository.
train:ElucidataInc/bc2gm-cleanedatb5e4ff67578f83821fdffeda92097533106c2128, configurationdefault, splittrainvalidation:ElucidataInc/bc2gm-cleanedatb5e4ff67578f83821fdffeda92097533106c2128, configurationdefault, splitvalidationevaluation:ElucidataInc/bc2gm-cleanedatb5e4ff67578f83821fdffeda92097533106c2128, configurationdefault, splittest
Intended uses
- Detect configured named-entity mentions in caller-supplied text.
- Run through Polly NER for deterministic character spans or through the native Transformers token-classification pipeline.
Non-goals and limitations
- This model does not perform entity linking, normalization, relation extraction, abbreviation resolution, or assertion classification.
- It supports contiguous, non-overlapping entities only.
- Inputs are not split or truncated. Callers must keep text within the model context limit and manage document chunking and cross-chunk merging themselves.
- Predictions can be incomplete or incorrect and require task-appropriate review.
Evaluation
Metrics require exact equality of character start, end, and semantic label.
| Dataset | Micro F1 | Macro F1 | Records | Characters |
|---|---|---|---|---|
| validation | 0.8441052289704449 | 0.8441052289704449 | 2478 | 378063 |
| bc2gm-test | 0.8332414336352895 | 0.8332414336352895 | 4948 | 760629 |
Training configuration summary
{
"experiment": "bc2gm-gene-protein-v0.1",
"gradient_accumulation_steps": 1,
"learning_rate": 2e-05,
"mixed_precision": "bf16",
"num_train_epochs": 5.0,
"per_device_train_batch_size": 16,
"seed": 42,
"warmup_ratio": 0.1,
"weight_decay": 0.01
}
Polly NER inference
from polly_ner import NERPredictor
predictor = NERPredictor.from_pretrained(
"ElucidataInc/polly-ner-gene-protein",
revision="v0.1.0",
)
result = predictor.predict(
id="example-1",
text="Example entity text.",
)
Native Transformers inference
from transformers import pipeline
ner = pipeline(
"token-classification",
model="ElucidataInc/polly-ner-gene-protein",
revision="v0.1.0",
aggregation_strategy="simple",
)
predictions = ner("Example entity text.")
License
The releaser supplied the license identifier mit. Review the license
and organizational approval before publication.