cortexist commited on
Commit
047d737
·
verified ·
1 Parent(s): 7c697c4

Publish v2.1 GGUF decision heads for little-gemma v1.0

Browse files
.gitattributes CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ gemma4-12B-decision-head.gguf filter=lfs diff=lfs merge=lfs -text
37
+ gemma4-E4B-decision-head.gguf filter=lfs diff=lfs merge=lfs -text
12b/contract.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "answer_channel_seed": false,
3
+ "calibration_scope": "authored calibration families only",
4
+ "capture_boundary": "post-output-norm final prompt token; before generated-token forward",
5
+ "dataset_manifest_sha256": "7840167f3a5dd4ea55c52163953b829232f8525a8a9ef42b2a9d7ce3ec0f0483",
6
+ "deployment_status": "offline_candidate_not_deployed",
7
+ "engine_revision": "c304f086a40c46ae4b67d5402738769dc12132a6",
8
+ "feature_kind": "hidden",
9
+ "head_sha256": "557d538a1043b7ae3563f217d9b0bee0217672ec48216d9a7f71cef4e9475b22",
10
+ "hidden_dim": 3840,
11
+ "input_format": "trio_sound_event_v2_staged_history",
12
+ "layer": 48,
13
+ "model": "12b",
14
+ "model_sha256": "90fd44e29e0d7cffeb0fd00dc73cfdab9ed0b0e95306ecf7821ea634c940c370",
15
+ "task": "final_prompt-action"
16
+ }
12b/head.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:557d538a1043b7ae3563f217d9b0bee0217672ec48216d9a7f71cef4e9475b22
3
+ size 2768441
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Cortexist
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
README.md ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: mit
5
+ library_name: little-gemma
6
+ tags:
7
+ - gemma4
8
+ - decision-head
9
+ - gguf
10
+ - voice-classroom
11
+ - turn-taking
12
+ ---
13
+ # Gemma 4 classroom decision heads
14
+
15
+ Small CPU classifiers that map a Gemma 4 **final-prompt hidden vector** to
16
+ `speak`, `defer` or `wait`. These are auxiliary heads, not language models or
17
+ voice weights. They accompany the GGUF-based
18
+ [little-gemma v1.0 engine](https://github.com/cortexist/little-gemma/tree/v1.0)
19
+ and [little-gemma-tools v1.0 classroom](https://github.com/cortexist/little-gemma-tools/tree/v1.0).
20
+ The classifier training revision is **v2.1 (2026-10-05)**; it is independent of
21
+ the software's v1.0 version. This package replaces `gemma4-decision-head_v0.9`.
22
+
23
+ ## Files
24
+
25
+ | File | Use |
26
+ | --- | --- |
27
+ | `gemma4-E4B-decision-head.gguf` | E4B native C runtime head |
28
+ | `gemma4-12B-decision-head.gguf` | 12B native C runtime head |
29
+ | `e4b/head.npz`, `e4b/contract.json` | E4B NumPy reference and feature contract |
30
+ | `12b/head.npz`, `12b/contract.json` | 12B NumPy reference and feature contract |
31
+ | `SHA256SUMS` | Checksums of release files |
32
+
33
+ The GGUFs are byte-identical to the validated v2.1 exports, with plain public
34
+ filenames. Their embedded contracts retain original training provenance.
35
+ In particular, `deployment_status` records export-time status, not current
36
+ runtime permission. E4B subsequently ran in the GGUF classroom; the supplied
37
+ 12B revision is the latest offline-validated candidate, not a claim that every
38
+ live 12B deployment used it.
39
+
40
+ ## Feature compatibility
41
+
42
+ | Head | Hidden width | Layer | Required backbone GGUF SHA-256 |
43
+ | --- | ---: | ---: | --- |
44
+ | E4B | 2560 | 42 | `df0fd4ee07072c607c29a0a1cb4f98918426cca12f45a2776bdd6ee6d09a4de3` |
45
+ | 12B | 3840 | 48 | `90fd44e29e0d7cffeb0fd00dc73cfdab9ed0b0e95306ecf7821ea634c940c370` |
46
+
47
+ Capture **after output normalization at the final prompt token, before any
48
+ generated-token forward**, without answer-channel seeding. The input contract
49
+ is `trio_sound_event_v2_staged_history` and task is `final_prompt-action`.
50
+ Extraction used little-gemma revision `c304f086a40c46ae4b67d5402738769dc12132a6`;
51
+ its serving support is included in v1.0. Matching dimensions alone is not enough:
52
+ check backbone hash, layer, normalization, prompt format, and capture boundary.
53
+ Other quantizations/backends, including EXL3, require separate validation or
54
+ refitting. Do not bypass feature-contract checks to force an incompatible model.
55
+
56
+ Each head is a three-seed ensemble of 64-unit tanh MLPs with standardized,
57
+ clipped inputs, mean logits and temperature softmax. Labels and numerical
58
+ parameters are stored in the package; use them rather than hardcoding order.
59
+ Training/dev/calibration support contains 5,751 authored examples, including
60
+ 3,943 training rows across 37 training families. Probabilities are calibrated
61
+ only on authored calibration families, not on unconstrained live conversations.
62
+
63
+ ## Use
64
+
65
+ ```sh
66
+ hf download cortexist/gemma4-decision-head --local-dir decision-heads
67
+ cd decision-heads
68
+ sha256sum -c SHA256SUMS
69
+ ```
70
+
71
+ Build the engine's `decision_head` shared library and `decision-head` CLI:
72
+
73
+ ```sh
74
+ cmake -S little-gemma -B little-gemma/build -DCMAKE_BUILD_TYPE=Release
75
+ cmake --build little-gemma/build --target decision_head decision-head
76
+ little-gemma/build/decision-head inspect decision-heads/gemma4-E4B-decision-head.gguf
77
+ ```
78
+
79
+ Configure the classroom's `turn_head.backend` as `c`, `library` as the absolute
80
+ shared-library path, and each `models` entry as a head `path` plus its SHA-256.
81
+ Use `mode: control`, `text_decision_tags: true` and `prompt_lane: v2_sound_event`
82
+ with the compatible `whisper_at_v2` acoustic adapter. The engine snapshots the
83
+ prompt feature, runs the CPU head, then applies the decision to the **same** turn.
84
+ The head itself does not synthesize audio, schedule speakers or detect overlap.
85
+ See [runtime configuration](https://github.com/cortexist/little-gemma-tools/blob/v1.0/script/deviceui/TURN_HEAD.md)
86
+ and [classroom setup](https://github.com/cortexist/little-gemma-tools/blob/v1.0/docs/trio-setup.md).
87
+
88
+ ## Evaluation and limitations
89
+
90
+ | Authored panel | E4B | 12B |
91
+ | --- | ---: | ---: |
92
+ | Reserved invitation cases, three views | 360 / 360 | 360 / 360 |
93
+ | Previously exposed retention cases | 1,212 / 1,212 | 1,211 / 1,212 |
94
+ | Required-wait compact cases | 40 / 40 | 40 / 40 |
95
+ | Follow-up compact cases | 30 / 30 | 30 / 30 |
96
+
97
+ Views are correlated renderings, not independent real-world trials. The 360-row
98
+ panel contains 120 compact cases. The older retention set was exposed during
99
+ development and is not a fresh holdout. The 12B retention error is a teacher-role
100
+ case without sound metadata: a guest's own-name correction predicts **Speak**
101
+ instead of **Defer**. Guest-role retention views passed. A previously exposed
102
+ live E4B case was included in training and is not held-out evidence.
103
+
104
+ The original export check found identical C/NumPy choices on 6,111 vectors per
105
+ model. These results establish narrow authored classroom behavior and export
106
+ parity, not general conversational accuracy, interruption detection, live audio
107
+ robustness or end-to-end latency. Sound metadata in the authored evaluation is
108
+ synthetic; live ASR, identity, acoustics and prompt shifts can change outcomes.
109
+ No private hidden vectors, transcripts, voice recordings or raw training corpus
110
+ are distributed here.
111
+
112
+ ## Voices and licenses
113
+
114
+ [Agent Voice](https://huggingface.co/cortexist/agent-voice) provides the public
115
+ guest voice separately. Users must choose **two additional voices** for teacher
116
+ and student, prepare phoneme timing and split `.enc.onnx`/`.dec.onnx` graphs,
117
+ and generate matching identity references. **Chey's voice is private and
118
+ closed-weight; it is not included or available for download.**
119
+
120
+ The decision-head package is MIT licensed. Gemma backbones, voice models and
121
+ external ASR/identity components retain their own terms; this license does not
122
+ relicense those artifacts.
SHA256SUMS ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ fef48fff1263f86e5b85d289c397da47ef6879eb712e70f8197e27a7b0e912e3 12b/contract.json
2
+ 557d538a1043b7ae3563f217d9b0bee0217672ec48216d9a7f71cef4e9475b22 12b/head.npz
3
+ 6f5ba07f52656a2540b54cb8e93e277e9541601c5d375f585d8945dac5757982 LICENSE
4
+ ea098ae1d0f60b86fa73b31cfe4bbde92b56e2b884afa065548a37eaabf8edba README.md
5
+ 61a92e01a1ffdd096fd7b070cef8a0ed14ac3602428e06b253c500589e79bebc e4b/contract.json
6
+ 5d988f9045047c66621843cd4c24dba18a129346cd33c103a5bc72c504752a48 e4b/head.npz
7
+ b242323de6647b8dabd16f4d92995282174ef12e2dd6abc231595d22dc70b18a gemma4-12B-decision-head.gguf
8
+ 64c71b7e9a5ac99a42890f358e757d64c47c81693d7b975c8c24077ec82626f5 gemma4-E4B-decision-head.gguf
e4b/contract.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "answer_channel_seed": false,
3
+ "calibration_scope": "authored calibration families only",
4
+ "capture_boundary": "post-output-norm final prompt token; before generated-token forward",
5
+ "dataset_manifest_sha256": "7840167f3a5dd4ea55c52163953b829232f8525a8a9ef42b2a9d7ce3ec0f0483",
6
+ "deployment_status": "offline_candidate_not_deployed",
7
+ "engine_revision": "c304f086a40c46ae4b67d5402738769dc12132a6",
8
+ "feature_kind": "hidden",
9
+ "head_sha256": "5d988f9045047c66621843cd4c24dba18a129346cd33c103a5bc72c504752a48",
10
+ "hidden_dim": 2560,
11
+ "input_format": "trio_sound_event_v2_staged_history",
12
+ "layer": 42,
13
+ "model": "e4b",
14
+ "model_sha256": "df0fd4ee07072c607c29a0a1cb4f98918426cca12f45a2776bdd6ee6d09a4de3",
15
+ "task": "final_prompt-action"
16
+ }
e4b/head.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5d988f9045047c66621843cd4c24dba18a129346cd33c103a5bc72c504752a48
3
+ size 1850215
gemma4-12B-decision-head.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b242323de6647b8dabd16f4d92995282174ef12e2dd6abc231595d22dc70b18a
3
+ size 2985792
gemma4-E4B-decision-head.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:64c71b7e9a5ac99a42890f358e757d64c47c81693d7b975c8c24077ec82626f5
3
+ size 1992512