Redme.md file updated according to this system
Browse files
README.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# CHFReportGenerator 🫀
|
| 2 |
+
|
| 3 |
+
An evidence-anchored, research-focused system for automated report generation
|
| 4 |
+
in Congestive Heart Failure (CHF) analysis.
|
| 5 |
+
|
| 6 |
+
---
|
| 7 |
+
|
| 8 |
+
## 🔖 Project at a Glance
|
| 9 |
+
|
| 10 |
+
- **Project name:** CHFReportGenerator
|
| 11 |
+
- **Primary goal:** Generate clinically grounded and explainable CHF reports
|
| 12 |
+
- **Focus:** Interpretability, transparency, and reproducibility
|
| 13 |
+
- **Intended users:** Researchers, PhD evaluators, clinicians (research support)
|
| 14 |
+
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
## ✨ Key Features & Contributions
|
| 18 |
+
|
| 19 |
+
- **Evidence-anchored reporting**
|
| 20 |
+
Every generated finding is explicitly linked to supporting evidence.
|
| 21 |
+
|
| 22 |
+
- **Clinically grounded narratives**
|
| 23 |
+
Outputs are written in structured, clinically meaningful language.
|
| 24 |
+
|
| 25 |
+
- **Parameter-efficient fine-tuning (QLoRA)**
|
| 26 |
+
Adapts a large language model with minimal computational cost.
|
| 27 |
+
|
| 28 |
+
- **Research-first design**
|
| 29 |
+
Built to support academic evaluation and reproducibility.
|
| 30 |
+
|
| 31 |
+
- **Hardware-efficient**
|
| 32 |
+
4-bit quantization enables large-model usage on limited GPU resources.
|
| 33 |
+
|
| 34 |
+
---
|
| 35 |
+
|
| 36 |
+
## 🧠 Model Overview
|
| 37 |
+
|
| 38 |
+
- **Base model:** Qwen2.5-VL-7B-Instruct
|
| 39 |
+
- **Model type:** Vision-Language Large Language Model
|
| 40 |
+
- **Quantization:** 4-bit (BitsAndBytes)
|
| 41 |
+
- **Framework:** Unsloth
|
| 42 |
+
- **Maximum sequence length:** 2048 tokens
|
| 43 |
+
|
| 44 |
+
The base model provides general reasoning and language understanding,
|
| 45 |
+
while CHF-specific behavior is introduced through lightweight adapters.
|
| 46 |
+
|
| 47 |
+
---
|
| 48 |
+
|
| 49 |
+
## 🔧 Fine-Tuning Method: QLoRA (Brief)
|
| 50 |
+
|
| 51 |
+
This project uses **QLoRA (Quantized Low-Rank Adaptation)**, which combines:
|
| 52 |
+
|
| 53 |
+
- 4-bit quantization of the base model
|
| 54 |
+
- LoRA-based parameter-efficient fine-tuning
|
| 55 |
+
|
| 56 |
+
### How QLoRA is Applied
|
| 57 |
+
|
| 58 |
+
- The base model is loaded in **4-bit precision**
|
| 59 |
+
- All base model weights remain **frozen**
|
| 60 |
+
- Trainable **LoRA adapters** are introduced
|
| 61 |
+
- Only adapter parameters are updated during training
|
| 62 |
+
|
| 63 |
+
### Why QLoRA?
|
| 64 |
+
|
| 65 |
+
- Enables fine-tuning of a 7B model on limited hardware
|
| 66 |
+
- Preserves general medical and linguistic knowledge
|
| 67 |
+
- Reduces overfitting and hallucination risk
|
| 68 |
+
- Supports reproducible, explainable research
|
| 69 |
+
|
| 70 |
+
QLoRA allows CHF-specific adaptation without retraining the full model,
|
| 71 |
+
making it well-suited for PhD-level experimentation.
|
| 72 |
+
|
| 73 |
+
---
|
| 74 |
+
|
| 75 |
+
## ⚙️ Installation
|
| 76 |
+
|
| 77 |
+
### Requirements
|
| 78 |
+
|
| 79 |
+
- Python 3.8 or higher
|
| 80 |
+
- CUDA-enabled GPU (recommended)
|
| 81 |
+
- PyTorch
|
| 82 |
+
- Hugging Face Transformers
|
| 83 |
+
- Unsloth
|
| 84 |
+
- BitsAndBytes
|
| 85 |
+
|
| 86 |
+
All dependencies are listed in `requirements.txt`.
|
| 87 |
+
|
| 88 |
+
### Step-by-Step Setup
|
| 89 |
+
|
| 90 |
+
```bash
|
| 91 |
+
git clone https://huggingface.co/aiyubali/CHFReportGenerator
|
| 92 |
+
cd CHFReportGenerator
|
| 93 |
+
pip install -r requirements.txt
|