Downloads · 30 days
8
27% of all-time downloads
Joshua0522/qwen25-3b-mental-health-itemgen-lora
qwen25-3b-mental-health-itemgen-lora is a text generation model from Joshua0522. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
This repository contains a LoRA adapter fine-tuned on true/false mental health questionnaire item generation, with a focus on depression and anxiety dimensions.
Downloads · 30 days
8
27% of all-time downloads
All-time downloads
30
Public
Repo size
371 MB
Likes
0
Public
Click a slice to open those files.
.pt240 MB · 47%
From the Hugging Face model README
This repository contains a LoRA adapter fine-tuned on true/false mental health questionnaire item generation, with a focus on depression and anxiety dimensions.
⚠️ This repository only contains LoRA adapter weights.
You must load it together with the base model:
Qwen/Qwen2.5-3B-Instruct.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen2.5-3B-Instruct",
device_map="auto",
torch_dtype="auto",
trust_remote_code=True
)
model = PeftModel.from_pretrained(
base_model,
"Joshua0522/qwen25-3b-mental-health-itemgen-lora"
)
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-3B-Instruct")
prompt = """
Generate exactly 5 true/false depression questionnaire items.
"""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))