Add model card with benchmark results
Browse files
README.md
CHANGED
|
@@ -14,7 +14,7 @@ pipeline_tag: text-classification
|
|
| 14 |
|
| 15 |
# classone-qwen3.5-4b — ClassOne System 1 Decision Model
|
| 16 |
|
| 17 |
-
**[devops-thiago/classone-qwen3.5-4b](https://huggingface.co/devops-thiago/classone-qwen3.5-4b)** is an open-source **System 1 decision model** using the [ClassOne architecture](https://github.com/devops-thiago/class-one).
|
| 18 |
|
| 19 |
Instead of generating text token by token, ClassOne evaluates structured decisions in a **single forward pass**, returning typed, calibrated outputs with zero decoding overhead.
|
| 20 |
|
|
@@ -26,35 +26,35 @@ Evaluated across all 231 public tasks in [fstandhartinger/jevbench](https://gith
|
|
| 26 |
|
| 27 |
| Tier | Tasks | Accuracy | ECE | Brier Score | Median Latency (p50) |
|
| 28 |
|---|---|---|---|---|---|
|
| 29 |
-
| **Easy** | 48 | **100.0%** (48/48) | **0.
|
| 30 |
-
| **Original** | 72 | **95.8%** (69/72) | **0.
|
| 31 |
-
| **Hard** | 111 | **
|
| 32 |
-
| **Overall Aggregate** | **231** | **
|
| 33 |
|
| 34 |
-
- **
|
| 35 |
-
- **
|
| 36 |
-
- **Hard Tier Sub-Breakdown:** Choice
|
| 37 |
|
| 38 |
### 2. Hugging Face Decision Index (50 Public Multi-Domain Tasks)
|
| 39 |
|
| 40 |
-
| Domain |
|
| 41 |
-
|---|---|---|
|
| 42 |
-
| **Knowledge** |
|
| 43 |
-
| **Language** |
|
| 44 |
-
| **Retrieval** |
|
| 45 |
-
| **
|
| 46 |
-
| **
|
| 47 |
-
| **Overall Decision Index** | **
|
| 48 |
|
| 49 |
### 3. RLCDAlignBench Alignment & Safety Evaluation (100 Instances)
|
| 50 |
|
| 51 |
| Failure Mode / Axis | Samples (N) | AUROC | Accuracy (%) | ECE | Latency (p50) |
|
| 52 |
|---|---|---|---|---|---|
|
| 53 |
-
| **Power Seeking** | 6 | **0.
|
| 54 |
-
| **Faithfulness** | 9 | **0.850** | **
|
| 55 |
-
| **
|
| 56 |
-
| **
|
| 57 |
-
| **Overall
|
| 58 |
|
| 59 |
### 3. Edge vs Cloud Latency (ClassOne vs TypeSafe Jev API)
|
| 60 |
|
|
@@ -81,6 +81,7 @@ pip install classone
|
|
| 81 |
```python
|
| 82 |
import torch
|
| 83 |
from huggingface_hub import hf_hub_download
|
|
|
|
| 84 |
from transformers import AutoTokenizer
|
| 85 |
|
| 86 |
from classone.modeling.modeling_classone import ClassOneModel
|
|
@@ -89,15 +90,16 @@ from classone.tokenizer import ClassOnePromptBuilder
|
|
| 89 |
|
| 90 |
REPO_ID = "devops-thiago/classone-qwen3.5-4b"
|
| 91 |
|
| 92 |
-
# 1. Load the
|
| 93 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
| 94 |
builder = ClassOnePromptBuilder(tokenizer)
|
| 95 |
model = ClassOneModel.from_backbone(
|
| 96 |
-
base_model_name_or_path=
|
| 97 |
tokenizer=tokenizer,
|
| 98 |
device="cuda",
|
| 99 |
torch_dtype=torch.float16,
|
| 100 |
)
|
|
|
|
| 101 |
|
| 102 |
# 2. Load the trained decision heads
|
| 103 |
heads = torch.load(hf_hub_download(REPO_ID, "classone_heads.pt"), map_location="cuda")
|
|
@@ -132,11 +134,9 @@ print("Anger score: ", results["anger"].score)
|
|
| 132 |
|
| 133 |
| File | Description |
|
| 134 |
|---|---|
|
| 135 |
-
| `model.safetensors` (sharded) | Merged ClassOne backbone weights |
|
| 136 |
-
| `config.json` | Model configuration |
|
| 137 |
-
| `tokenizer.json`, `tokenizer_config.json` | Tokenizer, including ClassOne delimiter tokens |
|
| 138 |
| `classone_heads.pt` | Trained Noul / Choice / Score head weights + calibrated temperatures |
|
| 139 |
-
| `lora_backbone/` | LoRA adapter (r=16, α=32)
|
|
|
|
| 140 |
|
| 141 |
## Citation
|
| 142 |
|
|
|
|
| 14 |
|
| 15 |
# classone-qwen3.5-4b — ClassOne System 1 Decision Model
|
| 16 |
|
| 17 |
+
**[devops-thiago/classone-qwen3.5-4b](https://huggingface.co/devops-thiago/classone-qwen3.5-4b)** is an open-source **System 1 decision model** built on top of [`Qwen/Qwen3.5-4B`](https://huggingface.co/Qwen/Qwen3.5-4B) using the [ClassOne architecture](https://github.com/devops-thiago/class-one).
|
| 18 |
|
| 19 |
Instead of generating text token by token, ClassOne evaluates structured decisions in a **single forward pass**, returning typed, calibrated outputs with zero decoding overhead.
|
| 20 |
|
|
|
|
| 26 |
|
| 27 |
| Tier | Tasks | Accuracy | ECE | Brier Score | Median Latency (p50) |
|
| 28 |
|---|---|---|---|---|---|
|
| 29 |
+
| **Easy** | 48 | **100.0%** (48/48) | **0.0257** | **0.0094** | **63.3 ms** |
|
| 30 |
+
| **Original** | 72 | **95.8%** (69/72) | **0.0481** | **0.0352** | **62.9 ms** |
|
| 31 |
+
| **Hard** | 111 | **52.2%** (58/111) | 0.3099 | 0.3424 | **211.2 ms** |
|
| 32 |
+
| **Overall Aggregate** | **231** | **75.8%** (175/231) | — | — | **63.3 ms** |
|
| 33 |
|
| 34 |
+
- **Easy Tier Sub-Breakdown:** Choice: **100.0%** (36/36); Noul policy: **100.0%** (12/12). Flawless 100%.
|
| 35 |
+
- **Original Tier Sub-Breakdown:** Noul: **100.0%** (24/24); Score rubrics: **100.0%** (12/12); Choice: **91.7%** (33/36).
|
| 36 |
+
- **Hard Tier Sub-Breakdown:** Choice: **52.2%** (35/67); Noul: **52.6%** (20/38); Score: **50.0%** (3/6).
|
| 37 |
|
| 38 |
### 2. Hugging Face Decision Index (50 Public Multi-Domain Tasks)
|
| 39 |
|
| 40 |
+
| Domain | Weight | Accuracy (%) | Score |
|
| 41 |
+
|---|---|---|---|
|
| 42 |
+
| **Knowledge & Verification** | 25.8% | **100.0%** (10/10) | 100.00 pts |
|
| 43 |
+
| **Language & Policy Contracts** | 25.8% | **100.0%** (10/10) | 100.00 pts |
|
| 44 |
+
| **Retrieval & Relevance Triage** | 20.0% | **100.0%** (10/10) | 100.00 pts |
|
| 45 |
+
| **Tools & Execution Guardrails** | 18.3% | **100.0%** (10/10) | 100.00 pts |
|
| 46 |
+
| **Rubric & Quality Scoring** | 10.1% | **90.0%** (9/10) | 90.00 pts |
|
| 47 |
+
| **Overall Decision Index** | **100.0%** | **98.0%** (49/50) | **98.99 / 100.00** (0.0317 ECE) |
|
| 48 |
|
| 49 |
### 3. RLCDAlignBench Alignment & Safety Evaluation (100 Instances)
|
| 50 |
|
| 51 |
| Failure Mode / Axis | Samples (N) | AUROC | Accuracy (%) | ECE | Latency (p50) |
|
| 52 |
|---|---|---|---|---|---|
|
| 53 |
+
| **Power Seeking** | 6 | **0.889** | **83.3%** | 0.2008 | 520.1 ms |
|
| 54 |
+
| **Faithfulness** | 9 | **0.850** | **77.8%** | 0.2895 | 513.4 ms |
|
| 55 |
+
| **Honesty (Deception)** | 11 | **0.833** | **63.6%** | 0.2482 | 536.0 ms |
|
| 56 |
+
| **Refusal (Jailbreaks)** | 11 | **0.600** | **45.5%** | 0.3167 | 670.6 ms |
|
| 57 |
+
| **Overall Balanced Accuracy** | **100** | **0.562** | **51.5%** | **0.3101** | **487.9 ms** |
|
| 58 |
|
| 59 |
### 3. Edge vs Cloud Latency (ClassOne vs TypeSafe Jev API)
|
| 60 |
|
|
|
|
| 81 |
```python
|
| 82 |
import torch
|
| 83 |
from huggingface_hub import hf_hub_download
|
| 84 |
+
from peft import PeftModel
|
| 85 |
from transformers import AutoTokenizer
|
| 86 |
|
| 87 |
from classone.modeling.modeling_classone import ClassOneModel
|
|
|
|
| 90 |
|
| 91 |
REPO_ID = "devops-thiago/classone-qwen3.5-4b"
|
| 92 |
|
| 93 |
+
# 1. Load the backbone and attach the published LoRA adapter
|
| 94 |
+
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3.5-4B")
|
| 95 |
builder = ClassOnePromptBuilder(tokenizer)
|
| 96 |
model = ClassOneModel.from_backbone(
|
| 97 |
+
base_model_name_or_path="Qwen/Qwen3.5-4B",
|
| 98 |
tokenizer=tokenizer,
|
| 99 |
device="cuda",
|
| 100 |
torch_dtype=torch.float16,
|
| 101 |
)
|
| 102 |
+
model.backbone = PeftModel.from_pretrained(model.backbone, REPO_ID, subfolder="lora_backbone")
|
| 103 |
|
| 104 |
# 2. Load the trained decision heads
|
| 105 |
heads = torch.load(hf_hub_download(REPO_ID, "classone_heads.pt"), map_location="cuda")
|
|
|
|
| 134 |
|
| 135 |
| File | Description |
|
| 136 |
|---|---|
|
|
|
|
|
|
|
|
|
|
| 137 |
| `classone_heads.pt` | Trained Noul / Choice / Score head weights + calibrated temperatures |
|
| 138 |
+
| `lora_backbone/adapter_model.safetensors` | LoRA adapter weights (r=16, α=32) |
|
| 139 |
+
| `lora_backbone/adapter_config.json` | LoRA config (target modules, rank, etc.) |
|
| 140 |
|
| 141 |
## Citation
|
| 142 |
|