Instructions to use cja5553/BJH-perioperative-notes-bioGPT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cja5553/BJH-perioperative-notes-bioGPT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cja5553/BJH-perioperative-notes-bioGPT")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("cja5553/BJH-perioperative-notes-bioGPT") model = AutoModelForCausalLM.from_pretrained("cja5553/BJH-perioperative-notes-bioGPT") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use cja5553/BJH-perioperative-notes-bioGPT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cja5553/BJH-perioperative-notes-bioGPT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cja5553/BJH-perioperative-notes-bioGPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cja5553/BJH-perioperative-notes-bioGPT
- SGLang
How to use cja5553/BJH-perioperative-notes-bioGPT with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "cja5553/BJH-perioperative-notes-bioGPT" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cja5553/BJH-perioperative-notes-bioGPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "cja5553/BJH-perioperative-notes-bioGPT" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cja5553/BJH-perioperative-notes-bioGPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cja5553/BJH-perioperative-notes-bioGPT with Docker Model Runner:
docker model run hf.co/cja5553/BJH-perioperative-notes-bioGPT
BJH-perioperative-notes-bioGPT
This clinical foundational model is designed to predict potential risk factors / post-operative surgical outcomes from clinical notes taken during perioperative care. It was finetuned from the microsoft/biogpt model through a multi-task learning approach, spanning the following 6 outcomes:
- Death in 30 days
- Deep vein thrombosis (DVT)
- pulmonary embolism (PE)
- Pneumonia
- Acute Knee Injury
- delirium
Also check out cja5553/BJH-perioperative-notes-bioClinicalBERT, which is the bioClinicalBERT variant of our model!
Dataset
We used 84,875 perioperative clinical notes spanning 3 years worth of anonymized patient data from the Barnes Jewish Healthcare (BJH) system in St Louis, MO. BJH is the largest hospital in the state of Missouri and the largest employer in the greater St. Louis region! The following are the characteristics for the data:
- vocabulary size: 3203
- averaging words per clinical note: 8.9 words
- all single sentenced clinical notes
How to use model
from transformers import BioGptTokenizer, AutoModelForCausalLM
model=AutoModelForCausalLM.from_pretrained("cja5553/BJH-perioperative-notes-bioGPT")
tokenizer = BioGptTokenizer.from_pretrained("microsoft/biogpt")
Note: Because of our distinct model architecture, you are required to train a distinct predictor or use a respective fully-connected network above the hidden state when deploying the model via transformers
Codes
Codes used to train the model are publicly available at: https://github.com/cja5553/LLMs_in_perioperative_care
Note:
The model remains private as it was trained on clinical notes from patients. Requests made with non-institutional emails (e.g., gmail.com) will be rejected.
Reasonable requests from recognized institutional emails may have to undergo appropriate approvals to access the model.
Citation
If you find this model useful, please cite the following paper:
@article{
author={Charles Alba, Bing Xue, Joanna Abraham, Thomas Kannampallil, Chenyang Lu},
title={The Foundational Capabilities of Large Language Models in Predicting Postoperative Risks Using Clinical Notes},
year={2025}, journal={npj Digital Medicine}, doi={10.1038/s41746-025-01489-2}
}
Questions?
contact me at alba@wustl.edu
- Downloads last month
- -
Model tree for cja5553/BJH-perioperative-notes-bioGPT
Base model
microsoft/biogpt