Downloads · 30 days
5
2% of all-time downloads
alvinwongster/LuminAI
LuminAI is a machine learning model from alvinwongster. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
5
2% of all-time downloads
All-time downloads
272
Public
Parameters
362M
1.5 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors1.4 GB · 99%
From the Hugging Face model README

Lumin.AI is a supportive AI assistant designed to provide immediate emotional support to individuals outside of regular consulting hours. It acts as a supplementary tool for patients and therapists, ensuring that mental health care is more accessible and responsive to users' needs

The chatbot has been trained using conversational data, which is supposed to mimick the patient and the therapist. 5 topics where chosen, and 100 conversations from each of these topics were gathered:
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("alvinwongster/LuminAI")
model = AutoModelForCausalLM.from_pretrained("alvinwongster/LuminAI")
prompt = "What is depression?"
full_prompt = f"User: {prompt}\nBot:"
inputs = tokenizer(full_prompt, return_tensors="pt")
inputs = {key: val.to(device) for key, val in inputs.items()}
outputs = model.generate(
**inputs,
max_new_tokens=650,
repetition_penalty=1.3,
no_repeat_ngram_size=3,
temperature=0.8,
top_p=0.9,
top_k=50
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
if "Bot:" in response:
response = response.split("Bot:")[-1].strip()
print(response)
To evaluate the chatbot's performance based on our use case, the following weighted metrics system was used:
| Metrics | GPT | Llama | LuminAI |
|---|---|---|---|
| Empathy Score | 0.8 | 0.79 | 0.79 |
| Human Likeness | 0.27 | 0.45 | 0.5 |
| BERTScore F1 | 0.45 | 0.48 | 0.51 |
| BERTScore Recall | 0.51 | 0.53 | 0.55 |
| BERTScore Precision | 0.41 | 0.44 | 0.47 |
| Time Taken | 89.65 | 15.85 | 39.42 |
| Total Score | 0.54 | 0.65 | 0.63 |
Visit here for more information on how I trained the model
Try the product here!