gguf endpoints_compatible region:us conversational
---
{}
---
Quantization made by Richard Erkhov.

[Github](https://github.com/RichardErkhov)

[Discord](https://discord.gg/pvy7H8DZMG)

[Request more models](https://github.com/RichardErkhov/quant_request)


gemma-2b-it-finetuned-mental-health-qa - GGUF
- Model creator: https://huggingface.co/GuelGaMesh01/
- Original model: https://huggingface.co/GuelGaMesh01/gemma-2b-it-finetuned-mental-health-qa/


| Name | Quant method | Size |
| ---- | ---- | ---- |
| [gemma-2b-it-finetuned-mental-health-qa.Q2_K.gguf](https://huggingface.co/RichardErkhov/GuelGaMesh01_-_gemma-2b-it-finetuned-mental-health-qa-gguf/blob/main/gemma-2b-it-finetuned-mental-health-qa.Q2_K.gguf) | Q2_K | 1.08GB |
| [gemma-2b-it-finetuned-mental-health-qa.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/GuelGaMesh01_-_gemma-2b-it-finetuned-mental-health-qa-gguf/blob/main/gemma-2b-it-finetuned-mental-health-qa.IQ3_XS.gguf) | IQ3_XS | 1.16GB |
| [gemma-2b-it-finetuned-mental-health-qa.IQ3_S.gguf](https://huggingface.co/RichardErkhov/GuelGaMesh01_-_gemma-2b-it-finetuned-mental-health-qa-gguf/blob/main/gemma-2b-it-finetuned-mental-health-qa.IQ3_S.gguf) | IQ3_S | 1.2GB |
| [gemma-2b-it-finetuned-mental-health-qa.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/GuelGaMesh01_-_gemma-2b-it-finetuned-mental-health-qa-gguf/blob/main/gemma-2b-it-finetuned-mental-health-qa.Q3_K_S.gguf) | Q3_K_S | 1.2GB |
| [gemma-2b-it-finetuned-mental-health-qa.IQ3_M.gguf](https://huggingface.co/RichardErkhov/GuelGaMesh01_-_gemma-2b-it-finetuned-mental-health-qa-gguf/blob/main/gemma-2b-it-finetuned-mental-health-qa.IQ3_M.gguf) | IQ3_M | 1.22GB |
| [gemma-2b-it-finetuned-mental-health-qa.Q3_K.gguf](https://huggingface.co/RichardErkhov/GuelGaMesh01_-_gemma-2b-it-finetuned-mental-health-qa-gguf/blob/main/gemma-2b-it-finetuned-mental-health-qa.Q3_K.gguf) | Q3_K | 1.29GB |
| [gemma-2b-it-finetuned-mental-health-qa.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/GuelGaMesh01_-_gemma-2b-it-finetuned-mental-health-qa-gguf/blob/main/gemma-2b-it-finetuned-mental-health-qa.Q3_K_M.gguf) | Q3_K_M | 1.29GB |
| [gemma-2b-it-finetuned-mental-health-qa.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/GuelGaMesh01_-_gemma-2b-it-finetuned-mental-health-qa-gguf/blob/main/gemma-2b-it-finetuned-mental-health-qa.Q3_K_L.gguf) | Q3_K_L | 1.36GB |
| [gemma-2b-it-finetuned-mental-health-qa.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/GuelGaMesh01_-_gemma-2b-it-finetuned-mental-health-qa-gguf/blob/main/gemma-2b-it-finetuned-mental-health-qa.IQ4_XS.gguf) | IQ4_XS | 1.4GB |
| [gemma-2b-it-finetuned-mental-health-qa.Q4_0.gguf](https://huggingface.co/RichardErkhov/GuelGaMesh01_-_gemma-2b-it-finetuned-mental-health-qa-gguf/blob/main/gemma-2b-it-finetuned-mental-health-qa.Q4_0.gguf) | Q4_0 | 1.44GB |
| [gemma-2b-it-finetuned-mental-health-qa.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/GuelGaMesh01_-_gemma-2b-it-finetuned-mental-health-qa-gguf/blob/main/gemma-2b-it-finetuned-mental-health-qa.IQ4_NL.gguf) | IQ4_NL | 1.45GB |
| [gemma-2b-it-finetuned-mental-health-qa.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/GuelGaMesh01_-_gemma-2b-it-finetuned-mental-health-qa-gguf/blob/main/gemma-2b-it-finetuned-mental-health-qa.Q4_K_S.gguf) | Q4_K_S | 1.45GB |
| [gemma-2b-it-finetuned-mental-health-qa.Q4_K.gguf](https://huggingface.co/RichardErkhov/GuelGaMesh01_-_gemma-2b-it-finetuned-mental-health-qa-gguf/blob/main/gemma-2b-it-finetuned-mental-health-qa.Q4_K.gguf) | Q4_K | 1.52GB |
| [gemma-2b-it-finetuned-mental-health-qa.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/GuelGaMesh01_-_gemma-2b-it-finetuned-mental-health-qa-gguf/blob/main/gemma-2b-it-finetuned-mental-health-qa.Q4_K_M.gguf) | Q4_K_M | 1.52GB |
| [gemma-2b-it-finetuned-mental-health-qa.Q4_1.gguf](https://huggingface.co/RichardErkhov/GuelGaMesh01_-_gemma-2b-it-finetuned-mental-health-qa-gguf/blob/main/gemma-2b-it-finetuned-mental-health-qa.Q4_1.gguf) | Q4_1 | 1.56GB |
| [gemma-2b-it-finetuned-mental-health-qa.Q5_0.gguf](https://huggingface.co/RichardErkhov/GuelGaMesh01_-_gemma-2b-it-finetuned-mental-health-qa-gguf/blob/main/gemma-2b-it-finetuned-mental-health-qa.Q5_0.gguf) | Q5_0 | 1.68GB |
| [gemma-2b-it-finetuned-mental-health-qa.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/GuelGaMesh01_-_gemma-2b-it-finetuned-mental-health-qa-gguf/blob/main/gemma-2b-it-finetuned-mental-health-qa.Q5_K_S.gguf) | Q5_K_S | 1.68GB |
| [gemma-2b-it-finetuned-mental-health-qa.Q5_K.gguf](https://huggingface.co/RichardErkhov/GuelGaMesh01_-_gemma-2b-it-finetuned-mental-health-qa-gguf/blob/main/gemma-2b-it-finetuned-mental-health-qa.Q5_K.gguf) | Q5_K | 1.71GB |
| [gemma-2b-it-finetuned-mental-health-qa.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/GuelGaMesh01_-_gemma-2b-it-finetuned-mental-health-qa-gguf/blob/main/gemma-2b-it-finetuned-mental-health-qa.Q5_K_M.gguf) | Q5_K_M | 1.71GB |
| [gemma-2b-it-finetuned-mental-health-qa.Q5_1.gguf](https://huggingface.co/RichardErkhov/GuelGaMesh01_-_gemma-2b-it-finetuned-mental-health-qa-gguf/blob/main/gemma-2b-it-finetuned-mental-health-qa.Q5_1.gguf) | Q5_1 | 1.79GB |
| [gemma-2b-it-finetuned-mental-health-qa.Q6_K.gguf](https://huggingface.co/RichardErkhov/GuelGaMesh01_-_gemma-2b-it-finetuned-mental-health-qa-gguf/blob/main/gemma-2b-it-finetuned-mental-health-qa.Q6_K.gguf) | Q6_K | 1.92GB |
| [gemma-2b-it-finetuned-mental-health-qa.Q8_0.gguf](https://huggingface.co/RichardErkhov/GuelGaMesh01_-_gemma-2b-it-finetuned-mental-health-qa-gguf/blob/main/gemma-2b-it-finetuned-mental-health-qa.Q8_0.gguf) | Q8_0 | 2.49GB |




Original model description:
---
datasets:
- Amod/mental_health_counseling_conversations
library_name: transformers
license: mit
---

# Model Card Summary

<!-- Provide a quick summary of what the model is/does. -->
This model is a fine-tuned version of gemma-2b-it for mental health counseling conversations. 
It was fine-tuned on the Amod/Mental Health Counseling Conversations dataset, 
which contains dialogues related to mental health counseling.


## Model Details

### Model Description

<!-- Provide a longer summary of what this model is. -->

This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.

- **Developed by:** Miguel Flores
- **Model type:** Causal Language Model (based on transformers)
- **Language(s) (NLP):** English
- **License:** MIT License
- **Finetuned from model gemma-2b-it:** gemma-2b-it, which is a base model fine-tuned for mental health-related queries.


## Use Cases

<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->


### Direct Use

<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
This model is fine-tuned for generating responses related to mental health counseling tasks. 
It can be used for providing suggestions, conversation starters, or follow-ups in mental health scenarios.


### Downstream Use 

<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
This model can be adapted for use in more specific counseling-related tasks, 
or in applications where generating mental health-related dialogue is necessary.


### Out-of-Scope Use

<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
The model is not intended to replace professional counseling. 
It should not be used for real-time crisis management or any situation 
requiring direct human intervention. Use in highly critical or urgent care situations is out of scope.


## Bias, Risks, and Limitations

<!-- This section is meant to convey both technical and sociotechnical limitations. -->

The model was trained on mental health-related dialogues, but it may still generate biased or 
inappropriate responses. Users should exercise caution when interpreting or acting on the model's outputs, 
particularly in sensitive scenarios.

### Recommendations

<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->

The model should not be used as a replacement for professional mental health practitioners.
Users should carefully evaluate generated responses in the context of their use case.

## How to Get Started with the Model

Use the code below to get started with the model.

```python
from transformers import AutoModelForCausalLM, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("GuelGaMesh01/gemma-2b-it-finetuned-mental-health-qa") 
model = AutoModelForCausalLM.from_pretrained("GuelGaMesh01/gemma-2b-it-finetuned-mental-health-qa")
```

### Example inference
```python
inputs = tokenizer("How can I manage anxiety better?", return_tensors="pt") outputs = model.generate(**inputs, max_length=200) response = tokenizer.decode(outputs[0], skip_special_tokens=True) print(response)
```


## Training Details

### Training Data

<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->

The model was trained on the Amod/Mental Health Counseling Conversations dataset, 
which consists of mental health dialogues focused on counseling situations.

### Training Procedure

<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->

The model was fine-tuned using LoRA (Low-Rank Adaptation) with the following hyperparameters:

Batch Size: 1
Gradient Accumulation Steps: 4
Learning Rate: 2e-4
Epochs: 3
Max Sequence Length: 2500 tokens
Optimizer: paged_adamw_8bit


## Evaluation

<!-- This section describes the evaluation protocols and provides the results. -->


#### Testing Data

<!-- This should link to a Dataset Card if possible. -->

The model was evaluated using a split from the training data, 
specifically a 10% test split of the original training dataset.


#### Metrics

<!-- These are the evaluation metrics being used, ideally with a description of why. -->


The following metrics were used during the training and evaluation process:

- **Training Loss**: The training loss was tracked during training to monitor how well the model was learning from the data. It decreased throughout the epochs.
- **Semantic Similarity**: Semantic similarity was employed as the primary metric to assess the model’s ability to generate contextually relevant and meaningful responses. Since the dataset involves conversational context, particularly in the sensitive area of mental health counseling, it was crucial to evaluate how well the model understands and retains the intent and meaning behind the input rather than merely focusing on fluency or token-level prediction.
- **Perplexity**: Perplexity was used as a metric to evaluate the model's ability to generate coherent and fluent text responses. The model was evaluated on a subset of the test data, and both non-finetuned and finetuned perplexities were compared.



