File size: 2,833 Bytes
635de49 a48da73 635de49 a48da73 635de49 a48da73 635de49 a48da73 635de49 03ada85 635de49 a48da73 635de49 a48da73 635de49 03ada85 635de49 a48da73 635de49 a48da73 635de49 03ada85 635de49 a48da73 635de49 a48da73 635de49 03ada85 635de49 a48da73 635de49 a48da73 03ada85 |
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 |
---
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.
|