Run this model with HF Jobs
Run AlaaBlank/clinical-documentation-smart-summarizer 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 to fine-tune https://huggingface.co/AlaaBlank/clinical-documentation-smart-summarizer. Ask me which dataset to train on, then push the fine-tuned model to a new 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/AlaaBlank/clinical-documentation-smart-summarizer 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.
Instructions to use AlaaBlank/clinical-documentation-smart-summarizer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AlaaBlank/clinical-documentation-smart-summarizer with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "summarization" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("summarization", model="AlaaBlank/clinical-documentation-smart-summarizer")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("AlaaBlank/clinical-documentation-smart-summarizer", device_map="auto") - PEFT
How to use AlaaBlank/clinical-documentation-smart-summarizer with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Clinical Documentation Smart Summarizer
Model description
This project is an educational prototype for summarizing synthetic English clinical notes. It explores adapting sequence-to-sequence language models to produce shorter summaries while retaining clinically relevant information.
The project evaluates google/flan-t5-small and google/mt5-small.
LoRA adapters were trained using PEFT. This repository is intended for
academic experimentation only.
Intended use
- Academic experimentation with text summarization.
- Demonstrations using synthetic clinical notes.
- Comparing baseline and LoRA-adapted model outputs.
Out-of-scope use
- Do not use with real patient records or identifiable health information.
- Do not use for diagnosis, treatment recommendations, triage, or clinical decision-making.
- Do not use as a replacement for review by a qualified healthcare professional.
Training data
The project uses a synthetic dataset of 500 English clinical note and reference-summary pairs. No real patient records were used.
The dataset includes six specialties: - Emergency Medicine: 100 records - Internal Medicine: 100 records - General Surgery: 80 records - Pediatrics: 70 records - Obstetrics & Gynecology: 50 records - Intensive Care: 100 records
The dataset contains the following columns: - case_id -
clinical_specialty - document_type - clinical_note -
clinical_summary
The data was split into 70% training (350 records), 15% validation (75 records), and 15% test (75 records), using a fixed seed of 42. The test split was reserved for final evaluation and was not used for training.
Dataset licensing: The dataset was synthetically created for this project. No separate open redistribution license has been assigned to it.
Models and training
The experiments used: - google/flan-t5-small - google/mt5-small
Parameter-efficient fine-tuning was performed with LoRA using PEFT.
LoRA configuration: - Rank (r): 8 - Alpha: 16 - Dropout: 0.1 - Target
modules: q and v
Training configuration: - Epochs: 3 - Batch size: 4 - Gradient accumulation steps: 2 - Maximum gradient norm: 1.0 - Maximum input length: 512 tokens - Target summary length: 128 tokens - Random seed: 42
Experiments A and B used FLAN-T5 with different learning rates (2e-4 and 1e-4). Experiment C evaluated mT5 with a learning rate of 2e-4.
Evaluation
Generated summaries were evaluated on the held-out test set using ROUGE-1, ROUGE-2, and ROUGE-L. A qualitative review worksheet was also used to examine 15 examples across clinical accuracy, information preservation, conciseness, and control of unsupported information.
ROUGE measures textual overlap with reference summaries. It does not independently establish clinical correctness, completeness, or safety.
Reported ROUGE results:
Model / experiment ROUGE-1 ROUGE-2 ROUGE-L
FLAN-T5 baseline 0.7133 0.5154 0.6402 FLAN-T5 LoRA A 0.7987 0.5969 0.7329 FLAN-T5 LoRA B 0.7992 0.5968 0.7334 mT5 baseline 0.0247 0.0063 0.0240 mT5 LoRA C 0.0694 0.0290 0.0649
The two FLAN-T5 LoRA experiments produced very similar results. Experiment B was slightly higher on ROUGE-1 and ROUGE-L, while experiment A was slightly higher on ROUGE-2.
Limitations
- The dataset is synthetic and limited to 500 examples; it may not represent the diversity of real clinical documentation.
- Some outputs showed insufficient compression, omission of details, or incomplete phrases.
- ROUGE scores measure textual similarity and should not be interpreted as proof of clinical accuracy.
- The model has not been validated on real patient data or in clinical workflows.
- The qualitative review of 15 examples is limited in size and scope.
Ethical and safety considerations
This model is an educational research prototype. It must not be used with real patient information or for clinical decisions. Any future investigation beyond academic use would require appropriate governance, privacy and security safeguards, expert clinical evaluation, and additional safety testing.
How to use
Load the base model and the matching LoRA adapter using the Hugging Face Transformers and PEFT libraries. The adapter must be paired with the correct base model and tokenizer used in its experiment. Refer to the project notebook for the exact loading and inference workflow.
Acknowledgements
Built as an individual academic project using Hugging Face Transformers, PEFT, and Google Colab.