Multiple Choice
PEFT
Safetensors
English
gev
decision-model
lora
pointer-head
calibration
Eval Results (legacy)
Instructions to use onatm/gev-e2b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use onatm/gev-e2b with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files- README.md +74 -12
- adapter_config.json +1 -2
README.md
CHANGED
|
@@ -1,23 +1,85 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
base_model: google/gemma-4-E2B
|
|
|
|
| 3 |
library_name: peft
|
| 4 |
license: apache-2.0
|
| 5 |
-
tags: [gev,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
---
|
| 7 |
|
| 8 |
-
# gev-e2b
|
| 9 |
|
| 10 |
-
|
| 11 |
|
| 12 |
-
The
|
| 13 |
|
| 14 |
-
|
|
|
|
| 15 |
|
| 16 |
-
##
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language: en
|
| 3 |
base_model: google/gemma-4-E2B
|
| 4 |
+
base_model_relation: adapter
|
| 5 |
library_name: peft
|
| 6 |
license: apache-2.0
|
| 7 |
+
tags: [gev, decision-model, lora, pointer-head, multiple-choice, calibration]
|
| 8 |
+
datasets: [jaredpalmer/kev-suites]
|
| 9 |
+
metrics: [accuracy, brier_score, expected_calibration_error]
|
| 10 |
+
model-index:
|
| 11 |
+
- name: gev-e2b
|
| 12 |
+
results:
|
| 13 |
+
- task: { type: text-classification, name: typed decision (choice / noul / score) }
|
| 14 |
+
dataset: { type: jaredpalmer/kev-suites, name: "decision-v7/test (clean questions)" }
|
| 15 |
+
metrics:
|
| 16 |
+
- { type: accuracy, value: 0.8292 }
|
| 17 |
+
- { type: brier_score, value: 0.2336, name: "Brier (as served)" }
|
| 18 |
+
- { type: expected_calibration_error, value: 0.0170, name: "ECE (as served)" }
|
| 19 |
+
- task: { type: text-classification, name: typed decision (choice / noul / score) }
|
| 20 |
+
dataset: { type: jaredpalmer/kev-suites, name: "transfer-v4/test (clean questions)" }
|
| 21 |
+
metrics:
|
| 22 |
+
- { type: accuracy, value: 0.6250 }
|
| 23 |
+
- { type: brier_score, value: 0.4491, name: "Brier (as served)" }
|
| 24 |
+
- { type: expected_calibration_error, value: 0.0571, name: "ECE (as served)" }
|
| 25 |
---
|
| 26 |
|
| 27 |
+
# gev-e2b — Gemma 4 E2B decision model
|
| 28 |
|
| 29 |
+
**State and typed questions in; one answer and a probability distribution per question out.** Gev scores the supplied options rather than generating text. It combines a LoRA adapter on [`google/gemma-4-E2B`](https://huggingface.co/google/gemma-4-E2B) with a separately trained pointer head.
|
| 30 |
|
| 31 |
+
The pointer head (`pointer.safetensors`) is required: loading the PEFT adapter alone does not produce Gev decisions. Run this checkpoint through [Gev](https://github.com/onatm/gev), which loads the base model, adapter, pointer head, tokenizer markers, and serving temperature.
|
| 32 |
|
| 33 |
+
- **Trained-source test:** 82.9% accuracy on 1,200 clean questions.
|
| 34 |
+
- **New-source test:** 62.5% accuracy on 656 clean questions.
|
| 35 |
|
| 36 |
+
## Use
|
| 37 |
|
| 38 |
+
Install [Gev](https://github.com/onatm/gev) (add `--extra mlx` to `uv sync` on Apple Silicon), then save this as `request.json`:
|
| 39 |
+
|
| 40 |
+
```json
|
| 41 |
+
{"state":"Order #1 arrived damaged.","questions":{"route":{"type":"choice","instructions":"Which team handles this?","criteria":{"billing":"Payments","support":"Product issues"}}}}
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
```bash
|
| 45 |
+
uv run gev predict onatm/gev-e2b --input request.json
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
The response includes `questions.route.answer`, `questions.route.probabilities` (one per option), and the serving temperature. Choice, yes/no (`noul`), and ordinal (`score`) questions are supported. A Hugging Face text-generation or PEFT-only pipeline cannot serve this model.
|
| 49 |
+
|
| 50 |
+
## Evaluation
|
| 51 |
+
|
| 52 |
+
Clean-question scores from the saved reports. Accuracy is at raw T=1 (temperature scaling does not change the winning answer); Brier and ECE are lower-is-better. The served columns use the saved temperature **T=1.6245**. A dash means calibrated metrics were not recorded for that split.
|
| 53 |
+
|
| 54 |
+
| Suite / split | Clean n | Accuracy | Brier raw | Brier served | ECE raw | ECE served |
|
| 55 |
+
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
|
| 56 |
+
| decision-v7/development | 1,264 | 0.7975 | 0.2847 | - | 0.0628 | - |
|
| 57 |
+
| transfer-v4/development | 656 | 0.6113 | 0.4990 | 0.4735 | 0.1163 | 0.0522 |
|
| 58 |
+
| decision-v7/test | 1,200 | 0.8292 | 0.2457 | 0.2336 | 0.0661 | 0.0170 |
|
| 59 |
+
| transfer-v4/test | 656 | 0.6250 | 0.4680 | 0.4491 | 0.1136 | 0.0571 |
|
| 60 |
+
|
| 61 |
+
`decision-v7` contains held-out questions from the training source families; `transfer-v4` contains new sources and held-out policy structures. Development was for model selection; these reports describe seed 0. Temperature was fitted on the separate `decision-v7/calibration` split, not on either test split.
|
| 62 |
+
|
| 63 |
+
The decision-v7 test report predates the temperature fit. Its served metrics were computed afterward from saved raw logits, without rerunning inference or fitting on test.
|
| 64 |
+
|
| 65 |
+
## Known limits
|
| 66 |
+
|
| 67 |
+
This is one seed, not a multi-seed study. The new-source test is substantially harder than the trained-source test; evaluate on your own decisions before use.
|
| 68 |
+
|
| 69 |
+
- For changed-answer contrastive pairs, both answers were correct in 12/64 pairs.
|
| 70 |
+
- With a none-of-the-above option present, 14/36 questions were correct.
|
| 71 |
+
|
| 72 |
+
## Model and provenance
|
| 73 |
+
|
| 74 |
+
- Base: `google/gemma-4-E2B` at revision `d29ff6b45f081a49ee2733a859c9c9c2d95d1a6f`; frozen base weights are not in this repo.
|
| 75 |
+
- Architecture: LoRA rank 16, alpha 32 on the text decoder and a 256-wide pointer head. Each question is scored independently.
|
| 76 |
+
- Recipe: seed 0, 2 epochs, 12,576 training records, 3,144 steps, MLX/BF16. The checkpoint stores the fitted temperature in `gev.json`.
|
| 77 |
+
- Training suite: [jaredpalmer/kev-suites](https://huggingface.co/datasets/jaredpalmer/kev-suites) (`decision-v7`, pinned and verified by hash).
|
| 78 |
+
|
| 79 |
+
[Source code and inference instructions](https://github.com/onatm/gev) · [Jev architecture](https://archerhume.com/posts/jevs-architecture-unmasked)
|
| 80 |
+
|
| 81 |
+
[Gemma 4 E2B seed-0 results and methodology](https://github.com/onatm/gev/blob/main/docs/results/gemma4-e2b-s0.md)
|
| 82 |
+
|
| 83 |
+
## License
|
| 84 |
+
|
| 85 |
+
The adapter and pointer head are apache-2.0; check the separately loaded base model and dataset licenses as well.
|
adapter_config.json
CHANGED
|
@@ -41,11 +41,10 @@
|
|
| 41 |
"down_proj"
|
| 42 |
],
|
| 43 |
"target_parameters": null,
|
| 44 |
-
"task_type": null,
|
| 45 |
"trainable_token_indices": null,
|
| 46 |
"use_bdlora": null,
|
| 47 |
"use_dora": false,
|
| 48 |
"use_qalora": false,
|
| 49 |
"use_rslora": false,
|
| 50 |
"velora_config": null
|
| 51 |
-
}
|
|
|
|
| 41 |
"down_proj"
|
| 42 |
],
|
| 43 |
"target_parameters": null,
|
|
|
|
| 44 |
"trainable_token_indices": null,
|
| 45 |
"use_bdlora": null,
|
| 46 |
"use_dora": false,
|
| 47 |
"use_qalora": false,
|
| 48 |
"use_rslora": false,
|
| 49 |
"velora_config": null
|
| 50 |
+
}
|