Prescribing Large Language Models (LLMs) for Perioperative Care: What’s The Right Dose for Pretrained Models?
Our best performing finetuned models are available at 🤗 Huggingface
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("cja5553/BJH-perioperative-notes-bioClinicalBERT")
model = AutoModel.from_pretrained("cja5553/BJH-perioperative-notes-bioClinicalBERT")
from transformers import BioGptTokenizer, AutoModelForCausalLM
model=AutoModelForCausalLM.from_pretrained("cja5553/BJH-perioperative-notes-bioGPT")
tokenizer = BioGptTokenizer.from_pretrained("microsoft/biogpt")
-
Experiment the use of pretrained LLMs across different fine-tuning strategies in surgical outcomes of Perioperative Care.
-
The following strategies were experimented:
- using pretrained models alone
- applying finetuning
- applying semi-supervised fine-tuning with the labels
- foundational model where a multi-task learning strategy was employed.
-
3 primary models were used for prediction
- bioGPT
- ClinicalBERT
- bioclinicalBERT.
-
We used 84,875 clinical notes from patients spanning the Barnes Jewish Center Hospital (BJC) hospital system in St Louis, MO.
- The following outcomes were used:
- Death in 30 days
- Deep vein thrombosis (DVT)
- pulmonary embolism (PE)
- Pneumonia
- Acute Knee Injury
- delirium
- The following outcomes were used:
-
Characteristics:
- vocabulary size 3203
- averaging 8.9 words per case,
- all single sentenced clinical notes
- You should be able to run the codes as it is on the Jupyter notebook files provided (of course with your own dataset)
- For the semi-supervised and foundational version, you may need to clone the
transformers
package fromhuggingface
's github profile and slot the relevant files in the same folders of which they appear in thelocal_transformers
folders of this github repo.
Contact me at alba@wustl.edu