devops-thiago commited on
Commit
68544a1
·
verified ·
1 Parent(s): 4a93e7d

Add model card with benchmark results

Browse files
Files changed (1) hide show
  1. README.md +17 -9
README.md CHANGED
@@ -14,7 +14,7 @@ pipeline_tag: text-classification
14
 
15
  # classone-gemma4-e2b — ClassOne System 1 Decision Model
16
 
17
- **[devops-thiago/classone-gemma4-e2b](https://huggingface.co/devops-thiago/classone-gemma4-e2b)** is an open-source **System 1 decision model** using the [ClassOne architecture](https://github.com/devops-thiago/class-one). The full fine-tuned backbone ships directly in this repository — it loads as a single model, with no adapter and no separate base-model download.
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
 
@@ -29,7 +29,7 @@ Evaluated across all 231 public tasks in [fstandhartinger/jevbench](https://gith
29
  | **Easy** | 48 | **100.0%** (48/48) | **0.0064** | **0.0009** | **44.8 ms** |
30
  | **Original** | 72 | **90.3%** (65/72) | **0.0972** | **0.1015** | **42.9 ms** |
31
  | **Hard** | 111 | **44.1%** (49/111) | 0.4681 | 0.4813 | **90.0 ms** |
32
- | **Overall Aggregate** | **231** | **70.1%** (162/231) | — | — | **44.8 ms** |
33
 
34
  - **Easy Tier Sub-Breakdown:** Choice accuracy: **100.0%** (36/36); Noul policy accuracy: **100.0%** (12/12). Flawless 0.0064 ECE.
35
  - **Original Tier Sub-Breakdown:** Noul accuracy: **100.0%** (24/24); Score rubrics: **100.0%** (12/12); Choice accuracy: **80.6%** (29/36).
@@ -49,6 +49,14 @@ Evaluated across the 10 core AI alignment failure modes (arXiv:2609.29429):
49
  | **Bias** | 9 | **0.525** | **55.6%** | 0.2141 | 217.9 ms |
50
  | **Overall Balanced Accuracy** | **100** | **0.505** | **56.2%** | **0.1944** | **199.2 ms** |
51
 
 
 
 
 
 
 
 
 
52
  ### 3. Edge vs Cloud Latency (ClassOne vs TypeSafe Jev API)
53
 
54
  Measured against TypeSafe AI's Jev (v1.13) cloud API:
@@ -74,6 +82,7 @@ pip install classone
74
  ```python
75
  import torch
76
  from huggingface_hub import hf_hub_download
 
77
  from transformers import AutoTokenizer
78
 
79
  from classone.modeling.modeling_classone import ClassOneModel
@@ -82,15 +91,16 @@ from classone.tokenizer import ClassOnePromptBuilder
82
 
83
  REPO_ID = "devops-thiago/classone-gemma4-e2b"
84
 
85
- # 1. Load the ClassOne model (weights + tokenizer are fully self-contained here)
86
- tokenizer = AutoTokenizer.from_pretrained(REPO_ID)
87
  builder = ClassOnePromptBuilder(tokenizer)
88
  model = ClassOneModel.from_backbone(
89
- base_model_name_or_path=REPO_ID,
90
  tokenizer=tokenizer,
91
  device="cuda",
92
  torch_dtype=torch.float16,
93
  )
 
94
 
95
  # 2. Load the trained decision heads
96
  heads = torch.load(hf_hub_download(REPO_ID, "classone_heads.pt"), map_location="cuda")
@@ -125,11 +135,9 @@ print("Anger score: ", results["anger"].score)
125
 
126
  | File | Description |
127
  |---|---|
128
- | `model.safetensors` (sharded) | Merged ClassOne backbone weights |
129
- | `config.json` | Model configuration |
130
- | `tokenizer.json`, `tokenizer_config.json` | Tokenizer, including ClassOne delimiter tokens |
131
  | `classone_heads.pt` | Trained Noul / Choice / Score head weights + calibrated temperatures |
132
- | `lora_backbone/` | LoRA adapter (r=16, α=32) that produced the merged weights |
 
133
 
134
  ## Citation
135
 
 
14
 
15
  # classone-gemma4-e2b — ClassOne System 1 Decision Model
16
 
17
+ **[devops-thiago/classone-gemma4-e2b](https://huggingface.co/devops-thiago/classone-gemma4-e2b)** is an open-source **System 1 decision model** built on top of [`google/gemma-4-E2B-it`](https://huggingface.co/google/gemma-4-E2B-it) 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
 
 
29
  | **Easy** | 48 | **100.0%** (48/48) | **0.0064** | **0.0009** | **44.8 ms** |
30
  | **Original** | 72 | **90.3%** (65/72) | **0.0972** | **0.1015** | **42.9 ms** |
31
  | **Hard** | 111 | **44.1%** (49/111) | 0.4681 | 0.4813 | **90.0 ms** |
32
+ | **Overall Aggregate** | **231** | **70.1%** (162/231) | - | - | **44.8 ms** |
33
 
34
  - **Easy Tier Sub-Breakdown:** Choice accuracy: **100.0%** (36/36); Noul policy accuracy: **100.0%** (12/12). Flawless 0.0064 ECE.
35
  - **Original Tier Sub-Breakdown:** Noul accuracy: **100.0%** (24/24); Score rubrics: **100.0%** (12/12); Choice accuracy: **80.6%** (29/36).
 
49
  | **Bias** | 9 | **0.525** | **55.6%** | 0.2141 | 217.9 ms |
50
  | **Overall Balanced Accuracy** | **100** | **0.505** | **56.2%** | **0.1944** | **199.2 ms** |
51
 
52
+ ### 3. Agentic Tool-Routing & Adversarial Safety Suites (2026 Benchmarks)
53
+
54
+ | Benchmark Suite | Split / Samples | Accuracy | Secondary Metric | Calibration ECE | Latency (p50) |
55
+ |---|---|---|---|---|---|
56
+ | **WildGuardTest** (`walledai/WildGuardTest`) | `test` (100 stratified) | **72.00%** (72.04% BalAcc) | **0.7993 AUROC** (**78.6%** Vanilla, **72.9%** Benign Spec) | **0.1597** | 43.5 ms |
57
+ | **Deepset Prompt Injections** (`deepset/prompt-injections`) | `test` (116 full) | **50.86%** (59/116) | **0.6214 AUROC** (**75.0%** Injection Recall) | 0.3412 | 41.6 ms |
58
+ | **NVIDIA When2Call** (`nvidia/When2Call`) | `mcq` (100 stratified) | **35.00%** | **85.3%** `tool_call` (29/34) | 0.5376 | 106.8 ms |
59
+
60
  ### 3. Edge vs Cloud Latency (ClassOne vs TypeSafe Jev API)
61
 
62
  Measured against TypeSafe AI's Jev (v1.13) cloud API:
 
82
  ```python
83
  import torch
84
  from huggingface_hub import hf_hub_download
85
+ from peft import PeftModel
86
  from transformers import AutoTokenizer
87
 
88
  from classone.modeling.modeling_classone import ClassOneModel
 
91
 
92
  REPO_ID = "devops-thiago/classone-gemma4-e2b"
93
 
94
+ # 1. Load the backbone and attach the published LoRA adapter
95
+ tokenizer = AutoTokenizer.from_pretrained("google/gemma-4-E2B-it")
96
  builder = ClassOnePromptBuilder(tokenizer)
97
  model = ClassOneModel.from_backbone(
98
+ base_model_name_or_path="google/gemma-4-E2B-it",
99
  tokenizer=tokenizer,
100
  device="cuda",
101
  torch_dtype=torch.float16,
102
  )
103
+ model.backbone = PeftModel.from_pretrained(model.backbone, REPO_ID, subfolder="lora_backbone")
104
 
105
  # 2. Load the trained decision heads
106
  heads = torch.load(hf_hub_download(REPO_ID, "classone_heads.pt"), map_location="cuda")
 
135
 
136
  | File | Description |
137
  |---|---|
 
 
 
138
  | `classone_heads.pt` | Trained Noul / Choice / Score head weights + calibrated temperatures |
139
+ | `lora_backbone/adapter_model.safetensors` | LoRA adapter weights (r=16, α=32) |
140
+ | `lora_backbone/adapter_config.json` | LoRA config (target modules, rank, etc.) |
141
 
142
  ## Citation
143