This is a
mamba
model with context length
1024
with
121100544
parameters from the
Context Clues paper
.
It is a foundation model trained from scratch on the structured data within 2.57 million deidentified EHRs from Stanford Medicine.
As input, this model expects a sequence of coded medical events that have been mapped to Standard Concepts within the
OMOP-CDM vocabulary
. As output, the model can generate either (a) synthetic future timelines or (b) a vector representation of a patient which can then be used for downstream prediction tasks.
Usage
First, install the
hf_ehr
package:
pip install transformers torch hf_ehr
Second, run this Python script to do inference on a patient representation:
Languages:
Electronic health record codes (as standardized by the
OMOP-CDM
)
License:
CC-BY NC 4.0
Finetuned from model:
N/A -- trained from scratch
Uses
This model is intended to generate representations for patients based on the structured data within their electronic health record.
These representations can then be used for downstream tasks such as predicting diagnoses, detecting anomalies, or doing propensity score matching for causal inference.
Direct Use
You will likely want to tune the model for your downstream use case.
Out-of-Scope Use
This model is for research purposes only. It is not for use in any real-world decision making that impacts patients, providers, or hospital operations.
Bias, Risks, and Limitations
This model was trained on a corpus of 2 billion tokens sourced from 2.57 million patients from Stanford Medicine.
The model will thus reflect the patterns of how care is delivered at Stanford Medicine, in addition to the racial and socioeconomic makeup of Stanford Medicine's patient base.
This model may not generalize well to other hospitals and demographic mixes.
While this is technically a generative model, we have not tested its generative abilities and thus do not anticipate it being used to generate synthetic EHR records.
We aim to explore its generative abilities in future work.
Training Details
Full training details are provided in our accompanying paper, [TODO]
Training Data
The model is trained on 2 billion tokens sourced from 2.57 million patients from the
Stanford Medicine Research Data Repository (STARR)
,
which contains structured EHR data from both Stanford Health Care (primarily adult care) and Lucile Packard Children’s Hospital (primarily pediatric care).
The dataset contains only structured data (i.e. no clinical text or images) and covers demographics (e.g. age, sex, race), diagnoses, procedures, laboratory results, medication prescriptions, and other coded clinical observations.
The data is formatted according to the
Observational Medical Outcomes Partnership Common Data Model (OMOP-CDM)
.
All data that we work with is deidentified.
Training Procedure
We train our model using an autoregressive next code prediction objective, i.e. predict the next code in a patient's timeline given their previous codes.
mamba-tiny-1024-clmbr huggingface.co is an AI model on huggingface.co that provides mamba-tiny-1024-clmbr's model effect (), which can be used instantly with this StanfordShahLab mamba-tiny-1024-clmbr model. huggingface.co supports a free trial of the mamba-tiny-1024-clmbr model, and also provides paid use of the mamba-tiny-1024-clmbr. Support call mamba-tiny-1024-clmbr model through api, including Node.js, Python, http.
mamba-tiny-1024-clmbr huggingface.co is an online trial and call api platform, which integrates mamba-tiny-1024-clmbr's modeling effects, including api services, and provides a free online trial of mamba-tiny-1024-clmbr, you can try mamba-tiny-1024-clmbr online for free by clicking the link below.
StanfordShahLab mamba-tiny-1024-clmbr online free url in huggingface.co:
mamba-tiny-1024-clmbr is an open source model from GitHub that offers a free installation service, and any user can find mamba-tiny-1024-clmbr on GitHub to install. At the same time, huggingface.co provides the effect of mamba-tiny-1024-clmbr install, users can directly use mamba-tiny-1024-clmbr installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
mamba-tiny-1024-clmbr install url in huggingface.co: