Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- README.md +72 -0
- mentallama-chat-7b.Q4_0.gguf +3 -0
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
mentallama-chat-7b.Q4_0.gguf filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
metrics:
|
6 |
+
- f1
|
7 |
+
tags:
|
8 |
+
- medical
|
9 |
+
---
|
10 |
+
|
11 |
+
# Introduction
|
12 |
+
|
13 |
+
MentaLLaMA-chat-7B is part of the [MentaLLaMA](https://github.com/SteveKGYang/MentalLLaMA) project, the first open-source large language model (LLM) series for
|
14 |
+
interpretable mental health analysis with instruction-following capability. This model is finetuned based on the Meta LLaMA2-chat-7B foundation model and the full IMHI instruction tuning data.
|
15 |
+
The model is expected to make complex mental health analysis for various mental health conditions and give reliable explanations for each of its predictions.
|
16 |
+
It is fine-tuned on the IMHI dataset with 75K high-quality natural language instructions to boost its performance in downstream tasks.
|
17 |
+
We perform a comprehensive evaluation on the IMHI benchmark with 20K test samples. The result shows that MentalLLaMA approaches state-of-the-art discriminative
|
18 |
+
methods in correctness and generates high-quality explanations.
|
19 |
+
|
20 |
+
# Ethical Consideration
|
21 |
+
|
22 |
+
Although experiments on MentaLLaMA show promising performance on interpretable mental health analysis, we stress that
|
23 |
+
all predicted results and generated explanations should only used
|
24 |
+
for non-clinical research, and the help-seeker should get assistance
|
25 |
+
from professional psychiatrists or clinical practitioners. In addition,
|
26 |
+
recent studies have indicated LLMs may introduce some potential
|
27 |
+
bias, such as gender gaps. Meanwhile, some incorrect prediction results, inappropriate explanations, and over-generalization
|
28 |
+
also illustrate the potential risks of current LLMs. Therefore, there
|
29 |
+
are still many challenges in applying the model to real-scenario
|
30 |
+
mental health monitoring systems.
|
31 |
+
|
32 |
+
## Other Models in MentaLLaMA
|
33 |
+
|
34 |
+
In addition to MentaLLaMA-chat-7B, the MentaLLaMA project includes another model: MentaLLaMA-chat-13B, MentalBART, MentalT5.
|
35 |
+
|
36 |
+
- **MentaLLaMA-chat-13B**: This model is finetuned based on the Meta LLaMA2-chat-13B foundation model and the full IMHI instruction tuning data. The training data covers 10 mental health analysis tasks.
|
37 |
+
|
38 |
+
- **MentalBART**: This model is finetuned based on the BART-large foundation model and the full IMHI-completion data. The training data covers 10 mental health analysis tasks. This model doesn't have instruction-following ability but is more lightweight and performs well in interpretable mental health analysis in a completion-based manner.
|
39 |
+
|
40 |
+
- **MentalT5**: This model is finetuned based on the T5-large foundation model and the full IMHI-completion data. The training data covers 10 mental health analysis tasks. This model doesn't have instruction-following ability but is more lightweight and performs well in interpretable mental health analysis in a completion-based manner.
|
41 |
+
|
42 |
+
## Usage
|
43 |
+
|
44 |
+
You can use the MentaLLaMA-chat-7B model in your Python project with the Hugging Face Transformers library. Here is a simple example of how to load the model:
|
45 |
+
|
46 |
+
```python
|
47 |
+
from transformers import LlamaTokenizer, LlamaForCausalLM
|
48 |
+
tokenizer = LlamaTokenizer.from_pretrained('klyang/MentaLLaMA-chat-7B')
|
49 |
+
model = LlamaForCausalLM.from_pretrained('klyang/MentaLLaMA-chat-7B', device_map='auto')
|
50 |
+
```
|
51 |
+
|
52 |
+
In this example, LlamaTokenizer is used to load the tokenizer, and LlamaForCausalLM is used to load the model. The `device_map='auto'` argument is used to automatically
|
53 |
+
use the GPU if it's available.
|
54 |
+
|
55 |
+
## License
|
56 |
+
|
57 |
+
MentaLLaMA-chat-7B is licensed under MIT. For more details, please see the MIT file.
|
58 |
+
|
59 |
+
## Citation
|
60 |
+
|
61 |
+
If you use MentaLLaMA-chat-7B in your work, please cite the our paper:
|
62 |
+
|
63 |
+
```bibtex
|
64 |
+
@misc{yang2023mentalllama,
|
65 |
+
title={MentalLLaMA: Interpretable Mental Health Analysis on Social Media with Large Language Models},
|
66 |
+
author={Kailai Yang and Tianlin Zhang and Ziyan Kuang and Qianqian Xie and Sophia Ananiadou},
|
67 |
+
year={2023},
|
68 |
+
eprint={2309.13567},
|
69 |
+
archivePrefix={arXiv},
|
70 |
+
primaryClass={cs.CL}
|
71 |
+
}
|
72 |
+
```
|
mentallama-chat-7b.Q4_0.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1299c2f921557705d9b24258710cbd6c83e8c1753cb208af021288a66b28b124
|
3 |
+
size 3825807456
|