Downloads · 30 days
26
1% of all-time downloads
portugueseNLP/medialbertina_pt-pt_1.5b_NER
medialbertina_pt-pt_1.5b_NER is a token classification model from portugueseNLP. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as mit.
The first publicly available medical language model trained with real European Portuguese data.
Downloads · 30 days
26
1% of all-time downloads
All-time downloads
2.9K
Public
Parameters
1.6B
6.3 GB on disk
Likes
7
Public
Click a slice to open those files.
.safetensors6.3 GB · 100%
From the Hugging Face model README
The first publicly available medical language model trained with real European Portuguese data.
MediAlbertina is a family of encoders from the Bert family, DeBERTaV2-based, resulting from the continuation of the pre-training of PORTULAN's Albertina models with Electronic Medical Records shared by Portugal's largest public hospital.
Like its antecessors, MediAlbertina models are distributed under the MIT license.
MediAlbertina PT-PT 1.5 NER was created through fine-tuning of MediAlbertina PT-PT 1.5B on real European Portuguese EMRs that have been hand-annotated for the following entities:
MediAlbertina PT-PT 1.5B NER achieved superior results to the same adaptation made on a non-medical Portuguese language model, demonstrating the effectiveness of this domain adaptation, and its potential for medical AI in Portugal.
| Checkpoints | Prec | Rec | F1 |
|---|---|---|---|
| Albertina PT-PT 900M | 0.814 | 0.814 | 0.813 |
| Albertina PT-PT 1.5B | 0.833 | 0.845 | 0.838 |
| MediAlbertina PT-PT900M | 0.84 | 0.828 | 0.832 |
| MediAlbertina PT-PT 1.5B | 0.842 | 0.845 | 0.843 |
MediAlbertina PT-PT 1.5B NER was fine-tuned on about 10k hand-annotated medical entities from about 4k fully anonymized medical sentences from Portugal's largest public hospital. This data was acquired under the framework of the FCT project DSAIPA/AI/0122/2020 AIMHealth-Mobile Applications Based on Artificial Intelligence.
from transformers import pipeline
ner_pipeline = pipeline('ner', model='portugueseNLP/medialbertina_pt-pt_1.5b_NER', aggregation_strategy='average')
sentence = 'Durante o procedimento endoscópico, foram encontrados pólipos no cólon do paciente.'
entities = ner_pipeline(sentence)
for entity in entities:
print(f"{entity['entity_group']} - {sentence[entity['start']:entity['end']]}")
MediAlbertina is developed by a joint team from ISCTE-IUL, Portugal, and Select Data, CA USA. For a fully detailed description, check the respective publication:
@article{MediAlbertina PT-PT,
title={MediAlbertina: An European Portuguese medical language model},
author={Miguel Nunes and João Boné and João Ferreira
and Pedro Chaves and Luís Elvas},
year={2024},
journal={CBM},
volume={182}
url={https://doi.org/10.1016/j.compbiomed.2024.109233}
}
Please use the above cannonical reference when using or citing this model.
This work was financially supported by Project Blockchain.PT – Decentralize Portugal with Blockchain Agenda, (Project no 51), WP2, Call no 02/C05-i01.01/2022, funded by the Portuguese Recovery and Resillience Program (PRR), The Portuguese Republic and The European Union (EU) under the framework of Next Generation EU Program.