π₯ Relational Intelligence MedGemma
A fine-tuned medical language model specialized in person-centred nursing care and practice development.
π― Model Description
This model extends Google's MedGemma 4B with specialized knowledge in:
- Person-centred care principles and practice
- Practice development methodology (IPDJ framework)
- Relational care in nursing contexts
- Critical creativity and emancipatory practice
- Human flourishing in healthcare settings
Training Data
Fine-tuned on 15,000+ question-answer pairs derived from:
- International Practice Development Journal (IPDJ)
- Foundation of Nursing Studies (FoNS) resources
- Practice development literature and frameworks
π Quick Start
Using with Transformers
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
# Load base model
base_model = AutoModelForCausalLM.from_pretrained(
"google/medgemma-4b-it",
torch_dtype=torch.float16,
device_map="auto",
token="YOUR_HF_TOKEN" # MedGemma requires auth
)
# Load LoRA adapter
model = PeftModel.from_pretrained(
base_model,
"NurseCitizenDeveloper/relational-intelligence-unsloth-medgemma"
)
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained(
"NurseCitizenDeveloper/relational-intelligence-unsloth-medgemma"
)
# Generate
prompt = "What is person-centred care in nursing?"
formatted = f"<start_of_turn>user\n{prompt}<end_of_turn>\n<start_of_turn>model\n"
inputs = tokenizer(formatted, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.7)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
Using with Unsloth (Recommended for Speed)
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
"NurseCitizenDeveloper/relational-intelligence-unsloth-medgemma",
max_seq_length=2048,
load_in_4bit=True,
)
FastLanguageModel.for_inference(model)
# Use tokenizer.tokenizer for text-only (MedGemma has multimodal processor)
prompt = "Explain relational care in nursing practice."
formatted = f"<start_of_turn>user\n{prompt}<end_of_turn>\n<start_of_turn>model\n"
inputs = tokenizer.tokenizer(formatted, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.tokenizer.decode(outputs[0], skip_special_tokens=True))
π‘ Example Prompts
| Topic | Example Prompt |
|---|---|
| Person-centred care | "What are the key principles of person-centred nursing?" |
| Practice development | "How does practice development improve patient outcomes?" |
| Relational care | "Explain the importance of relational care in healthcare." |
| Critical creativity | "What is critical creativity in nursing practice?" |
| Emancipatory practice | "How can nurses develop emancipatory practice?" |
π Training Details
| Parameter | Value |
|---|---|
| Base Model | google/medgemma-4b-it |
| Training Framework | Unsloth |
| LoRA Rank | 16 |
| LoRA Alpha | 16 |
| Learning Rate | 2e-4 |
| Epochs | 1 |
| Batch Size | 2 (Γ4 gradient accumulation) |
| Max Sequence Length | 2048 |
| Precision | 4-bit quantization |
| Optimizer | AdamW 8-bit |
Target Modules
q_proj,k_proj,v_proj,o_projgate_proj,up_proj,down_proj
π Intended Use
This model is designed for:
β
Educational purposes - Learning about person-centred care
β
Research - Exploring AI applications in nursing practice development
β
Practice reflection - Supporting nurses in reflective practice
β
Knowledge exploration - Understanding IPDJ and FONS frameworks
Limitations
β οΈ Not for clinical decision-making - This is a research prototype
β οΈ Requires validation - Outputs should be verified by qualified professionals
β οΈ May hallucinate - Like all LLMs, may generate plausible but incorrect information
π€ Acknowledgments
- Foundation of Nursing Studies (FoNS) - For championing person-centred practice development
- International Practice Development Journal (IPDJ) - Source of practice development knowledge
- Google - For MedGemma base model
- Unsloth - For efficient fine-tuning framework
π¨ββοΈ About the Developer
Lincoln Gombedza - Nurse Citizen Developer
This project demonstrates how nurses can leverage AI and open-source tools to advance person-centred care. Built with the philosophy that technology should serve relational practice, not replace it.
π Related Resources
- Foundation of Nursing Studies
- International Practice Development Journal
- Unsloth Documentation
- MedGemma Model Card
π License
This model is licensed under Creative Commons Attribution-NonCommercial 3.0 (CC BY-NC 3.0).
You are free to:
- Share β copy and redistribute the material
- Adapt β remix, transform, and build upon the material
Under the following terms:
- Attribution β Credit must be given to the creator
- NonCommercial β Not for commercial purposes
Note: Please also comply with MedGemma's terms of use for the base model.
"Democratising nursing work for the common good through technology that speaks nursing's language."
- Downloads last month
- -