File size: 2,499 Bytes
fbfc9df be8f95d 88b65c7 be8f95d 88b65c7 be8f95d 88b65c7 be8f95d 88b65c7 be8f95d 88b65c7 be8f95d 88b65c7 be8f95d 88b65c7 be8f95d 88b65c7 be8f95d 88b65c7 be8f95d 88b65c7 be8f95d 88b65c7 be8f95d 88b65c7 be8f95d 88b65c7 be8f95d 88b65c7 be8f95d 88b65c7 be8f95d 88b65c7 be8f95d 88b65c7 be8f95d 88b65c7 be8f95d 88b65c7 be8f95d 88b65c7 be8f95d 88b65c7 be8f95d 88b65c7 be8f95d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | ---
{}
---
# Vitals Interpreter Model (Fine-Tuned LLM)
## Project Overview
This project implements a fine-tuned transformer model that interprets basic human vital signs and generates structured health guidance.
The model takes numerical vitals as input and produces a concise, human-readable output consisting of:
- Health status classification
- Suggested action/advice
---
## Objective
To build a lightweight, efficient AI system that:
- Understands structured vital inputs
- Classifies health condition into categories
- Generates consistent and controlled responses
---
## Model Details
- **Base Model:** t5-small
- **Architecture:** Encoder-Decoder Transformer
- **Fine-Tuning Type:** Supervised Fine-Tuning (SFT)
- **Framework:** Hugging Face Transformers
---
## Input Format
interpret vitals -> heart rate X, blood pressure Y/Z, temperature T
### Example:
interpret vitals -> heart rate 125, blood pressure 150/95, temperature 100
---
## Output Format
Status: <Normal | High | Low | Critical> | Advice: <short guidance>
### Example Output:
Status: High | Advice: Monitor and consult doctor
---
## Dataset
- **Type:** Synthetic dataset
- **Size:** ~30–50 samples
- **Design Approach:**
- Based on medically accepted ranges of vital signs
- Balanced across categories:
- Normal
- High
- Low
- Critical
### Why Synthetic Data?
Due to lack of publicly available labeled text datasets for this task, a controlled dataset was generated to:
- Ensure consistency in output format
- Improve learning efficiency
- Avoid noisy or unstructured data
---
## Training Configuration
- **Epochs:** 20–30
- **Batch Size:** 2–4
- **Learning Rate:** 5e-5
- **Max Sequence Length:** 64
- **Tokenizer:** AutoTokenizer (T5)
---
## Evaluation
### Method:
- Manual testing with unseen inputs
- Verification of:
- Correct classification (Normal / High / Low / Critical)
- Proper output structure
- Relevance of advice
### Sample Predictions:
| Input | Output |
|------|--------|
| HR: 125, BP: 150/95, Temp: 100 | Status: High \| Advice: Monitor and consult doctor |
| HR: 72, BP: 120/80, Temp: 98.6 | Status: Normal \| Advice: No action needed |
| HR: 140, BP: 170/110, Temp: 103 | Status: Critical \| Advice: Emergency care required |
---
## How to Use
### Installation
```python
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
Author:
Archee Sinha
B.Tech CSE (AI)
ABES Institute of Technology |