JohnP1 commited on
Commit
d2149d2
·
verified ·
1 Parent(s): c218349

v0.6.1: routing temperature (use_case_temperatures.routing), same weights as v0.6 (jonpol01/d1a#264)

Browse files
Files changed (2) hide show
  1. README.md +7 -4
  2. d1a_config.json +125 -35
README.md CHANGED
@@ -10,6 +10,8 @@ tags: [mlx, gemma4, d1a, decision-model, structured-output, classification, appl
10
 
11
  # D1A-E4B v0.6 · MLX 8-bit
12
 
 
 
13
  **A small decision model for Apple Silicon: give it a document and a few questions, and it picks the answers.** Each question
14
  is yes/no, multiple choice or a score; D1A returns a calibrated probability for every option in one forward pass, with no
15
  generated text, so every answer is a valid option. About 0.6 s per request on an M4 Mac mini, 6 GB on disk.
@@ -20,7 +22,7 @@ small pointer head. Questions in English; documents in English or Japanese.
20
 
21
  ```python
22
  from d1a import D1A # pip install "d1a[serve,media] @ git+https://github.com/jonpol01/d1a@v0.5.0"
23
- m = D1A.load("mlx-community/d1a-e4b-8bit@v0.6")
24
  m.decide("The customer was charged twice for the same order and wants a refund today.",
25
  {"team": {"type": "choice", "instructions": "Which team handles this?",
26
  "criteria": {"billing": None, "shipping": None, "support": None}},
@@ -134,10 +136,10 @@ On Apple Silicon (the PyTorch checkpoint, for NVIDIA GPUs and CPUs, is [JohnP1/d
134
 
135
  ```bash
136
  pip install "d1a[serve,media] @ git+https://github.com/jonpol01/d1a@v0.5.0"
137
- python -m d1a.serving.serve --run mlx-community/d1a-e4b-8bit@v0.6 --port 8009
138
  ```
139
 
140
- or in-process: `from d1a import D1A; D1A.load("mlx-community/d1a-e4b-8bit@v0.6").decide(state, questions)`. For hard-v1-style reasoning or the older PR-label conventions, load `JohnP1/d1a-e4b-mlx-q8@v0.5`.
141
 
142
  ## Limits
143
 
@@ -145,7 +147,7 @@ or in-process: `from d1a import D1A; D1A.load("mlx-community/d1a-e4b-8bit@v0.6")
145
  - **Change type on older PRs is worse**: 85.3% against 89.4% on the frozen English test set, and 72.5% against 76.2% on the Japanese one (all questions, 92 PRs). It calls more PRs type/bug than v0.5 did. On current PRs it is better (above).
146
  - **Blast radius on the owner's own repositories is worse**: 67% against 74% on 39 hand-checked PRs (1 fix, 4 breaks). v0.6 was not trained for blast radius; on the larger frozen test set it is 62% against 58%.
147
  - Severity: on the 487 newer PRs, P2 recall falls (0.55 against v0.5's 0.79) while P3 and P0 rise; P0 rests on 7 PRs. Severity on the older development set is 1.8 points lower.
148
- - One temperature for every question, and no use-case temperatures (routing's is planned for v0.6.1). Calibration error is higher than v0.5's on JGLUE, dates and typesafe-v1.
149
  - Smaller losses against v0.5: decision-v7 −1.4, wanli-v1 −2.3, one of 45 hand-labelled routing questions.
150
  - The recent PR labels come from one large open-source project and a few days of it; if its conventions move again, so will these numbers.
151
  - Questions are in English; the documents can be English or Japanese.
@@ -161,6 +163,7 @@ Earlier versions (every tag below), the PyTorch checkpoint and the Core ML build
161
  | `v0.3` | pull-request labeling, English and Japanese |
162
  | `v0.4` | pull-request labeling round 2: severity, Japanese, less biased blast radius |
163
  | `v0.5` | Kev's harder skills back (hard, developer-tool and long-document decisions), PR labels held |
 
164
  | **`v0.6`** | **current pull-request labels (severity +4.3, type +3.9 on newer PRs); a release exception: hard decisions −2.7, so pin `v0.5` for those** |
165
 
166
  Older tag names (`v0.1-2epoch`, `v0.1.1-2epoch-calibrated`, `v0.2-hybrid`) still work.
 
10
 
11
  # D1A-E4B v0.6 · MLX 8-bit
12
 
13
+ **v0.6.1 (2026-10-13)** is v0.6 with one addition, a routing temperature: requests sent with `"use_case": "routing"` are served at T 1.18 instead of 1.95, which brings factory routing's calibration error from 0.093 to 0.026 without changing any answer. The weights and every result below are v0.6's.
14
+
15
  **A small decision model for Apple Silicon: give it a document and a few questions, and it picks the answers.** Each question
16
  is yes/no, multiple choice or a score; D1A returns a calibrated probability for every option in one forward pass, with no
17
  generated text, so every answer is a valid option. About 0.6 s per request on an M4 Mac mini, 6 GB on disk.
 
22
 
23
  ```python
24
  from d1a import D1A # pip install "d1a[serve,media] @ git+https://github.com/jonpol01/d1a@v0.5.0"
25
+ m = D1A.load("mlx-community/d1a-e4b-8bit@v0.6.1")
26
  m.decide("The customer was charged twice for the same order and wants a refund today.",
27
  {"team": {"type": "choice", "instructions": "Which team handles this?",
28
  "criteria": {"billing": None, "shipping": None, "support": None}},
 
136
 
137
  ```bash
138
  pip install "d1a[serve,media] @ git+https://github.com/jonpol01/d1a@v0.5.0"
139
+ python -m d1a.serving.serve --run mlx-community/d1a-e4b-8bit@v0.6.1 --port 8009
140
  ```
141
 
142
+ or in-process: `from d1a import D1A; D1A.load("mlx-community/d1a-e4b-8bit@v0.6.1").decide(state, questions)`. For hard-v1-style reasoning or the older PR-label conventions, load `JohnP1/d1a-e4b-mlx-q8@v0.5`.
143
 
144
  ## Limits
145
 
 
147
  - **Change type on older PRs is worse**: 85.3% against 89.4% on the frozen English test set, and 72.5% against 76.2% on the Japanese one (all questions, 92 PRs). It calls more PRs type/bug than v0.5 did. On current PRs it is better (above).
148
  - **Blast radius on the owner's own repositories is worse**: 67% against 74% on 39 hand-checked PRs (1 fix, 4 breaks). v0.6 was not trained for blast radius; on the larger frozen test set it is 62% against 58%.
149
  - Severity: on the 487 newer PRs, P2 recall falls (0.55 against v0.5's 0.79) while P3 and P0 rise; P0 rests on 7 PRs. Severity on the older development set is 1.8 points lower.
150
+ - One temperature for every question except routing: from v0.6.1, requests sent with `"use_case": "routing"` are served at T 1.18. Calibration error is higher than v0.5's on JGLUE, dates and typesafe-v1.
151
  - Smaller losses against v0.5: decision-v7 −1.4, wanli-v1 −2.3, one of 45 hand-labelled routing questions.
152
  - The recent PR labels come from one large open-source project and a few days of it; if its conventions move again, so will these numbers.
153
  - Questions are in English; the documents can be English or Japanese.
 
163
  | `v0.3` | pull-request labeling, English and Japanese |
164
  | `v0.4` | pull-request labeling round 2: severity, Japanese, less biased blast radius |
165
  | `v0.5` | Kev's harder skills back (hard, developer-tool and long-document decisions), PR labels held |
166
+ | **`v0.6.1`** | **v0.6's weights with a routing temperature**: `"use_case": "routing"` is served at T 1.18 (others keep 1.95); factory routing calibration error 0.093 → 0.026, answered at ≥ 0.9 confidence 50% → 76%, no answer changed (jonpol01/d1a#264) |
167
  | **`v0.6`** | **current pull-request labels (severity +4.3, type +3.9 on newer PRs); a release exception: hard decisions −2.7, so pin `v0.5` for those** |
168
 
169
  Older tag names (`v0.1-2epoch`, `v0.1.1-2epoch-calibrated`, `v0.2-hybrid`) still work.
d1a_config.json CHANGED
@@ -1,38 +1,128 @@
1
  {
2
- "format": "d1a-mlx",
3
- "format_version": 1,
4
- "base": "google/gemma-4-E4B",
5
- "base_revision": "411aa17b749aa952df1359d2dcea73917a544d9a",
6
- "source": "JohnP1/d1a-e4b",
7
- "source_revision": "3ca01b824280cacf027826b0ded8632f242a7e8b",
8
- "adapter_sha256": "739ce962c3ae630243ee53b212a822e8b2feee41080b68d5b460fd0ebb19e4ea",
9
- "lora": 16,
10
- "head_dim": 256,
11
- "hidden_size": 2560,
12
- "temperature": 1.9543199368684914,
13
- "leading_ids": [
14
- 2
15
- ],
16
- "bos_id": 2,
17
- "delimiter_ids": [
18
- 6,
19
- 7,
20
- 8,
21
- 9,
22
- 10
23
- ],
24
- "pad_id": 0,
25
- "dtype": "bfloat16",
26
- "quantization": {
27
- "group_size": 64,
28
- "bits": 8,
29
- "mode": "affine",
30
- "language_model.model.embed_tokens_per_layer": {
31
- "group_size": 64,
32
- "bits": 4,
33
- "mode": "affine"
34
- },
35
- "embeddings": true
36
  },
37
- "head": "head.safetensors"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  }
 
1
  {
2
+ "format": "d1a-mlx",
3
+ "format_version": 1,
4
+ "base": "google/gemma-4-E4B",
5
+ "base_revision": "411aa17b749aa952df1359d2dcea73917a544d9a",
6
+ "source": "JohnP1/d1a-e4b",
7
+ "source_revision": "3ca01b824280cacf027826b0ded8632f242a7e8b",
8
+ "adapter_sha256": "739ce962c3ae630243ee53b212a822e8b2feee41080b68d5b460fd0ebb19e4ea",
9
+ "lora": 16,
10
+ "head_dim": 256,
11
+ "hidden_size": 2560,
12
+ "temperature": 1.9543199368684914,
13
+ "leading_ids": [
14
+ 2
15
+ ],
16
+ "bos_id": 2,
17
+ "delimiter_ids": [
18
+ 6,
19
+ 7,
20
+ 8,
21
+ 9,
22
+ 10
23
+ ],
24
+ "pad_id": 0,
25
+ "dtype": "bfloat16",
26
+ "quantization": {
27
+ "group_size": 64,
28
+ "bits": 8,
29
+ "mode": "affine",
30
+ "language_model.model.embed_tokens_per_layer": {
31
+ "group_size": 64,
32
+ "bits": 4,
33
+ "mode": "affine"
 
 
34
  },
35
+ "embeddings": true
36
+ },
37
+ "head": "head.safetensors",
38
+ "use_case_temperatures": {
39
+ "routing": 1.1755479062836087
40
+ },
41
+ "use_case_temperature_fits": {
42
+ "routing": {
43
+ "rows": [
44
+ "phase-d3/gate/suites/routing_generic-development/head/rows.json",
45
+ "phase-d3/gate/suites/routing_handlabelled-45/head/rows.json"
46
+ ],
47
+ "n": 315,
48
+ "method": "min micro mean NLL over a 121-point log grid 0.25..4",
49
+ "cross_validation": {
50
+ "raw": {
51
+ "n": 315,
52
+ "ece": 0.005376748980220513,
53
+ "brier": 0.02213792789102334,
54
+ "nll": 0.037784826756766074,
55
+ "confident_error_rate": 0.0031746031746031746,
56
+ "coverage_at_5pct_error": 1.0
57
+ },
58
+ "out_of_fold": {
59
+ "n": 315,
60
+ "ece": 0.008392239537266366,
61
+ "brier": 0.021994761576082954,
62
+ "nll": 0.0385561510340784,
63
+ "confident_error_rate": 0.0031746031746031746,
64
+ "coverage_at_5pct_error": 1.0
65
+ },
66
+ "ece_ci95": {
67
+ "raw": [
68
+ 0.003303220868466807,
69
+ 0.018871250910842064
70
+ ],
71
+ "out_of_fold": [
72
+ 0.0058853472476678124,
73
+ 0.022409565392811873
74
+ ],
75
+ "delta": [
76
+ -0.001788803325547818,
77
+ 0.007955193851064562
78
+ ]
79
+ },
80
+ "separated": false,
81
+ "temperatures": [
82
+ 1.2311444133449163,
83
+ 1.148698354997035,
84
+ 1.2893703084395791,
85
+ 1.2311444133449163,
86
+ 1.0233738919967748
87
+ ],
88
+ "folds": 5,
89
+ "seed": 0,
90
+ "samples": 1000,
91
+ "groups": 315,
92
+ "unit": "source-stratified (source, group); sibling questions and variants stay together"
93
+ },
94
+ "interval": {
95
+ "level": 0.9,
96
+ "samples": 2000,
97
+ "seed": 0,
98
+ "lower": 0.6744039221992122,
99
+ "upper": 1.5157165665103978,
100
+ "questions": 315
101
+ },
102
+ "fit_rows": [
103
+ {
104
+ "rows": "phase-d3/gate/suites/routing_generic-development/head/rows.json",
105
+ "suite": "evals/d1a/routing",
106
+ "split": "generic-development",
107
+ "questions": 270
108
+ },
109
+ {
110
+ "rows": "phase-d3/gate/suites/routing_handlabelled-45/head/rows.json",
111
+ "suite": "evals/d1a/routing",
112
+ "split": "handlabelled-45",
113
+ "questions": 45
114
+ }
115
+ ],
116
+ "training_suites": [
117
+ "evals/v7/decision-v7"
118
+ ],
119
+ "training_partitions": [],
120
+ "in_distribution": {
121
+ "allowed": true,
122
+ "problems": [
123
+ "cannot list the sources of --data train.jsonl (outside evals/, no sidecar train.jsonl.json naming its sources), training data of routing-temp-v061/stub/d1a-e4b"
124
+ ]
125
+ }
126
+ }
127
+ }
128
  }