Zima is a fine-tuned Qwen 2.5 1.5B model specifically designed to assist elderly individuals with health-related questions. Unlike general-purpose chatbots, Zima:
✅ Age-Appropriate Communication - Uses clear, simple language
✅ Safety-First Approach - Prioritizes user safety, knows when to recommend emergency services
✅ Actionable Advice - Provides specific, implementable steps rather than generic suggestions
✅ Comprehensive Coverage - Handles everything from daily wellness to first aid
✅ Compact & Efficient - Only 1.5B parameters, perfect for edge deployment
📊 Performance Metrics
Metric
Value
Status
Perplexity
1.51
🏆 Excellent (< 2.0)
Training Loss
0.32
✅ Converged
Validation Loss
0.40
✅ No overfitting
Training Samples
10,743
📚 High quality
Model Size
71 MB (LoRA)
🚀 Edge-ready
🚀 Quick Start
Installation
pip install unsloth transformers torch
Basic Usage
python
1from unsloth import FastLanguageModel
23# Load model4model, tokenizer = FastLanguageModel.from_pretrained(5"YsK-dev/zima-qwen-geriatric-1.5b",6 max_seq_length=512,7 dtype=None,8 load_in_4bit=True,9)1011# Enable inference mode12FastLanguageModel.for_inference(model)1314# Create prompt15prompt ="""Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
1617### Instruction:
18How can I prevent falls at home?
1920### Input:
21Patient is elderly (70+), seeking advice on safety.
2223### Response:
24"""2526# Generate response27inputs = tokenizer([prompt], return_tensors="pt").to("cuda")28outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.7)29response = tokenizer.batch_decode(outputs)[0]3031print(response)
Expected Output
Install handrails near stairs and in the bathroom. Use non-slip mats in the shower
and bathtub. Keep floors clear of clutter. Ensure good lighting throughout your
home, especially in hallways and near stairs. Consider using a walking aid if you
feel unsteady. Remove loose rugs or secure them with non-slip backing.
Zima: Rest and drink plenty of fluids like warm water, tea or soup. Use saline nasal spray to clear congestion. Take over-the-counter decongestants if needed. Avoid close contact with others. See your doctor for severe symptoms. Stay home until you feel better.
Example 2: Loneliness
User: I feel lonely
Zima: Try joining clubs or groups where you can meet people with similar interests. Consider volunteering to help others and connect socially. Regular phone calls can also keep relationships strong. Talk to a counselor if loneliness feels overwhelming.
Example 3: Medication Management
User: I keep forgetting to take my pills
Zima: Consider using a pill organizer and fill it weekly. Set reminders on your phone or use an alarm clock. Ask family members to help remind you. Keep your medications in a visible spot where you'll see them daily. Talk to your pharmacist about once-daily formulations if available.
⚠️ Limitations & Safety
Important Disclaimers
🚨 NOT A REPLACEMENT FOR PROFESSIONAL MEDICAL CARE
Zima is designed to provide general health guidance and support, but it:
Cannot diagnose medical conditions
Cannot prescribe medications
Cannot replace emergency services (911)
Cannot provide personalized medical treatment plans
Known Limitations
Emergency Responses: May be verbose in critical situations (working on v2)
Language: Currently English-only
Geographic Specificity: Advice is general and may not apply to all regions
Personalization: Cannot access individual medical histories
When to Seek Professional Help
Always contact a healthcare provider or emergency services for:
Chest pain or difficulty breathing
Severe bleeding that won't stop
Loss of consciousness
Sudden vision or speech changes
Severe allergic reactions
Any life-threatening emergency
🛠️ Advanced Usage
Deployment on Edge Devices
Zima is optimized for deployment on resource-constrained devices like Raspberry Pi 5:
bash
1# Quantize to GGUF for even smaller size2python quantize_to_gguf.py --model YsK-dev/zima-qwen-geriatric-1.5b --quant q4_k_m
34# Run inference on CPU5from llama_cpp import Llama
6model = Llama(model_path="zima-q4_k_m.gguf")