Mistral-7B Blood Pressure Medical Assistant

Model Description

This is a fine-tuned version of Mistral-7B-Instruct-v0.3 specialized for blood pressure assessment and medical consultation. The model acts as an intelligent medical assistant that:

  • βœ… Analyzes blood pressure readings
  • βœ… Asks relevant follow-up questions based on BP levels
  • βœ… Provides personalized medical guidance
  • βœ… Handles various scenarios (with/without patient context)
  • βœ… Never hallucinates information - only responds to what the patient shares
  • βœ… Recognizes emergency situations (hypertensive crisis)

Model Type

LoRA Adapter

Training Details

  • Base Model: mistralai/Mistral-7B-Instruct-v0.3
  • Dataset: TesterColab/MIMICDB (880 clinical examples)
  • Training Method: LoRA (Low-Rank Adaptation)
  • Training Scenarios:
    1. BP reading only (model asks questions)
    2. BP with patient context (model uses provided information)
    3. Speech-to-text variations

Usage

Installation

pip install transformers torch peft accelerate

Basic Usage

from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel

# Load model
model_id = "TesterColab/mistral-finetuned-v3"
base_model_id = "mistralai/Mistral-7B-Instruct-v0.3"

tokenizer = AutoTokenizer.from_pretrained(model_id)
base_model = AutoModelForCausalLM.from_pretrained(base_model_id, device_map='auto', torch_dtype=torch.float16)
model = PeftModel.from_pretrained(base_model, model_id)

# Use the model
prompt = """<s>[INST] You are a medical doctor. A patient shares their blood pressure reading. Analyze it and respond appropriately - if abnormal, ask relevant questions; if normal, provide encouragement. Never assume information the patient hasn't told you.

Patient: My blood pressure is 145 over 95 [/INST]

"""

inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=300, temperature=0.7, top_p=0.9)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response.split('[/INST]')[-1].strip())

Example Conversations

Example 1: Normal BP

User: My blood pressure is 115 over 75
Assistant: Your blood pressure reading of 115/75 mmHg is within the normal range - that's great! To maintain this healthy blood pressure, continue with regular exercise, a balanced diet low in sodium, maintain a healthy weight, limit alcohol, and manage stress. Keep monitoring it regularly.

Example 2: High BP - Asks Questions

User: 145 over 95
Assistant: Your blood pressure reading of 145/95 indicates Stage 2 hypertension. To help you properly, I need to understand your health better. Can you tell me: Do you smoke? How often do you exercise? Do you have any family history of heart disease or stroke? Are you currently taking any medications?

Example 3: With Context

User: My BP is 130 over 85 and I smoke
Assistant: Your blood pressure reading of 130/85 shows Stage 1 hypertension, and smoking is a significant risk factor that can worsen this. I need to understand more: How much do you smoke per day? How long have you been smoking? Have you tried to quit before? Also, tell me about your exercise routine and diet.

Intended Use

  • πŸ₯ Health monitoring applications
  • πŸ“± Mobile health assistants
  • πŸ’¬ Conversational health bots
  • 🩺 Telemedicine support tools

Limitations

⚠️ Important Medical Disclaimer:

  • This model is for informational purposes only
  • NOT a replacement for professional medical advice
  • Always consult healthcare professionals for medical decisions
  • In emergencies (chest pain, severe symptoms), seek immediate medical care
  • Model may occasionally generate incorrect medical information

Ethical Considerations

  • Trained to recognize emergency situations
  • Asks appropriate follow-up questions
  • Does not assume or hallucinate patient information
  • Provides general guidance, not diagnoses
  • Encourages seeking professional medical care when appropriate

Training Data

Trained on the MIMICDB dataset containing clinical blood pressure readings with patient context including:

  • Age groups
  • Smoking status
  • Pregnancy status
  • Activity levels
  • Diet information
  • ABP (Arterial Blood Pressure) measurements

Performance

The model has been trained to handle multiple scenarios:

  • βœ… BP readings without context β†’ Asks appropriate questions
  • βœ… BP readings with patient info β†’ Uses provided context
  • βœ… Emergency situations β†’ Recognizes and advises immediate care
  • βœ… Normal readings β†’ Provides encouragement and maintenance tips

Citation

@model{mistral-bp-doctor,
  author = {TesterColab},
  title = {Mistral-7B Blood Pressure Medical Assistant},
  year = {2024},
  publisher = {HuggingFace},
  url = {https://huggingface.co/TesterColab/mistral-finetuned-v3}
}

License

Apache 2.0 (inherits from Mistral-7B-Instruct-v0.3)

Contact

For questions or issues, please open an issue on the model repository.


Built with ❀️ for better health monitoring

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for TesterColab/mistral-finetuned-v3

Finetuned
(339)
this model

Dataset used to train TesterColab/mistral-finetuned-v3