Giter Site home page Giter Site logo

cja5553 / llms_in_perioperative_care Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 635 KB

Codes for "Prescribing Large Language Models for Perioperative Care: What’s The Right Dose for Pretrained Models?"

Jupyter Notebook 87.64% Python 12.36%
health-outcomes large-language-models medical-informatics medicine

llms_in_perioperative_care's Introduction

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")

Goal:

  • Experiment the use of pretrained LLMs across different fine-tuning strategies in surgical outcomes of Perioperative Care.

  • The following strategies were experimented:

    1. using pretrained models alone
    2. applying finetuning
    3. applying semi-supervised fine-tuning with the labels
    4. foundational model where a multi-task learning strategy was employed.
  • 3 primary models were used for prediction

    1. bioGPT
    2. ClinicalBERT
    3. bioclinicalBERT.

Dataset:

  • 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:
      1. Death in 30 days
      2. Deep vein thrombosis (DVT)
      3. pulmonary embolism (PE)
      4. Pneumonia
      5. Acute Knee Injury
      6. delirium
  • Characteristics:

    • vocabulary size 3203
    • averaging 8.9 words per case,
    • all single sentenced clinical notes

To use:

  • 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 from huggingface's github profile and slot the relevant files in the same folders of which they appear in the local_transformers folders of this github repo.

Questions?

Contact me at [email protected]

llms_in_perioperative_care's People

Contributors

cja5553 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.