Downloads · 30 days
14
16% of all-time downloads
ysn-ir/mistral-medical-chat-lora-v2
mistral-medical-chat-lora-v2 is a text generation model from ysn-ir. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
A medical conversation assistant LoRA fine-tuned to provide safe, calm, and structured responses to patient health questions, while avoiding diagnosis, prescriptions, and high-risk medical claims.
Downloads · 30 days
14
16% of all-time downloads
All-time downloads
90
Public
Repo size
168 MB
Likes
0
Public
Click a slice to open those files.
.safetensors168 MB · 98%
From the Hugging Face model README
A medical conversation assistant LoRA fine-tuned to provide safe, calm, and structured responses to patient health questions, while avoiding diagnosis, prescriptions, and high-risk medical claims.
This version focuses on patient-style interactions, improving upon general medical Q&A by handling conversational cues, clarifying questions, and safety-oriented guidance.
It responds to medical questions with:
mistralai/Mistral-7B-Instruct-v0.2This model does not perform diagnosis and does not provide medication dosing.
| Use Case | Allowed | Notes |
|---|---|---|
| General health questions | ✅ | Calm, structured guidance |
| Explaining symptoms conceptually | ✅ | High-level guidance, no diagnosis |
| First-aid general instructions | ✅ | Only general safety advice |
| Patient support conversation | ✅ | Reassuring and clarifying |
| Medical education support | ✅ | Suitable for study / learning |
| Diagnosing medical conditions | ❌ | Must avoid guessing |
| Prescribing medications | ❌ | High-risk → blocked behavior |
| Emergency care instructions | ❌ | Always refer to real professionals |
The model is trained to:
This aligns the model with safe conversational medical use.
| Dataset | Size | Purpose |
|---|---|---|
mahfoos/Patient-Doctor-Conversation (filtered) | ~3k examples | Base conversational patterns |
| Custom Gold Conversations | ~80 examples | Style & safe tone fine-tuning |
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = "mistralai/Mistral-7B-Instruct-v0.2"
adapter = "ysn-ir/mistral-medical-chat-lora-v2"
tokenizer = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(base, device_map="auto")
model = PeftModel.from_pretrained(model, adapter)
prompt = "Patient: I have chest tightness and shortness of breath.\nDoctor:"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
If the user reports:
→ The model must advise immediate medical attention.
Hugging Face: https://huggingface.co/ysn-ir Maintained by: ysn-ir
Released under Apache-2.0. Permitted for:
Not permitted for clinical decision-making.
This v2 model:
v1 builds on this with education-focused Q&A rather than patient conversation.
Use responsibly.