Instructions to use SoulInPsyAbstract/qwen25-7b-exp045-decomposition-classifier-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use SoulInPsyAbstract/qwen25-7b-exp045-decomposition-classifier-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-7B-Instruct") model = PeftModel.from_pretrained(base_model, "SoulInPsyAbstract/qwen25-7b-exp045-decomposition-classifier-lora") - Transformers
How to use SoulInPsyAbstract/qwen25-7b-exp045-decomposition-classifier-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SoulInPsyAbstract/qwen25-7b-exp045-decomposition-classifier-lora") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("SoulInPsyAbstract/qwen25-7b-exp045-decomposition-classifier-lora", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use SoulInPsyAbstract/qwen25-7b-exp045-decomposition-classifier-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SoulInPsyAbstract/qwen25-7b-exp045-decomposition-classifier-lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SoulInPsyAbstract/qwen25-7b-exp045-decomposition-classifier-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SoulInPsyAbstract/qwen25-7b-exp045-decomposition-classifier-lora
- SGLang
How to use SoulInPsyAbstract/qwen25-7b-exp045-decomposition-classifier-lora with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "SoulInPsyAbstract/qwen25-7b-exp045-decomposition-classifier-lora" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SoulInPsyAbstract/qwen25-7b-exp045-decomposition-classifier-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "SoulInPsyAbstract/qwen25-7b-exp045-decomposition-classifier-lora" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SoulInPsyAbstract/qwen25-7b-exp045-decomposition-classifier-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use SoulInPsyAbstract/qwen25-7b-exp045-decomposition-classifier-lora with Docker Model Runner:
docker model run hf.co/SoulInPsyAbstract/qwen25-7b-exp045-decomposition-classifier-lora
decomposition-classifier-qwen25-lora
LoRA adapter for judging a full multi-message conversation sequence as harmful or benign,
instead of scoring each message in isolation. Built as a fix for a real, measured failure mode
in a deployed jailbreak classifier (convaiinnovations/laya): Laya scores a harmful request
correctly when it's asked directly (1.0), but the same request split into 4 innocuous-looking
steps collapses its score to 0.04 -- because it only ever sees one message at a time, with no
memory of the conversation.
What it does
Given a 4-step message sequence (3 innocuous-looking setup questions + 1 combining/harmful
request), classify the whole sequence as BAD or GOOD. Trained on Qwen2.5-7B-Instruct.
Result
The base model, zero-shot, no LoRA at all, already scored 8/8 (100%, TP=4/TN=4/FP=0/FN=0) on a held-out set unanimous across 10 repeated samples per case -- including the exact two goals (lock-picking, meth synthesis) where Laya's per-message scoring failed (0.04 and 0.27 respectively). The LoRA training run itself completed cleanly (2 epochs / 12 steps / 39s) but made no measurable difference, since the base model was already at ceiling on this task before any fine-tuning. The result lives in the architecture choice (score-the-whole-sequence vs. score-each-message-alone), not the fine-tune -- this adapter is shipped as a reproducible artifact of that training run, not because it was necessary for the reported result.
8 held-out cases proves the mechanism, not production-grade accuracy at scale.
Not a drop-in patch for Laya
Laya's own API only ever sees one message. This is a design requirement for whatever system wraps a per-message classifier: accumulate conversation history, re-score the sequence, don't trust each message's isolated score.
Source
Full write-up (EXP-045), raw eval JSON (before/after), and SFT train/eval splits:
sipa-os-governance/AI_EXPERIMENTS/EXP-045__decomposition-classifier-conversation-aware-vs-laya.md
Framework versions
- PEFT 0.21.0
- TRL: 1.14.0
- Transformers: 5.17.0
- Pytorch: 2.14.0
- Datasets: 5.0.1
- Tokenizers: 0.23.2
- Downloads last month
- 47