Instructions to use nitv/mistral-healthcare-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nitv/mistral-healthcare-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nitv/mistral-healthcare-lora") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nitv/mistral-healthcare-lora") model = AutoModelForCausalLM.from_pretrained("nitv/mistral-healthcare-lora", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nitv/mistral-healthcare-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nitv/mistral-healthcare-lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nitv/mistral-healthcare-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/nitv/mistral-healthcare-lora
- SGLang
How to use nitv/mistral-healthcare-lora with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "nitv/mistral-healthcare-lora" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nitv/mistral-healthcare-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "nitv/mistral-healthcare-lora" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nitv/mistral-healthcare-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use nitv/mistral-healthcare-lora with Docker Model Runner:
docker model run hf.co/nitv/mistral-healthcare-lora
Model Card for mistral-healthcare-lora
This model is a lightweight instruction-tuned language model specialized for rural healthcare decision-support guidance.
It interprets structured patient summaries and generates uncertainty-aware, non-diagnostic, safety-focused medical guidance for assisting rural health workers.
Model Details
Model Description
This model is a LoRA fine-tuned version of Mistral-7B-Instruct, adapted to provide supportive healthcare guidance.
It was trained to:
- Interpret structured patient screening summaries
- Explain AI-generated risk probabilities
- Express uncertainty explicitly
- Encourage clinic or hospital referral when risk is high
- Avoid definitive diagnosis or medication prescription
The model is not a diagnostic system and must not replace licensed medical professionals.
- Developed by: Niteesh K
- Funded by: Independent research project
- Shared by: Niteesh K
- Model type: Decoder-only Transformer (Causal Language Model)
- Language(s): English
- License: Apache 2.0 (inherits base model license)
- Finetuned from model: mistralai/Mistral-7B-Instruct-v0.3
Model Sources
- Repository: https://huggingface.co/nitv/mistral-healthcare-lora
- Paper: Not applicable
- Demo: Not yet available
Uses
Direct Use
This model can be directly used to:
- Generate supportive guidance from structured patient summaries
- Assist rural health workers in preliminary screening interpretation
- Provide uncertainty-aware explanations of AI risk scores
Downstream Use
The model may be integrated into:
- Telehealth triage systems
- Rural healthcare chat assistants
- AI-supported medical referral tools
Out-of-Scope Use
This model must not be used for:
- Medical diagnosis
- Prescribing medications
- Emergency medical decision-making
- Replacing professional medical consultation
Bias, Risks, and Limitations
- The model may generate incorrect or incomplete medical information
- The model does not access real-time medical databases
- Outputs should always be reviewed by qualified healthcare personnel
- Training data is synthetic/curated and may not cover all real-world cases
Recommendations
Users should always:
- Treat model outputs as supportive guidance only
- Inform users that responses are AI-generated
- Escalate high-risk cases to medical professionals
- Avoid using outputs for direct medical decisions
How to Get Started with the Model
from transformers import AutoTokenizer, AutoModelForCausalLM from peft import PeftModel
base_model = AutoModelForCausalLM.from_pretrained( "mistralai/Mistral-7B-Instruct-v0.3" )
model = PeftModel.from_pretrained( base_model, "nitv/mistral-healthcare-lora" )
tokenizer = AutoTokenizer.from_pretrained( "mistralai/Mistral-7B-Instruct-v0.3" )
prompt = "[INST] Patient Summary:\nAge: 55\nSymptoms: fatigue\nTask: Explain results safely. [/INST]"
outputs = model.generate(**tokenizer(prompt, return_tensors="pt")) print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Training Details
Training Data
The model was fine-tuned on ~1,000 instructionโresponse pairs containing:
- Structured patient summaries
- AI screening probability outputs
- Task instructions
- Safe guidance responses
No real patient-identifiable data was used.
Training Procedure
Preprocessing
- Instruction and response fields combined into Mistral chat format
- Tokenized using base model tokenizer
- Loss applied only on assistant response tokens
Training Hyperparameters
- Training regime: bf16 mixed precision
- LoRA rank: 16
- LoRA alpha: 32
- Learning rate: 2e-4
- Batch size: 2
- Gradient accumulation steps: 4
- Epochs: 3
- Optimizer: Paged AdamW 8-bit
- Base model loaded in 4-bit (QLoRA)
Speeds, Sizes, Times
- Trainable parameters: ~8M
- Base model parameters: 7B (frozen)
- Training performed on a single GPU
Evaluation
Testing Data, Factors & Metrics
Testing Data
Held-out synthetic healthcare scenarios not seen during training.
Factors
- Correct uncertainty expression
- Appropriate escalation advice
- Avoidance of diagnosis
- Clarity of response
Metrics
Qualitative human evaluation and rule-based safety checks.
Results
The model consistently:
- Expresses uncertainty
- Avoids definitive diagnosis
- Encourages clinical referral for high-risk cases
Summary
The model performs well as a supportive healthcare guidance assistant under controlled usage.
Model Examination
No formal interpretability study conducted yet.
Environmental Impact
- Hardware Type: Single GPU (A100 class)
- Hours used: ~2 hours
- Cloud Provider: Google Colab / local GPU
- Compute Region: Asia (India)
- Carbon Emitted: Low (LoRA fine-tuning only)
Technical Specifications
Model Architecture and Objective
- Decoder-only Transformer
- Next-token prediction objective
- Instruction fine-tuning using supervised learning
- LoRA adapters on attention projections
Compute Infrastructure
Hardware
- Single GPU (24โ40GB VRAM class)
Software
- transformers
- peft
- trl
- bitsandbytes
- datasets
Citation
BibTeX:
@misc{niteesh2026ruralhealth, title={mistral-healthcare-lora: LoRA fine-tuned Mistral model for rural healthcare guidance}, author={Niteesh K}, year={2026}, publisher={Hugging Face} }
APA:
Niteesh K. (2026). mistral-healthcare-lora: LoRA fine-tuned Mistral model for rural healthcare guidance. Hugging Face.
Glossary
- LoRA: Low-Rank Adaptation method for parameter-efficient fine-tuning
- QLoRA: Quantized LoRA fine-tuning in 4-bit precision
- SFT: Supervised Fine-Tuning
- Causal LM: Next-token prediction model
More Information
For collaborations or questions, please contact via Hugging Face profile.
Model Card Authors
Niteesh K
Model Card Contact
Hugging Face: https://huggingface.co/nitv
- Downloads last month
- 11