thebnbrkr's picture
Update README.md
03ada85 verified
---
library_name: transformers
pipeline_tag: text-generation
tags:
- medical
- chatbot
- instruction-tuning
- LLaMA
- LoRA
base_model: meta-llama/Llama-3.2-3B-Instruct
datasets:
- ruslanmv/ai-medical-chatbot
language: en
license: apache-2.0
---
# Hippocratically LLaMA 3.2: Medical Chatbot (LoRA Fine-tuned)
**Model:** thebnbrkr/hippocratically_llama3.2
**Base:** `meta-llama/Llama-3.2-3B-Instruct`
**Fine-tuning:** LoRA (via PEFT + TRL’s SFTTrainer)
**Dataset:** `ruslanmv/ai-medical-chatbot` (public medical Q&A)
---
## Model Description
`hippocratically_llama3.2` is a LoRA-finetuned version of Meta’s LLaMA 3.2B-Instruct model, adapted for clinical dialogue and general medical question-answering. It uses instruction-tuning and parameter-efficient fine-tuning (PEFT) methods to create a compact and responsive healthcare assistant for research and educational use.
---
## Intended Use
- Medical Q&A chatbot simulations
- Research on LoRA-based instruction tuning
- Prompt evaluation in clinical contexts
- LLM alignment/hallucination analysis
---
## Limitations
- Not suitable for clinical deployment
- May hallucinate outdated or unsafe information
- Doesn't prioritize emergencies unless prompted
- Lacks real-time patient data or diagnostic context
---
## Training Details
- **Base model:** `meta-llama/Llama-3.2-3B-Instruct`
- **Fine-tuning method:** LoRA (`r=8`, `alpha=16`, dropout `0.05`)
- **Target modules:** `q_proj`, `v_proj`
- **Trainer:** `SFTTrainer` from `trl`
- **Batch size:** 2
- **Epochs:** 1
- **Learning rate:** 2e-4
- **Precision:** fp16
- **Output dir:** `./llama3.2-medical-chat`
---
## Example Prompt:
prompt: |
How can someone determine their metabolic rate?
## Example response:
Metabolic rate can be determined in several ways, depending on the context and level of precision required.
1. **Basal Metabolic Rate (BMR):** This is the number of calories your body needs at rest. A commonly used formula to estimate BMR for women is:
BMR = 655 + (4.35 × weight in lbs) + (4.7 × height in inches) – (4.7 × age in years)
For men:
BMR = 66 + (6.23 × weight in lbs) + (12.7 × height in inches) – (6.8 × age in years)
2. **Harris-Benedict Equation:** This builds on BMR to estimate **Total Daily Energy Expenditure (TDEE)** by multiplying the BMR by an activity factor (e.g., 1.2 for sedentary, 1.55 for moderate activity).
3. **Clinical Methods:** More accurate tests, like **indirect calorimetry**, measure oxygen consumption and carbon dioxide production to calculate actual energy expenditure.
4. **Wearables and Apps:** Fitness trackers and smart devices offer real-time estimates, though they are less precise.
Always consult a healthcare provider for personalized metabolic assessments or weight management planning.