Downloads · 30 days
587
7% of all-time downloads
raynardj/ner-chemical-bionlp-bc5cdr-pubmed
ner-chemical-bionlp-bc5cdr-pubmed is a token classification model from raynardj. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as apache-2.0.
The model was trained on bionlp and bc4cdr dataset, pretrained on this pubmed-pretrained roberta model All the labels, the possible token classes.
Downloads · 30 days
587
7% of all-time downloads
All-time downloads
8.8K
Public
Repo size
993 MB
Likes
5
Public
Click a slice to open those files.
.bin496 MB · 99%
From the Hugging Face model README
The model was trained on bionlp and bc4cdr dataset, pretrained on this pubmed-pretrained roberta model All the labels, the possible token classes.
{"label2id":
{
"O": 0,
"Chemical": 1,
}
}
Notice, we removed the 'B-','I-' etc from data label.🗡
Of course I'm well aware of the aggregation_strategy arguments offered by hf, but by the way of training, I discard any entropy loss for appending subwords, like only the label for the 1st subword token is not -100, after many search effort, I can't find a way to achieve that with default pipeline, hence I fancy an inference class myself.
!pip install forgebox
from forgebox.hf.train import NERInference
ner = NERInference.from_pretrained("raynardj/ner-chemical-bionlp-bc5cdr-pubmed")
a_df = ner.predict(["text1", "text2"])
check our NER model on