AdamLeung/qwen3-0.6b-suicide-risk-lora
014
Qwen3-0.6B · Suicide/Self-harm Risk LoRA
Model Details
Model Description
A LoRA adapter that fine-tunes Qwen3-0.6B to classify the suicide / self-harm risk expressed by the author of a short social-media post into a 5-level ordinal scale (0–4). Internal research artifact for a guardrails study — not a diagnostic or clinical tool.
Given a post, the model outputs a single digit 0–4 following this rubric (the exact prompt used for training and evaluation):
The risk is judged for the author themselves — posts that are about someone else (a friend, a partner, a child) are scored by the author's own distress.
- Model type: Qwen3-0.6B + LoRA adapter, used as an ordinal 5-class classifier
- Language(s): English
- Finetuned from:
Qwen/Qwen3-0.6B - LoRA config:
r=16,alpha=32,dropout=0.05,bias=none, targetsq/k/v/o_proj, gate/up/down_proj - Framework: PEFT 0.18.1
How to Get Started with the Model
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
BASE = "Qwen/Qwen3-0.6B"
ADAPTER = "src/core/sagemaker/results/qwen3-suicide-risk-v1"
SYSTEM_PROMPT = (
"You are a clinical risk assessment assistant. "
"Read the social-media post and classify its suicide/self-harm risk level "
"using this rubric:\n"
"0 = no risk\n"
"1 = negative emotion / distress, but no suicidal or self-harm ideation\n"
"2 = passive death ideation\n"
"3 = active suicidal / self-harm ideation\n"
"4 = has method, plan, attempt, or imminent risk\n"
"Answer with ONLY the single digit (0, 1, 2, 3, or 4)."
)
tok = AutoTokenizer.from_pretrained(ADAPTER, trust_remote_code=True)
base = AutoModelForCausalLM.from_pretrained(BASE, torch_dtype=torch.float32, device_map="auto")
model = PeftModel.from_pretrained(base, ADAPTER).eval()
def predict(text):
prompt = tok.apply_chat_template(
[{"role": "system", "content": SYSTEM_PROMPT},
{"role": "user", "content": f"Post:\n{text}\n\nRisk level:"}],
tokenize=False, add_generation_prompt=True, enable_thinking=False,
)
enc = tok(prompt, return_tensors="pt").to(model.device)
out = model.generate(**enc, max_new_tokens=4, do_sample=False)
return tok.decode(out[0, enc["input_ids"].shape[1]:], skip_special_tokens=True).strip()
print(predict("i just want to sleep and never wake up"))Evaluation
Results
Evaluated on a held-out test set of 875 posts (never seen in training):
Per-class precision / recall:
