Downloads · 30 days
14
14% of all-time downloads
Imsachinsingh00/Fine_tuned_LoRA_Mistral_MTSDialog_Summarization
Fine_tuned_LoRA_Mistral_MTSDialog_Summarization is a summarization model from Imsachinsingh00. Use it when you need a shorter version of a longer text. It is set up for peft. The card lists the license as apache-2.0.
This repository contains a LoRA fine-tuned version of mistralai/Mistral-7B-v0.1 for medical dialogue summarization, trained on the MTS-Dialog dataset.
Downloads · 30 days
14
14% of all-time downloads
All-time downloads
103
Public
Repo size
1.1 GB
Likes
1
Public
Click a slice to open those files.
.safetensors1.6 GB · 96%
From the Hugging Face model README
This repository contains a LoRA fine-tuned version of mistralai/Mistral-7B-v0.1 for medical dialogue summarization, trained on the MTS-Dialog dataset.
mistralai/Mistral-7B-v0.1This model is trained to summarize doctor-patient conversations into concise clinical notes, categorized by sections such as GENHX, HPI, ROS, etc. These summaries assist with EHR documentation and clinical decision-making.
| Parameter | Value |
|---|---|
| LoRA Rank | 4 |
| Epochs | 3 |
| Batch Size | 4 (×4 grad. acc.) |
| Learning Rate | 3e-4 |
| Device | CUDA:0 |
| Quantization | 4-bit (bnb) |
⚠️ Due to limited GPU resources (office laptop), training was constrained to 3 epochs and a small LoRA rank. Performance is expected to improve significantly with extended training and better hardware.
| Metric | Score |
|---|---|
| ROUGE-1 | 0.1318 |
| ROUGE-2 | 0.0456 |
| ROUGE-L | 0.0900 |
| BLEU | 0.0260 |
Summarize the following dialogue for section: GENHX
Doctor: What brings you back into the clinic today, miss?
Patient: I've had chest pain for the last few days.
Doctor: When did it start?
Summary:
## 🧪 Inference Code
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-v0.1", load_in_4bit=True)
model = PeftModel.from_pretrained(model, "Imsachinsingh00/Fine_tuned_LoRA_Mistral_MTSDialog_Summarization")
model.eval()
tokenizer = AutoTokenizer.from_pretrained("Imsachinsingh00/Fine_tuned_LoRA_Mistral_MTSDialog_Summarization")
prompt = "Summarize the following dialogue for section: HPI\nDoctor: Hello, what brings you in?\nPatient: I've been dizzy for two days.\nSummary:"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=150)
print(tokenizer.decode(output[0], skip_special_tokens=True))
## 📁 Included Files
- `config.json` – PEFT configuration for LoRA
- `adapter_model.bin` – LoRA adapter weights
- `tokenizer/` – Tokenizer files
- `README.md` – This model card
## 📌 Notes
- 🚫 This is not a fully optimized clinical model — only a proof of concept.
- 💡 Consider training longer (`epochs=10`, `rank=8`) on GPUs with higher VRAM for better results.