Downloads · 30 days
7
39% of all-time downloads
TesterColab/Mistral-BP-LLMV5
Mistral-BP-LLMV5 is a machine learning model from TesterColab. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as mit.
Fine-tuned LoRA adapters for blood pressure monitoring and medical advice.
Downloads · 30 days
7
39% of all-time downloads
All-time downloads
18
Public
Repo size
168 MB
Likes
0
Public
Click a slice to open those files.
.safetensors168 MB · 100%
From the Hugging Face model README
Fine-tuned LoRA adapters for blood pressure monitoring and medical advice.
These are LoRA (Low-Rank Adaptation) adapters fine-tuned on top of mistralai/Mistral-7B-Instruct-v0.3 for intelligent blood pressure monitoring tasks.
Base Model: mistralai/Mistral-7B-Instruct-v0.3
Fine-tuning Method: QLoRA (4-bit quantization + LoRA)
LoRA Rank: 16
LoRA Alpha: 32
Target Modules: All attention and MLP layers
Voice Input Parsing: Extract BP readings from natural language
BP Classification: Categorize readings according to AHA guidelines
Medical Advice: Answer questions with reasoning
Trend Analysis: Interpret historical BP patterns
Lifestyle Simulations: Evidence-based projections
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
from peft import PeftModel
import torch
# Load base model with 4-bit quantization
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16,
)
base_model = AutoModelForCausalLM.from_pretrained(
"mistralai/Mistral-7B-Instruct-v0.3",
quantization_config=bnb_config,
device_map="auto",
)
# Load LoRA adapters
model = PeftModel.from_pretrained(
base_model,
"TesterColab/Mistral-BP-LLMV5",
)
tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.3")
from bp_assistant import BPAssistant
# Initialize (will download adapters automatically)
assistant = BPAssistant(
model_path="TesterColab/Mistral-BP-LLMV5",
base_model="mistralai/Mistral-7B-Instruct-v0.3",
)
# Parse voice input
result = assistant.parse_voice_input("My BP is 135 over 88")
print(result)
# {'systolic': 135, 'diastolic': 88, 'extracted': True}
# Quick check
check = assistant.quick_check(135, 88)
print(check['spoken_message'])
# "Your blood pressure is 135 over 88, which is elevated..."
# Get medical advice
advice = assistant.get_medical_advice(
"What should I do about my high blood pressure?",
context="Current BP: 145/92"
)
print(advice)
Dataset: Synthetic doctor-patient conversations generated from MIMIC-BP dataset
Training Configuration:
Hardware: Trained on RTX 4090 / A6000 / A100
The model is trained to:
⚠️ Important: This model is for educational and informational purposes only.
adapter_config.json: LoRA configurationadapter_model.safetensors: LoRA weights (small file, ~100MB)README.md: This file@misc{bp_monitoring_lora,
title={BP Monitoring LLM - LoRA Adapters},
author={Your Name},
year={2024},
publisher={Hugging Face},
url={https://huggingface.co/TesterColab/Mistral-BP-LLMV5}
}
MIT License