mindcare / README.md
Interact-ai's picture
Update README.md
2142051 verified
|
Raw History Blame Contribute Delete
5.21 kB
---
base_model:
- unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit
library_name: peft
pipeline_tag: text-generation
tags:
- mental-health
- conversational
- lora
- peft
- sft
- transformers
- unsloth
license: apache-2.0
language:
- en
---
# MindCare
MindCare is a parameter-efficient LoRA adapter for
[`unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit`](https://huggingface.co/unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit).
It is intended for supportive, empathetic mental-health conversations and
well-being guidance. This repository contains adapter weights, not a complete
standalone base model.
> **Important:** MindCare is not a therapist, doctor, crisis service, or
> diagnostic tool. Do not use it to diagnose conditions, prescribe treatment,
> or make emergency decisions. For immediate danger or a mental-health crisis,
> contact local emergency services or a qualified crisis service.
## Intended use
MindCare can be used as a research or application component for:
- supportive conversational interfaces;
- journaling and reflection prompts;
- general well-being and coping suggestions;
- experimenting with LoRA adapters for Llama 3.1.
Responses should be reviewed by a responsible human before being used in
health-related products. Applications should provide clear escalation paths to
qualified professionals and emergency resources.
## Limitations and risks
- The adapter may produce incorrect, incomplete, insensitive, or overconfident
responses.
- It may reflect biases in the base model and training data.
- It has not been validated for clinical safety or diagnostic accuracy.
- It may fail to recognize every crisis, self-harm signal, cultural context, or
language nuance.
- Do not send private or identifying health information to an untrusted
deployment.
## Quick start
Install the required packages:
```bash
pip install -U transformers peft accelerate bitsandbytes torch
```
Load the base model and adapter:
```python
import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_id = "unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit"
adapter_id = "Interact-ai/mindcare"
tokenizer = AutoTokenizer.from_pretrained(adapter_id)
model = AutoModelForCausalLM.from_pretrained(
base_id,
device_map="auto",
torch_dtype=torch.float16,
)
model = PeftModel.from_pretrained(model, adapter_id)
messages = [
{
"role": "system",
"content": (
"You are a supportive assistant. Be empathetic and clear. "
"Do not diagnose or provide emergency medical advice."
),
},
{
"role": "user",
"content": "I have been feeling overwhelmed lately. Can you help me reflect?",
},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt",
).to(model.device)
with torch.no_grad():
output = model.generate(
inputs,
max_new_tokens=256,
do_sample=True,
temperature=0.7,
top_p=0.9,
)
print(tokenizer.decode(output[0][inputs.shape[-1]:], skip_special_tokens=True))
```
The base model may be gated and may require accepting its license and
authenticating with Hugging Face before loading.
## Technical details
| Property | Value |
|---|---|
| Base model | `unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit` |
| Adapter type | LoRA / PEFT |
| Task | Causal language modeling |
| LoRA rank (`r`) | 16 |
| LoRA alpha | 32 |
| LoRA dropout | 0.05 |
| Target modules | `q_proj`, `k_proj`, `v_proj`, `o_proj`, `gate_proj`, `up_proj`, `down_proj` |
| PEFT version | 0.21.2 |
The adapter is distributed in `safetensors` format. The tokenizer and chat
template are included in this repository.
## Training and evaluation
This release does not include a public training-dataset card, training
hyperparameters, or benchmark results. Do not infer clinical performance from
the model name or from anecdotal outputs. Add reproducible dataset,
provenance, safety-review, and evaluation information before using the adapter
in a production or health-related setting.
## License and attribution
The base model is subject to the license and acceptable-use requirements of
[`unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit`](https://huggingface.co/unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit).
Users must review and comply with the base model's terms as well as any
requirements applicable to their data and deployment. This adapter should not
be presented as an official Meta or Unsloth model.
## Repository contents
- `adapter_model.safetensors` - LoRA adapter weights
- `adapter_config.json` - PEFT adapter configuration
- `tokenizer.json` and `tokenizer_config.json` - tokenizer files
- `chat_template.jinja` - Llama 3.1 chat template
- `README.md` - model card and usage documentation
## Citation
If you use this adapter, cite the repository:
```bibtex
@misc{mindcare_lora,
title = {MindCare: Mental Health LoRA Adapter},
author = {Interact-ai},
year = {2026},
url = {https://huggingface.co/Interact-ai/mindcare}
}
```