devops-thiago commited on
Commit
9e96d97
·
verified ·
1 Parent(s): eabb631

Add model card with benchmark results

Browse files
Files changed (1) hide show
  1. README.md +8 -8
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** 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
 
@@ -82,7 +82,6 @@ pip install classone
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,16 +90,15 @@ from classone.tokenizer import ClassOnePromptBuilder
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,9 +133,11 @@ print("Anger score: ", results["anger"].score)
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
 
 
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
 
 
82
  ```python
83
  import torch
84
  from huggingface_hub import hf_hub_download
 
85
  from transformers import AutoTokenizer
86
 
87
  from classone.modeling.modeling_classone import ClassOneModel
 
90
 
91
  REPO_ID = "devops-thiago/classone-gemma4-e2b"
92
 
93
+ # 1. Load the ClassOne model (weights + tokenizer are fully self-contained here)
94
+ tokenizer = AutoTokenizer.from_pretrained(REPO_ID)
95
  builder = ClassOnePromptBuilder(tokenizer)
96
  model = ClassOneModel.from_backbone(
97
+ base_model_name_or_path=REPO_ID,
98
  tokenizer=tokenizer,
99
  device="cuda",
100
  torch_dtype=torch.float16,
101
  )
 
102
 
103
  # 2. Load the trained decision heads
104
  heads = torch.load(hf_hub_download(REPO_ID, "classone_heads.pt"), map_location="cuda")
 
133
 
134
  | File | Description |
135
  |---|---|
136
+ | `model.safetensors` (sharded) | Merged ClassOne backbone weights |
137
+ | `config.json` | Model configuration |
138
+ | `tokenizer.json`, `tokenizer_config.json` | Tokenizer, including ClassOne delimiter tokens |
139
  | `classone_heads.pt` | Trained Noul / Choice / Score head weights + calibrated temperatures |
140
+ | `lora_backbone/` | LoRA adapter (r=16, α=32) that produced the merged weights |
 
141
 
142
  ## Citation
143