Run this model with HF Jobs
Run cja5553/BJH-perioperative-notes-bioGPT on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/cja5553/BJH-perioperative-notes-bioGPT. Ask me which dataset to train on, then push the fine-tuned model to a new private model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/cja5553/BJH-perioperative-notes-bioGPT on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/cja5553/BJH-perioperative-notes-bioGPT. Ask me which benchmark to run, then save the scores and the per-example results to a new private dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/cja5553/BJH-perioperative-notes-bioGPT. Push it to a new private model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
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")# pip install -U transformers accelerate # 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", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- 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