Lab2 / README.md
oskaralf's picture
updated readme
6d19dc0

A newer version of the Gradio SDK is available: 5.43.1

Upgrade
metadata
title: Lab2
emoji: 🐨
colorFrom: yellow
colorTo: green
sdk: gradio
sdk_version: 5.7.1
app_file: app.py
pinned: false

In this lab, different LLM's were finetuned through Google Colab. We mainly explored Llama-1B-Instruct, through different datasets, aiming to finetune the model into acting as a psychologist. We tried TinyLlama, and Llama-3B-instruct as well, but the 3B version was slighlty too big for us to properly make a functioning model.

Ground models evaluated:

TinyLlama - smaller, faster, with around 1B parameters - not so good for sophisticated answers

Llama3.2 _1B_Instruct

Llama3.2 _3B_Instruct

Data sets used (from Huggingface)

- mlabonne/FineTome-100k
- wassimm/PsycologyDataset
- samhog/psychology-10k

Evaluation method

Evaluating how well the Fine tuned model works as a psychology assistant evaluating simply on different fine-tuned models how the same phrase performs on different fine-tuned models

Models:

oskaralf/tiny_merged

TinyLlama (4bit) - Fine-tuned on FineTome-100k

Llama3.2_1B_4bit

Llama 3.2-1B-Instruct (4bit)

- Fine-tuned on FineTome-100k

Llama1B_psych_v2_merged

- Llama 3.2-1B-Instruct (4bit)
- Fine-tuned on samhog/psychology10K
- Lora r=8

Llama1B_psych_v3_merged

- Llama 3.2-1B-Instruct (4bit)
- Fine-tuned on samhog/psychology10K
- Lora r=16
- warm up steps: 10% of total steps
- learning rate 2x v2 model
- 4 epochs

To improve:

Model centric approach

- change r=16 to higher dimension, for more complex LORA matrices, capturing more complex patterns
- Using bigger model
- Training more epochs
- limited due to RAM and time constraint
- Change learning rate

Comparison between different responses on a question:

“I have anxiety, what can I do?”

Llama1B_psych_v3_merged

​​Here are some tips that I find helpful:

  • Practice relaxation techniques, such as deep breathing, progressive muscle relaxation, and mindfulness meditation.
  • Engage in physical activity, such as walking, running, or yoga, to release tension and improve mood.
  • Seek social support from friends, family, or a therapist.
  • Try to establish a daily routine and stick to it, even on days when I feel anxious.
  • Learn to say "no" to things that trigger my anxiety and prioritize self-care

Llama1B_psych_v2_merged

I don't want to be anxious and I don't want to be stuck in this cycle of anxiety.

Firstly, please know that you're not alone. Many people struggle with anxiety, and it's not something to be ashamed of. You are doing the best you can, and that's something to be proud of.

Now, let's get to some practical tips to help you manage your anxiety:

  1. Practice self-compassion: Be kind to yourself. Acknowledge that it's

TinyMerged

I have been diagnosed with anxiety and depression. I have been taking medication for anxiety and depression for 2 years. I have been on medication for anxiety and depression for 2 years. I have been on medication for anxiety and depression for 2. I have been on medication for anxiety and depression for 2. I have been on medication for anxiety and depression for2. I have been medication anxiety

Llama1B_4bit

  1. Deep breathing exercises: I practice deep breathing exercises to calm my mind and body. I inhale deeply through my nose, hold it for a second, and exhale slowly through my mouth.
  2. Exercise: I try to exercise regularly to release endorphins that help me feel better. I start with small, manageable workouts and gradually increase the intensity and duration.
  3. Mindfulness: I practice mindfulness meditation to focus on the present moment