anthonyyazdaniml/gliner-bioclin-x-pre-training-v1.1
Viewer • Updated • 264k • 4
How to use anthonyyazdaniml/GLiNER-BioClinX with GLiNER:
from gliner import GLiNER
model = GLiNER.from_pretrained("anthonyyazdaniml/GLiNER-BioClinX")
text = "Cristiano Ronaldo dos Santos Aveiro was born on 5 February 1985 in Funchal, Madeira, Portugal."
labels = ["person", "date", "location"]
entities = model.predict_entities(text, labels)
for entity in entities:
print(entity["text"], "=>", entity["label"])GLiNER-BioClinX is a small multilingual language model for arbitrary-label medical named entity recognition and personally identifiable information detection. It uses the GLiNER architecture with mT5-large’s encoder as its backbone. Entity types are specified using natural-language labels.
The model was pre-trained on multilingual medical NER data and post-trained on clinical transcription NER, biomedical NER, and health-focused PII data.
Data preparation, training, and fine-tuning code.
pip install "gliner[stanza]==0.2.29"
from gliner import GLiNER
model = GLiNER.from_pretrained("anthonyyazdaniml/GLiNER-BioClinX")
text = "John Smith was prescribed metformin for type 2 diabetes."
labels = ["person name", "medication", "disease or condition"]
entities = model.predict_entities(text, labels, threshold=0.5)
for entity in entities:
print(f"{entity['text']} -> {entity['label']}")
Expected output:
John Smith -> person name
metformin -> medication
type 2 diabetes -> disease or condition
Base model
google/mt5-large