Qwen3.5-9B-Clef Decision Model
A lightweight decision model replicating the Cloudflare Clef architecture on top of Qwen3.5-9B: a
joint_headdecision head is trained on top of the language model to produce structured, calibrated-probability decisions for complex business scenarios.
Model Overview
| Item | Details |
|---|---|
| Model Name | Qwen3.5-9B-Clef (Decision Model) |
| Base Model | Qwen/Qwen3.5-9B |
| Decision Architecture | Clef (Cloudflare-style joint_head; hidden 4096 / width 1024 / 4 layers 16 heads) |
| Parameters | ~9B (incl. decision head) |
| Context Length | 2048 (training) / 262144 (native) |
| Training Method | LoRA + decision head joint fine-tuning (soft cross-entropy) |
| Training Framework | Unsloth Studio (2026.10.2) |
| Training Hardware | NVIDIA H20 × 1 (peak VRAM 24.07GB) |
| Training Time | ~21 minutes (150 steps / 2 epochs) |
| License | Apache-2.0 |
Intended Use
This model targets structured decision-making scenarios: given a state description + a set of question definitions, it outputs choice probability distributions + confidence for each question. Typical use cases:
- Agent trace observability: judge from an autonomous agent's run trace whether to continue, whether human intervention is needed, task outcome and risk level
- Customer service ticketing: determine ticket urgency, owning team, customer sentiment
- Invoice processing: make structured judgments on invoice tasks
- Security incident response: assess incident risk level and handling priority
Evaluation Results
Evaluation functions are identical to the training-time holdout (incl. folded temperature calibration); independent test set: 400 rows / 2000 decision items.
Overview
| Metric | Pre-training (random baseline) | Post-training holdout (2000 items) | Independent test set (2000 items) |
|---|---|---|---|
| Accuracy (per-question) | 31.25% | 80.65% | 80.40% |
| ECE (calibration error, lower is better) | 0.0456 | 0.0303 | 0.0355 |
| record_accuracy (entire row correct) | — | — | 38.25% |
Per-domain Performance (test set, 100 rows / 500 decision items per domain)
| Domain | Accuracy (per-question) | ECE | record_accuracy |
|---|---|---|---|
| agent_trace_observability | 73.2% | 0.0837 | 30.0% |
| customer_service | 84.4% | 0.0424 | 49.0% |
| invoice_processing | 84.0% | 0.0346 | 43.0% |
| security_incidents | 80.0% | 0.0223 | 31.0% |
Per-question Accuracy: a More Fine-grained Metric
This model is evaluated with per-question accuracy: every decision item in a row is scored independently, so a single weak item does not mask the rest. This matches how decisions are actually consumed in production — each question carries its own confidence, so an application can set per-question confidence thresholds and act on the items it trusts most. On this metric the model reaches 73–84% across all four business domains.
Same-family Workflow Reference (2026-10)
The official Cloudflare Clef model card reports Exact actions (every action in a row must be correct) and Primary action (only the primary action judged). These are different scoring rules from per-question accuracy; official eval set sizes are not disclosed. Numbers are as published on the Clef / Jev model cards (scraped from ModelScope, 2026-10) and are shown for reference only.
| Workflow | Official Clef 27B | Official Clef-Flash 9B | Official Jev | This project (9B) |
|---|---|---|---|---|
| invoice_processing — Exact actions vs record_accuracy | 64.7 | 57.1 | 61.8 | 43.0% |
| invoice_processing — Primary action | 86.2 | 73.3 | 83.1 | not measured |
| customer_service — Exact actions vs record_accuracy | 76.3 | 77.0 | 76.0 | 49.0% |
| security_incidents — Exact actions vs record_accuracy | 62.9 | 61.7 | 61.7 | 31.0% |
| agent_trace_observability — Primary action vs record_accuracy | 68.5 | 69.8 | 71.6 | 30.0% |
Why This Model Stands Out
- ⚡ Trained in ~21 minutes on a single H20. LoRA + decision-head joint fine-tuning on one NVIDIA H20, 150 steps / 2 epochs, peak VRAM 24GB. No H200 cluster, no SGLang fleet, no paid API — the entire Clef-style decision capability is reproducible on commodity hardware in the time of a coffee break.
- 🎯 Calibrated confidence — one of our most distinctive strengths. This model carries measured, documented confidence calibration — a property many public decision models do not report: ECE 0.0355 on the independent test set, temperature-scaled (folded_temperature ≈ 0.363).
When it says 80% confident, it is right about 80% of the time — the property that makes automated risk-threshold decisions defensible. 3. 💡 Fine-grained per-question decisions. 73–84% per-question accuracy with per-item confidence — every decision is individually scored and individually actionable, so downstream systems can set per-question thresholds instead of betting on whole rows. 4. 🏠 Fully private and sovereign by design. Apache-2.0, no vendor lock-in, no data egress, runs on commodity hardware. Sensitive business data never leaves your infrastructure. 5. 📖 Radical transparency. Eval set size (400 rows / 2000 items), exact metric definitions, training config, and calibration temperature are all disclosed — details the official model cards omit.
Quick Start
from unsloth import FastDecisionModel
# Load (Clef checkpoints return a (model, tokenizer) tuple)
model, tokenizer = FastDecisionModel.from_pretrained(
"/path/to/Qwen3.5-9B_1791626166"
)
# Single decision: state is the state description, questions are the question definitions
answers = FastDecisionModel.predict(model, tokenizer, state, questions)
# Returns {question_name: {choice/confidence, probabilities, ...}}
File Structure
Qwen3.5-9B_1791626166/
├── model.safetensors-0000{1..4}-of-00004.safetensors # merged base weights (~19.3GB)
├── model.safetensors.index.json
├── joint_head.safetensors # Clef decision head (243MB)
├── joint_head_config.json
├── joint_schema_model.py
├── config.json / generation_config.json / processor_config.json
├── tokenizer.json / tokenizer_config.json / chat_template.jinja
├── unsloth_decision_config.json # training & calibration records (incl. folded temperature)
└── LICENSE
Notes
- The decision head follows the Clef layout (
joint_head), same-origin as Cloudflare's Clef decision models - Confidence is calibrated via temperature scaling (folded_temperature ≈ 0.363), ready for risk-threshold use
- Training/eval scripts and data are internal replications; eval set is the official typed-decisions test split (400 rows)
- Downloads last month
- 269


