Downloads · 30 days
16
5% of all-time downloads
cyril21/breakfree-dialo-lora
breakfree-dialo-lora is a text generation model from cyril21. Use it when you need the model to write or continue text. It is set up for peft.
This repository contains LoRA adapter weights fine-tuned on rehabilitation and mental health support dialogues. It is intended to be used with the base model microsoft/DialoGPT-medium.
Downloads · 30 days
16
5% of all-time downloads
All-time downloads
293
Public
Repo size
8.7 MB
Likes
0
Public
Click a slice to open those files.
.safetensors8.7 MB · 100%
From the Hugging Face model README
This repository contains LoRA adapter weights fine-tuned on rehabilitation and mental health support dialogues. It is intended to be used with the base model microsoft/DialoGPT-medium.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_id = "microsoft/DialoGPT-medium"
adapter_id = "cyril21/breakfree-dialo-lora"
tokenizer = AutoTokenizer.from_pretrained(base_id)
if tokenizer.pad_token is None:
tokenizer.pad_token = tokenizer.eos_token
base_model = AutoModelForCausalLM.from_pretrained(base_id)
model = PeftModel.from_pretrained(base_model, adapter_id)
model.eval()
prompt = "User: Hello\nAssistant:"
inputs = tokenizer(prompt, return_tensors="pt")
with torch.no_grad():
output = model.generate(
**inputs,
max_new_tokens=80,
do_sample=True,
top_p=0.9,
temperature=0.8,
pad_token_id=tokenizer.eos_token_id,
)
print(tokenizer.decode(output[0], skip_special_tokens=True))
Fine-tuned on a local rehabilitation dialogue dataset. A public dataset repo is provided separately.
This model is intended for supportive, non-clinical conversation. It is not a substitute for professional medical or mental health advice.
[More Information Needed]