serhanayberkkilic/qwen3-14b-physiotherapy-lora
Qwen3-14B Physiotherapy Evidence-Based QA (LoRA)
<div align="center">
🏥 A bilingual (English/Turkish) Large Language Model fine-tuned for evidence-based physiotherapy and clinical rehabilitation Q&A
  
</div>
📋 Model Overview
This model is a LoRA (Low-Rank Adaptation) fine-tuned version of Qwen3-14B, specifically trained on evidence-based physiotherapy literature. It provides accurate, clinically-relevant answers for physiotherapy and rehabilitation questions in both English and Turkish.
Key Features
🎯 Intended Use Cases
- Clinical Decision Support: Evidence-based treatment recommendations
- Patient Education: Generating educational content about conditions and treatments
- Research Assistance: Literature review and knowledge synthesis
- Medical Training: Educational tool for physiotherapy students
- Healthcare Applications: Integration into clinical systems and chatbots
📊 Model Specifications
📁 Training Data
This model was trained on the [Physiotherapy Evidence QA Dataset](https://huggingface.co/datasets/serhanayberkkilic/physiotherapy-evidence-qa):
Dataset Topics Include:
- Musculoskeletal conditions (back pain, joint disorders, etc.)
- Neurological rehabilitation
- Sports injuries and rehabilitation
- Post-surgical rehabilitation
- Outcome measures and assessment tools (PRTEE, ODI, etc.)
- Therapeutic exercises and interventions
- Manual therapy techniques
🚀 Quick Start
Installation
pip install transformers peft accelerate bitsandbytes torchInference Code
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
from peft import PeftModel
# Configuration
base_model_name = "unsloth/qwen3-14b-unsloth-bnb-4bit"
lora_adapter = "serhanayberkkilic/qwen3-14b-physiotherapy-lora"
# 4-bit quantization
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16,
bnb_4bit_use_double_quant=True,
)
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained(lora_adapter, trust_remote_code=True)
# Load base model
base_model = AutoModelForCausalLM.from_pretrained(
base_model_name,
quantization_config=bnb_config,
device_map="auto",
trust_remote_code=True,
)
# Load LoRA adapter
model = PeftModel.from_pretrained(base_model, lora_adapter)
model.eval()
# Generate response
def generate(question: str, max_tokens: int = 512):
messages = [{"role": "user", "content": question}]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=max_tokens,
temperature=0.7,
top_p=0.9,
do_sample=True,
)
response = tokenizer.decode(outputs[0][inputs['input_ids'].shape[1]:], skip_special_tokens=True)
return response
# Example usage
question = "What are the evidence-based treatments for chronic low back pain?"
answer = generate(question)
print(answer)💡 Example Outputs
English Example
Question: What is the PRTEE questionnaire and how is it used?
Answer: The Patient-Rated Tennis Elbow Evaluation (PRTEE) is a validated outcome measure designed to assess pain and functional disability in patients with lateral epicondylitis. It consists of 15 items divided into two subscales: pain (5 items) and function (10 items). The function subscale is further divided into specific and usual activities. Scores range from 0-100, with higher scores indicating greater pain and disability. The PRTEE has demonstrated excellent reliability (ICC > 0.90) and validity for measuring treatment outcomes in lateral epicondylitis...
Turkish Example
Soru: Bel ağrısı için kanıta dayalı fizyoterapi tedavi önerileri nelerdir?
Yanıt: Bel ağrısı tedavisinde kanıta dayalı fizyoterapi yaklaşımları arasında egzersiz terapisi, manuel terapi, hasta eğitimi ve davranışsal yaklaşımlar yer almaktadır. Egzersiz terapisi en güçlü kanıt düzeyine sahip olup, core stabilizasyon egzersizleri, genel kondisyon egzersizleri ve spesifik gövde güçlendirme programları önerilmektedir...
⚙️ Hardware Requirements
⚠️ Limitations & Disclaimers
Limitations
- Not a replacement for clinical judgment: This model should be used as a supportive tool only
- Training data cutoff: Knowledge is limited to the training dataset
- May generate inaccurate information: Always verify with primary sources
- Language quality: Turkish responses may occasionally include English terms
Ethical Considerations
- This model is intended for educational and research purposes
- Should not be used for direct patient diagnosis or treatment without professional oversight
- Users should be aware of potential biases in medical literature
📈 Training Details
Training Configuration
Training Infrastructure
- Hardware: NVIDIA GPU (RTX 4090 / A100)
- Framework: Unsloth + HuggingFace TRL + PEFT
- Precision: 4-bit quantization (NF4)
📝 Citation
If you use this model in your research, please cite:
@misc{kilic2024physiolora,
author = {Kilic, Serhan Ayberk},
title = {Qwen3-14B Physiotherapy Evidence-Based QA LoRA},
year = {2024},
publisher = {HuggingFace},
url = {https://huggingface.co/serhanayberkkilic/qwen3-14b-physiotherapy-lora}
}👤 Author
Serhan Ayberk Kılıç
- 🤗 HuggingFace: @serhanayberkkilic
- 📧 Contact: For research collaborations and inquiries
📄 License
This model is released under the Apache 2.0 License. See LICENSE for more details.
🙏 Acknowledgments
- Qwen Team for the excellent Qwen3 base model
- Unsloth for optimized training framework
- HuggingFace for the transformers ecosystem
- The physiotherapy research community for evidence-based literature
Framework Versions
- PEFT: 0.18.1
- Transformers: 4.45.0+
- PyTorch: 2.0+
- Unsloth: Latest
