Update README.md
Browse files
README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
-
pipeline_tag:
|
| 4 |
tags:
|
| 5 |
- seq2seq
|
| 6 |
- summarization
|
|
@@ -40,56 +40,42 @@ model_index:
|
|
| 40 |
## Model Details
|
| 41 |
|
| 42 |
### Model Description
|
| 43 |
-
|
| 44 |
-
This model is a fine-tuned version of `google/t5-small` trained on **MIMIC-IV-BHC** clinical notes to produce simplified, patient-friendly summaries of discharge documentation.
|
| 45 |
-
It was developed as part of the *Patient-Friendly Summarization of Clinical Discharge Notes* project, which also explores a Retrieval-Augmented Generation (RAG) pipeline to improve factual grounding.
|
| 46 |
|
| 47 |
- **Developed by:** Dhyan Patel & Vidit Gandhi
|
| 48 |
-
- **Funded by:** Academic course project (DS 5983 – Large Language Models)
|
| 49 |
- **Model type:** Encoder–decoder transformer (seq2seq)
|
| 50 |
- **Language(s):** English
|
| 51 |
-
- **License:** Apache
|
| 52 |
-
- **Finetuned from
|
| 53 |
|
| 54 |
### Model Sources
|
| 55 |
-
- **Repository:**
|
| 56 |
-
- **Dataset:**
|
| 57 |
-
|
| 58 |
-
---
|
| 59 |
|
| 60 |
## Uses
|
| 61 |
|
| 62 |
### Direct Use
|
| 63 |
-
-
|
| 64 |
-
- Helping patients understand complex psychiatric or psychological discharge information.
|
| 65 |
|
| 66 |
### Downstream Use
|
| 67 |
-
-
|
| 68 |
-
- Integration with hospital discharge workflows.
|
| 69 |
-
- Use in RAG pipelines to enhance factual reliability.
|
| 70 |
|
| 71 |
-
### Out-of-Scope
|
| 72 |
-
- Automated diagnosis or
|
| 73 |
-
- Summarizing non-healthcare text without adaptation.
|
| 74 |
-
|
| 75 |
-
---
|
| 76 |
|
| 77 |
## Bias, Risks, and Limitations
|
| 78 |
-
- May omit subtle
|
| 79 |
-
-
|
| 80 |
-
- Risks of hallucination if model is prompted with incomplete or ambiguous text.
|
| 81 |
-
|
| 82 |
-
---
|
| 83 |
|
| 84 |
-
## How to Get Started
|
| 85 |
```python
|
| 86 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
| 87 |
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
model = AutoModelForSeq2SeqLM.from_pretrained(
|
| 91 |
|
| 92 |
-
text = "
|
| 93 |
-
inputs =
|
| 94 |
-
|
| 95 |
-
print(
|
|
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
+
pipeline_tag: summarization
|
| 4 |
tags:
|
| 5 |
- seq2seq
|
| 6 |
- summarization
|
|
|
|
| 40 |
## Model Details
|
| 41 |
|
| 42 |
### Model Description
|
| 43 |
+
Fine-tuned `google/t5-small` to simplify **behavioral health discharge notes** (MIMIC-IV-BHC) into patient-friendly summaries. Part of the *Patient-Friendly Summarization of Clinical Discharge Notes* project; also explored with a RAG variant for added factual grounding.
|
|
|
|
|
|
|
| 44 |
|
| 45 |
- **Developed by:** Dhyan Patel & Vidit Gandhi
|
|
|
|
| 46 |
- **Model type:** Encoder–decoder transformer (seq2seq)
|
| 47 |
- **Language(s):** English
|
| 48 |
+
- **License:** Apache-2.0
|
| 49 |
+
- **Finetuned from:** `google/t5-small`
|
| 50 |
|
| 51 |
### Model Sources
|
| 52 |
+
- **Repository:** <your model URL>
|
| 53 |
+
- **Dataset:** MIMIC-IV-BHC (PhysioNet)
|
|
|
|
|
|
|
| 54 |
|
| 55 |
## Uses
|
| 56 |
|
| 57 |
### Direct Use
|
| 58 |
+
- Generate lay summaries from behavioral health discharge notes.
|
|
|
|
| 59 |
|
| 60 |
### Downstream Use
|
| 61 |
+
- Embed in EHR/patient portals; pair with RAG to ground definitions and instructions.
|
|
|
|
|
|
|
| 62 |
|
| 63 |
+
### Out-of-Scope
|
| 64 |
+
- Automated diagnosis/prescribing or any unsupervised clinical decision-making.
|
|
|
|
|
|
|
|
|
|
| 65 |
|
| 66 |
## Bias, Risks, and Limitations
|
| 67 |
+
- May omit subtle clinical nuance; behavioral health notes can include sensitive content—human review is required.
|
| 68 |
+
- Risk of hallucinations if fed incomplete context.
|
|
|
|
|
|
|
|
|
|
| 69 |
|
| 70 |
+
## How to Get Started
|
| 71 |
```python
|
| 72 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
| 73 |
|
| 74 |
+
model_id = "your-username/patient-friendly-mimic-iv-bhc-t5-small"
|
| 75 |
+
tok = AutoTokenizer.from_pretrained(model_id)
|
| 76 |
+
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
|
| 77 |
|
| 78 |
+
text = "Paste a BHC discharge note..."
|
| 79 |
+
inputs = tok(text, return_tensors="pt", truncation=True, max_length=512)
|
| 80 |
+
summary_ids = model.generate(**inputs, max_length=128)
|
| 81 |
+
print(tok.decode(summary_ids[0], skip_special_tokens=True))
|