DPO LoRA (r16, 2000 steps, beta 0.1) on Qwen3-1.7B.
Base model: Qwen/Qwen3-1.7B. Part of the Counselling SLMs collection.
Psychotherapy-LLM/PsyCoPref).<think> traces despite the no-think header — strip them before scoring; serving passes --reasoning-parser qwen3.from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-1.7B", device_map="auto")
tok = AutoTokenizer.from_pretrained("arnabwithab/ai-therapist-qwen3-1.7b-dpo-lora")
model = PeftModel.from_pretrained(base, "arnabwithab/ai-therapist-qwen3-1.7b-dpo-lora")
msgs = [{"role": "user", "content": "I've been feeling anxious about work and can't sleep."}]
prompt = tok.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True)
inputs = tok(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=1024, temperature=0.7, top_p=0.8)
print(tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
vLLM (how this repo serves it):
vllm serve Qwen/Qwen3-1.7B --enable-lora \
--lora-modules ai-therapist-qwen3-1.7b-dpo-lora=arnabwithab/ai-therapist-qwen3-1.7b-dpo-lora \
--served-model-name ai-therapist-qwen3-1.7b-dpo-lora --reasoning-parser qwen3
Not a therapist — output is not to be treated as verifiable legal advice.
Code + eval harness: https://github.com/arnabwithab/ai-therapist
Qwen/Qwen3-1.7B