Downloads · 30 days
0
ecorbari/Gemma-2b-it-Psych
Gemma-2b-it-Psych is a text generation model from ecorbari. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
Gemma-2b-it-Psych is a domain-adapted version of google/gemma-2b-it, fine-tuned using LoRA on an instruction-based psychology dataset. The model is optimized to generate empathetic, supportive, and professionally alig…
Downloads · 30 days
0
Access
Public
Updated Feb 1, 2026
Repo size
39.3 MB
Likes
0
Public
Click a slice to open those files.
.safetensors39.3 MB · 100%
From the Hugging Face model README
Gemma-2b-it-Psych is a domain-adapted version of google/gemma-2b-it, fine-tuned using LoRA on an instruction-based psychology dataset.
The model is optimized to generate empathetic, supportive, and professionally aligned psychological responses, primarily for educational and research purposes.
This repository contains LoRA adapters only. The base model must be loaded separately.
google/gemma-2b-it)google/gemma-2b-itThis model was fine-tuned using instruction–response pairs focused on psychological support.
Only empathetic and therapeutically appropriate responses were retained during training, while judgmental or aggressive alternatives were excluded.
This model is intended for:
The model requires the base Gemma-2B weights to be loaded together with the LoRA adapters.
Users should apply human oversight, especially in sensitive scenarios.
This model is best suited for research, learning, and proof-of-concept applications.
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
base_model = "google/gemma-2b-it"
adapter_model = "ecorbari/Gemma-2b-it-Psych"
tokenizer = AutoTokenizer.from_pretrained(base_model)
model = AutoModelForCausalLM.from_pretrained(
base_model, dtype=torch.float16, device_map="auto"
)
model = PeftModel.from_pretrained(model, adapter_model)
prompt = "How can I cope with anxiety during stressful situations?"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=150)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
The model was evaluated on a held-out validation split of the psychology instruction dataset used during fine-tuning.
The following metrics were used to evaluate the model during training:
| Metric | Value (approx.) |
|---|---|
| Eval Loss | 0.60 – 0.70 |
| Perplexity | 1.8 – 2.0 |
Perplexity was computed as the exponential of the evaluation loss. Lower values indicate higher confidence in next-token prediction.
These metrics reflect convergence and generalization within the target domain, but do not directly assess clinical correctness or psychological safety.