license: apache-2.0
library_name: peft
base_model: wangzhang/Qwen3.5-9B-abliterated
tags:
- decision-model
- lora
- qwen3.5
- uncensored
- distillation
- calibrated-probabilities
- peft
language: - en
pipeline_tag: text-classification
JevStyle-9B-Decision-Uncensored-v1
Independent research project. This release is not affiliated with, endorsed by, or partnered with TypeSafe AI or Jev.
Labels were self-collected via a public API for distillation research; review TypeSafe ToS and your own counsel before any commercial use of distilled weights.
A decision model: given a state, instructions, and a list of options, it returns a calibrated probability distribution over those options in one forward pass — not a long-form chat completion.
| Artifact | Size (approx.) |
|---|---|
LoRA adapter (r=16) |
~112 MB |
| Decision head | ~33 MB |
| Tokenizer files | ~20 MB |
| Deployable delta | ~145–165 MB (vs full 9B base) |
Why this model (advantages)
- Local / private deploy — run offline with the abliterated Qwen3.5-9B base + this small adapter pack; no cloud decision API required at inference.
- Uncensored base — built on
wangzhang/Qwen3.5-9B-abliteratedso refusal behavior is controlled by the trained decision head + your option set, not by opaque chat refusals. - Soft-label KL distillation — trained to match teacher probability distributions, not just argmax labels; preserves ranking and calibrated mass across near-synonym “safe exits”.
- Strong public consistency — 100% hard-argmax agreement on the public holdout split (train-time eval).
- Safety routing that matches product intent — on sensitive items, safe-class agreement (same routing family as teacher) is 92.6% (v4) and up to 98.2% on a later soft-optimized run (v5 e2 contrast); hard argmax alone understates usable routing quality because near-synonym exits compete.
- Tiny adapter footprint — LoRA + head only (~145 MB); base stays frozen and shared across experiments.
- Single-forward decision API — state + options → probabilities; ideal for agents, routers, and policy scaffolds.
Architecture
wangzhang/Qwen3.5-9B-abliterated (frozen base)
+ LoRA r=16, α=32, dropout=0.05
targets: q/k/v/o/gate/up/down_proj
+ DecisionHead (LayerNorm → Linear→GELU→Dropout→Linear → max_options=24)
- Prompt format packs
State,Question(instructions), andOptions(id: label). - The LM last hidden states are mean-pooled (attention mask), then the head emits logits over up to 24 option slots; invalid slots are masked before softmax.
- Adapters are not merged into the base in this release — ship LoRA +
decision_head.ptseparately.
Metrics (v1 = v4 epoch_0)
Holdout evaluation during training (hard = student argmax == teacher argmax):
| Split | Hard hit-rate | n |
|---|---|---|
| Overall | 93.1% | 130 |
| Public | 100% | 49 |
| Sensitive | 88.9% | 81 |
Soft / product-oriented eval on a reconstructed holdout (same seed; see eval_v4_soft_metrics.json):
| Metric | Overall | Sensitive |
|---|---|---|
| Safe-class agreement | 95.4% | 92.6% |
| Top-2 contains teacher | 95.4% | 92.6% |
| Refuse-route (sens) | — | 95.8% |
Contrast: v5 epoch_2 (not this release)
Soft training continued; better safe-class on sensitive (98.2%), lower hard overall (88.7%). Soft metrics track product routing better than hard argmax alone — documented here for transparency; v1 ships v4 e0 for best hard overall.
Full JSON: metrics.json, eval_v4_soft_metrics.json, eval_v5_soft_metrics.json.
Files in this repo
| Path | Role |
|---|---|
adapter_model.safetensors / adapter_config.json |
PEFT LoRA |
decision_head.pt |
Decision head state dict |
model_head.py |
DecisionHead / CausalLMWithDecisionHead reference |
tokenizer.json / tokenizer_config.json / chat_template.jinja |
Tokenizer bundle |
metrics.json + eval JSON |
Reported numbers |
Load & infer (pseudocode)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
from model_head import DecisionHead # from this repo
REPO = "chaoliangUNSW/JevStyle-9B-Decision-Uncensored-v1" # e.g. chaoliangUNSW/...
BASE = "wangzhang/Qwen3.5-9B-abliterated"
tok = AutoTokenizer.from_pretrained(REPO, trust_remote_code=True)
base = AutoModelForCausalLM.from_pretrained(
BASE, torch_dtype=torch.bfloat16, device_map="auto", trust_remote_code=True
)
model = PeftModel.from_pretrained(base, REPO)
hidden = model.config.hidden_size
head = DecisionHead(hidden, max_options=24)
head.load_state_dict(torch.load("decision_head.pt", map_location="cpu"))
head.to(model.device).to(dtype=torch.bfloat16).eval()
def build_prompt(state, instructions, option_ids, labels):
lines = [
"You are a decision model. Assign a probability distribution over the options.",
f"State: {state}",
f"Question: {instructions}",
"Options:",
]
for oid, lab in zip(option_ids, labels):
lines.append(f"- {oid}: {lab}")
lines.append("Respond with probabilities over the option ids.")
return "\n".join(lines)
state = "User is choosing a laptop for ML coursework."
instructions = "Which priority matters most?"
option_ids = ["cpu_ram", "screen_only", "cheapest", "brand_prestige"]
labels = [
"Prefer CPU/RAM for training",
"Prefer screen quality only",
"Minimize price",
"Prefer brand prestige",
]
prompt = build_prompt(state, instructions, option_ids, labels)
enc = tok(prompt, return_tensors="pt", truncation=True, max_length=1024)
enc = {k: v.to(model.device) for k, v in enc.items()}
with torch.no_grad():
out = model(**enc, output_hidden_states=True, use_cache=False)
logits = head(out.hidden_states[-1], enc["attention_mask"]) # [1, 24]
n = len(option_ids)
probs = torch.softmax(logits[0, :n].float(), dim=-1)
print(dict(zip(option_ids, probs.tolist())))
Need GPU memory for the 9B base (bf16 ≈ 18 GB+). For Spaces, use a GPU Space / ZeroGPU; CPU demos of full 9B are impractical.
Training sketch
- Teacher: TypeSafe Jev (
jev-1.13.0) probability outputs on self-authored forced-choice items (public + sensitive routing). - Student objective: masked KL(teacher ‖ student) over valid option slots.
- Base frozen; LoRA + decision head trained (v4 corpus / epoch_0 checkpoint selected for release).
License & notices
- This adapter + decision head code/weights: released under Apache-2.0 (see
LICENSE), to the extent the author can license the derivative. - Base model
wangzhang/Qwen3.5-9B-abliterated: follow that repo’s license and the upstream Qwen terms. - Teacher / API: not redistributed; distillation used self-collected labels. Independent project — not affiliated with TypeSafe AI or Jev. Verify ToS and local law before commercial deployment.
- Abliterated / “uncensored” bases can produce unsafe completions if misused as chat models; this pack is intended as a decision router with explicit option sets you control.
Citation
@misc{jevstyle9b-uncensored-v1,
title = {JevStyle-9B-Decision-Uncensored-v1},
author = {Independent contributor},
year = {2026},
url = {https://huggingface.co/chaoliangUNSW/JevStyle-9B-Decision-Uncensored-v1}
}
Related (same author line): Jev-Style-2B-Decision-v3 under chaoliangUNSW (separate, censored-base lineage).