Downloads · 30 days
24
32% of all-time downloads
chenhaodev/qwen3-8b-clinpsych-lora
qwen3-8b-clinpsych-lora is a text generation model from chenhaodev. 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.
基于 Qwen/Qwen3-8B 通过 LoRA SFT 微调的小模型,将英文临床心理学教材《Clinical Psychology: Science, Practice, and Diversity》(Andrew M. Pomerantz) 的知识蒸馏为中文问答能力,并额外训练了"从日常对话中识别隐含心理困扰并温和开导"的功能(例如老人说"不用做太多饭,反正我也没啥用了" → 识别出背后可能的无价值感/孤独/抑郁信号并共情引导)。
Downloads · 30 days
24
32% of all-time downloads
All-time downloads
75
Public
Repo size
186 MB
Likes
0
Public
Click a slice to open those files.
.safetensors175 MB · 94%
From the Hugging Face model README
基于 Qwen/Qwen3-8B 通过 LoRA SFT 微调的小模型,将英文临床心理学教材《Clinical Psychology: Science, Practice, and Diversity》(Andrew M. Pomerantz) 的知识蒸馏为中文问答能力,并额外训练了**"从日常对话中识别隐含心理困扰并温和开导"**的功能(例如老人说"不用做太多饭,反正我也没啥用了" → 识别出背后可能的无价值感/孤独/抑郁信号并共情引导)。
use_rslora=Truefrom unsloth import FastLanguageModel
import torch
model, tokenizer = FastLanguageModel.from_pretrained("Qwen/Qwen3-8B", max_seq_length=1536, load_in_4bit=True)
model.load_adapter("checkpoints/qwen3-8b-clinpsych-final/final")
text = tokenizer.apply_chat_template(
[{"role":"user","content":"帮助我开导一下这个人。他/她说:“不用做太多饭,反正我也没啥用了”"}],
tokenize=False, add_generation_prompt=True, enable_thinking=False)
enc = tokenizer(text, return_tensors="pt").to("cuda")
out = model.generate(enc.input_ids, attention_mask=enc.attention_mask, max_new_tokens=200)
print(tokenizer.decode(out[0][enc.input_ids.shape[1]:], skip_special_tokens=True))
随仓库提供 output/rag/(FAISS index.faiss + docs.json + meta.json,检索模型 BAAI/bge-small-zh-v1.5,703 条文档:667 章节 chunk + 36 难言之隐场景)。
见本仓库 scripts/:提取(extract_pdf.py)、分块(make_chunks.py)、QA 蒸馏(gen_qa.py)、难言之隐(gen_readbetween.py)、数据集(prep_train_final.py)、训练(train_lora_final.py)、RAG(build_rag.py/search_rag.py)、推理(infer_readbetween.py)。
无留出集评测,训练 loss 不代表效果。