decider-ai 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. decider_ai-1.0.0/LICENSE +190 -0
  2. decider_ai-1.0.0/PKG-INFO +318 -0
  3. decider_ai-1.0.0/README.md +281 -0
  4. decider_ai-1.0.0/decider/__init__.py +0 -0
  5. decider_ai-1.0.0/decider/bench/__init__.py +0 -0
  6. decider_ai-1.0.0/decider/bench/engine.py +82 -0
  7. decider_ai-1.0.0/decider/bench/latency.py +31 -0
  8. decider_ai-1.0.0/decider/bench/loadtest.py +50 -0
  9. decider_ai-1.0.0/decider/bench/mps.py +110 -0
  10. decider_ai-1.0.0/decider/bench/public_suite.py +60 -0
  11. decider_ai-1.0.0/decider/bench/schema.py +59 -0
  12. decider_ai-1.0.0/decider/card_table.py +32 -0
  13. decider_ai-1.0.0/decider/data/__init__.py +15 -0
  14. decider_ai-1.0.0/decider/data/augment.py +268 -0
  15. decider_ai-1.0.0/decider/data/core.py +696 -0
  16. decider_ai-1.0.0/decider/data/mixture.py +227 -0
  17. decider_ai-1.0.0/decider/data/rules.py +398 -0
  18. decider_ai-1.0.0/decider/data/tasks_agents.py +144 -0
  19. decider_ai-1.0.0/decider/data/tasks_extended.py +442 -0
  20. decider_ai-1.0.0/decider/data/tasks_heldout.py +65 -0
  21. decider_ai-1.0.0/decider/data/teacher_contrastive.py +180 -0
  22. decider_ai-1.0.0/decider/data/teacher_labels.py +64 -0
  23. decider_ai-1.0.0/decider/data/teacher_questions.py +222 -0
  24. decider_ai-1.0.0/decider/data/teacher_situations.py +59 -0
  25. decider_ai-1.0.0/decider/engine.py +207 -0
  26. decider_ai-1.0.0/decider/evaluate.py +101 -0
  27. decider_ai-1.0.0/decider/fp8.py +54 -0
  28. decider_ai-1.0.0/decider/games/__init__.py +0 -0
  29. decider_ai-1.0.0/decider/games/envs.py +273 -0
  30. decider_ai-1.0.0/decider/games/frames_dagger.py +44 -0
  31. decider_ai-1.0.0/decider/games/frames_data.py +63 -0
  32. decider_ai-1.0.0/decider/games/mario.py +164 -0
  33. decider_ai-1.0.0/decider/games/mario_data.py +64 -0
  34. decider_ai-1.0.0/decider/games/mario_rl.py +168 -0
  35. decider_ai-1.0.0/decider/games/montage.py +71 -0
  36. decider_ai-1.0.0/decider/games/pixels.py +52 -0
  37. decider_ai-1.0.0/decider/games/play.py +33 -0
  38. decider_ai-1.0.0/decider/games/rl.py +145 -0
  39. decider_ai-1.0.0/decider/games/table.py +18 -0
  40. decider_ai-1.0.0/decider/infer.py +277 -0
  41. decider_ai-1.0.0/decider/metrics.py +37 -0
  42. decider_ai-1.0.0/decider/model.py +47 -0
  43. decider_ai-1.0.0/decider/mps_ops.py +264 -0
  44. decider_ai-1.0.0/decider/probes/__init__.py +0 -0
  45. decider_ai-1.0.0/decider/probes/applications.py +115 -0
  46. decider_ai-1.0.0/decider/probes/batteries.py +141 -0
  47. decider_ai-1.0.0/decider/probes/cua_s1_forms.py +56 -0
  48. decider_ai-1.0.0/decider/probes/independence.py +54 -0
  49. decider_ai-1.0.0/decider/probes/isolated.py +60 -0
  50. decider_ai-1.0.0/decider/prompt.py +157 -0
  51. decider_ai-1.0.0/decider/report.py +68 -0
  52. decider_ai-1.0.0/decider/schema_engine.py +143 -0
  53. decider_ai-1.0.0/decider/serve.py +289 -0
  54. decider_ai-1.0.0/decider/systemone.py +139 -0
  55. decider_ai-1.0.0/decider/train.py +142 -0
  56. decider_ai-1.0.0/decider/vision/__init__.py +8 -0
  57. decider_ai-1.0.0/decider/vision/data.py +72 -0
  58. decider_ai-1.0.0/decider/vision/mixture.py +29 -0
  59. decider_ai-1.0.0/decider/vision/model.py +84 -0
  60. decider_ai-1.0.0/decider/vision/train.py +77 -0
  61. decider_ai-1.0.0/decider/vision/transplant.py +24 -0
  62. decider_ai-1.0.0/decider_ai.egg-info/PKG-INFO +318 -0
  63. decider_ai-1.0.0/decider_ai.egg-info/SOURCES.txt +70 -0
  64. decider_ai-1.0.0/decider_ai.egg-info/dependency_links.txt +1 -0
  65. decider_ai-1.0.0/decider_ai.egg-info/requires.txt +29 -0
  66. decider_ai-1.0.0/decider_ai.egg-info/top_level.txt +1 -0
  67. decider_ai-1.0.0/pyproject.toml +28 -0
  68. decider_ai-1.0.0/setup.cfg +4 -0
  69. decider_ai-1.0.0/tests/test_mps_ops.py +123 -0
  70. decider_ai-1.0.0/tests/test_prompt.py +73 -0
  71. decider_ai-1.0.0/tests/test_rules.py +34 -0
  72. decider_ai-1.0.0/tests/test_systemone.py +92 -0
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, or other
168
+ liability obligations and/or rights consistent with this License.
169
+ However, in accepting such obligations, You may act only on Your
170
+ own behalf and on Your sole responsibility, not on behalf of any
171
+ other Contributor, and only if You agree to indemnify, defend, and
172
+ hold each Contributor harmless for any liability incurred by, or
173
+ claims asserted against, such Contributor by reason of your
174
+ accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2026 Mark Marosi
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
@@ -0,0 +1,318 @@
1
+ Metadata-Version: 2.4
2
+ Name: decider-ai
3
+ Version: 1.0.0
4
+ Summary: One-pass typed decisions with calibrated probabilities: decider-2b, decider-35b-a3b and the training recipe
5
+ Author: Mark Marosi
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Repository, https://github.com/Mapika/decider
8
+ Project-URL: Weights, https://huggingface.co/Mapika/decider-2b
9
+ Project-URL: Changelog, https://github.com/Mapika/decider/blob/main/docs/CHANGELOG.md
10
+ Requires-Python: >=3.11
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: torch
14
+ Requires-Dist: transformers>=5
15
+ Requires-Dist: flash-linear-attention
16
+ Requires-Dist: numpy<2
17
+ Requires-Dist: huggingface_hub
18
+ Provides-Extra: serve
19
+ Requires-Dist: fastapi; extra == "serve"
20
+ Requires-Dist: uvicorn[standard]; extra == "serve"
21
+ Requires-Dist: httpx; extra == "serve"
22
+ Provides-Extra: train
23
+ Requires-Dist: datasets; extra == "train"
24
+ Requires-Dist: accelerate; extra == "train"
25
+ Requires-Dist: scikit-learn; extra == "train"
26
+ Requires-Dist: pillow; extra == "train"
27
+ Provides-Extra: games
28
+ Requires-Dist: gymnasium; extra == "games"
29
+ Requires-Dist: gym-super-mario-bros; extra == "games"
30
+ Requires-Dist: nes-py; extra == "games"
31
+ Requires-Dist: minigrid; extra == "games"
32
+ Requires-Dist: ale-py; extra == "games"
33
+ Requires-Dist: imageio; extra == "games"
34
+ Provides-Extra: metal
35
+ Requires-Dist: mlx>=0.20; (sys_platform == "darwin" and platform_machine == "arm64") and extra == "metal"
36
+ Dynamic: license-file
37
+
38
+ # decider: one-pass typed decisions with calibrated probabilities
39
+
40
+ [![tests](https://github.com/Mapika/decider/actions/workflows/tests.yml/badge.svg)](https://github.com/Mapika/decider/actions/workflows/tests.yml)
41
+ [![weights](https://img.shields.io/badge/%F0%9F%A4%97%20weights-Mapika%2Fdecider--2b-yellow)](https://huggingface.co/Mapika/decider-2b)
42
+ [![license](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
43
+
44
+ A language model that does not generate text. It reads a **state** and a set of **typed questions** and returns, from one
45
+ forward pass, a probability distribution for every question.
46
+
47
+ A typed decision is a question with a fixed answer set: **Choice** over 2 to 255 options, **Score** over 2 to 10 described
48
+ levels, or **Noul**, the probability of yes. There is no decoding, no parsing, and no output outside the options you defined.
49
+
50
+ ![the model playing ten games from text state descriptions, plus Super Mario Bros with the RL checkpoint](media/montage.gif)
51
+
52
+ *Ten text games and Super Mario Bros, each move one typed decision over the legal actions; see `decider/games/` and
53
+ `docs/HISTORY.md`.*
54
+
55
+ <p align="center">
56
+ <img width="55%" src="media/pong_35b.gif" alt="Atari Pong played from RAM-derived text state by decider-35b-a3b as released (left) and with the games-RL overlay (right)">
57
+ <img width="44%" src="media/vision_2b.gif" alt="decider-2b-vision answering ten held-out image questions with the served probability on every option">
58
+ </p>
59
+
60
+ *Left: Atari Pong, same seed twice, decider-35b-a3b as released (left half) and the same weights with the games-RL overlay (right half). The model never sees the picture: it reads a text state built from the console RAM and picks
61
+ up, down or stay, one forward pass per decision, 43 ms median on one B300 in bf16 without CUDA graphs. Released weights lose
62
+ 21-0; the overlay is at -3 when the clip ends. The overlay is an experiment, not a released checkpoint. Right:
63
+ `decider-2b-vision` on ten held-out image questions, chosen by a fixed rule that includes the confident wrong answers, not the
64
+ ten best. Gold is marked in green; 87% of 71 scored rows were correct; 59 ms median per image. The clips are recorded frames,
65
+ nothing is edited inside a clip; [docs/DEMOS.md](docs/DEMOS.md) gives checkpoints, seeds, timers and the games-RL run.*
66
+
67
+ **Independence.** This is an independent project. It is not affiliated with or endorsed by TypeSafe AI. It is an open
68
+ reproduction of the "System One" model class (TypeSafe AI's *Jev*): a 2B model built on `Qwen/Qwen3.5-2B-Base` and a 35B
69
+ mixture-of-experts model built on `Qwen/Qwen3.5-35B-A3B-Base`. The training mixture is public datasets plus data labelled by a
70
+ local Qwen3.5-27B teacher (`teacher_data/`, `decider/data/mixture.py`). Nothing was distilled from Jev.
71
+
72
+ **Contents:** [What's new](#whats-new) · [Standing](#standing) · [Models](#models) · [Runs on](#runs-on) ·
73
+ [Quick start](#quick-start) · [Train your own](#train-your-own) · [How it works](#how-it-works) ·
74
+ [Limits](#limits-stated-plainly) · [Results](docs/RESULTS.md)
75
+
76
+ ## What's new
77
+
78
+ * **2026-09-22 — On PyPI as `decider-ai`** (the import name stays `decider`).
79
+ * **2026-09-22 — Apple Silicon.** MPS acceleration for the dense models (0.8B, 2B, 2B vision), merged from pull request #2 by
80
+ **@simply-sunny**. See [Runs on](#runs-on).
81
+ * **2026-09-20 — decider-35b-a3b v1**, and its NVFP4 build. The supervised recipe on Qwen3.5-35B-A3B-Base, routed experts
82
+ frozen, Muon on the block matrices; above decider-2b v10 on 93 of 95 regression tasks; no RL stage.
83
+ * **2026-09-19 — decider-2b v10.** The v8 weights plus 384 steps of calibration-aware RL on live browser tasks and exact
84
+ games: sampled browser play 83% to 93%, belief 0.47 to 0.22 nats above the exact laws, everything else unchanged.
85
+
86
+ Earlier versions, v1 to v9, are in [docs/CHANGELOG.md](docs/CHANGELOG.md), with the per-stage measurements in
87
+ [docs/HISTORY.md](docs/HISTORY.md).
88
+
89
+ ## Standing
90
+
91
+ Two third-party leaderboards rank this model class. Both were read on the dates given; we did not run them.
92
+
93
+ **JevBench**, read 2026-09-21 ([Benchmark Heaven](https://benchmarkheaven.com/jev-models), harness at
94
+ [fstandhartinger/jevbench](https://github.com/fstandhartinger/jevbench)). 36 entries; the total score combines four axes, and
95
+ speed and cost are measured from the operator's server.
96
+
97
+ | system | score | intelligence | calibration | speed | cost |
98
+ |---|---|---|---|---|---|
99
+ | Jev 1.13.0 (TypeSafe AI, #1) | 75.4 | 90.4 | 82.7 | 83.3 | 52.0 |
100
+ | SemIf (Qwen3.5-4B, #2) | 74.7 | 85.9 | 72.6 | 83.7 | 59.5 |
101
+ | **decider-35b-a3b** (#10 of 36) | 68.9 | 86.3 | 71.5 | 80.8 | 45.3 |
102
+ | **decider-2b** (#21 of 36) | 64.6 | 73.8 | 46.6 | 83.2 | 61.0 |
103
+
104
+ Our 35B is pulled down by cost (45.3, priced as a 35B), the 2B by calibration (46.6).
105
+
106
+ **Decision Index**, edition v0.1 dated 2026-09-22
107
+ ([leaderboard](https://multimodalart-jev-decision-index.static.hf.space), kit at
108
+ [apolinario/decision-index](https://github.com/apolinario/decision-index)). 32 entries, 132,422 requests, 37 benchmarks,
109
+ scored on a 19-benchmark panel.
110
+
111
+ | system | score | rank |
112
+ |---|---|---|
113
+ | Jev | 59.5 | 1 |
114
+ | jevfire (zero-training wrapper on a stock 27B-class model) | 55.7 | 2 |
115
+ | joshua-diffusion (zero-training wrapper on a stock 27B-class model) | 55.6 | 3 |
116
+ | **decider-35b-a3b (NVFP4)** | 54.3 | 4 |
117
+ | **decider-2b** | 44.0 | 14 |
118
+
119
+ decider-35b-a3b is fourth of 32 and the highest-scoring trained model on this edition; the two entries above it are
120
+ zero-training wrappers.
121
+
122
+ ### Where Jev leads
123
+
124
+ The gap to Jev is the knowledge area. Per-area scores on the Decision Index panel, decider-35b-a3b against Jev:
125
+
126
+ | area | decider-35b-a3b | Jev |
127
+ |---|---|---|
128
+ | knowledge (GPQA, GSM8K, CRUXEval, MMLU) | 0.51 | 0.69 |
129
+ | language | 0.61 | 0.62 |
130
+ | retrieval | 0.34 | 0.37 |
131
+ | tools | 0.72 | 0.73 |
132
+ | arts | 0.53 | 0.56 |
133
+
134
+ Language, retrieval, tools and arts are within 0.03. Knowledge is 0.18 behind, on GPQA, GSM8K, CRUXEval and MMLU. The same
135
+ weakness shows on JevBench's 111 public hard items, which are long policy texts, multi-hop and temporal-numeric reasoning:
136
+ decider-35b-a3b 0.676 and decider-2b 0.459 against Jev's 0.730 (our runner and the harness's own per-task file, same items). The other axis we lose there is calibration on hard items; see
137
+ [Limits](#limits-stated-plainly).
138
+
139
+ ## Models
140
+
141
+ Held-out means no example of that dataset was trained on. The regression set has 28 held-out tasks, the 94-task set 24; the
142
+ two are not comparable to each other, and the NVFP4 row is measured against the bf16 build rather than on a held-out set.
143
+ [docs/RESULTS.md](docs/RESULTS.md) has all of them in full.
144
+
145
+ | model | base | parameters | context | held-out accuracy | weights |
146
+ |---|---|---|---|---|---|
147
+ | decider-2b **v10** | Qwen3.5-2B-Base | 1.9B | 32k tokens | 0.755 (regression set) | [Mapika/decider-2b](https://huggingface.co/Mapika/decider-2b) |
148
+ | decider-35b-a3b **v1** | Qwen3.5-35B-A3B-Base | 34.7B total, 3B active | 32k tokens | 0.810 (regression set) | [Mapika/decider-35b-a3b](https://huggingface.co/Mapika/decider-35b-a3b) |
149
+ | decider-35b-a3b-nvfp4 | the 35B in NVFP4, 19.6 GB | 34.7B total, 3B active | 32k tokens | 1.0 to 1.5 points under bf16 in vLLM | [Mapika/decider-35b-a3b-nvfp4](https://huggingface.co/Mapika/decider-35b-a3b-nvfp4) |
150
+ | decider-0.8b | Qwen3.5-0.8B-Base | 0.8B | 32k tokens | 0.71 (94-task set) | [Mapika/decider-0.8b](https://huggingface.co/Mapika/decider-0.8b) |
151
+ | decider-2b-vision | Qwen3.5-2B vision-language, v5 text weights | 1.9B | 32k tokens | Visual7W 0.89 (see MODEL_CARD_VISION.md) | [Mapika/decider-2b-vision](https://huggingface.co/Mapika/decider-2b-vision) |
152
+
153
+ The v8 weights stay available under the Hub tag `v8`. A 4B model is trained and under evaluation; it is not released. decider-2b-vision has a
154
+ [browser demo](https://huggingface.co/spaces/hugging-apps/decider-2b-vision-demo), a Space built by the Hugging Face team.
155
+
156
+ ## Runs on
157
+
158
+ * **CUDA.** bf16, `torch.compile`, shape-bucketed CUDA graphs, optional FP8 (e4m3) linears. The 2B needs about 4 GB, the 35B
159
+ 65 GB in bf16 or 19.6 GB in NVFP4.
160
+ * **Apple Silicon, MPS.** Merged 2026-09-22 from pull request #2 by **@simply-sunny**. On an M1 Pro in float16, across the
161
+ three 2B smoke-test workloads, the median request is 133 ms with the patch and 171 ms without it; on the held-out MASSIVE
162
+ Scenario set (1,500 examples, temperature 1.30) the MPS path scores accuracy 0.7553 and ECE 0.0438 against the published
163
+ bf16 row's 0.756 and 0.041. Conditions: `docs/benchmarks/mps-full-model.md`, `docs/benchmarks/mps-heldout.md`.
164
+ * **CPU.** The unit tests run without a GPU: `python -m pytest tests`.
165
+
166
+ ## Quick start
167
+
168
+ ```bash
169
+ pip install decider-ai # or: git clone https://github.com/Mapika/decider && pip install -e ".[serve]"
170
+ ```
171
+
172
+ On Apple Silicon, `pip install "decider-ai[metal]"` adds the optional MLX/Metal kernel. Without it, MPS inference uses the PyTorch implementation.
173
+
174
+ ```python
175
+ from decider.infer import Decider
176
+ d = Decider("Mapika/decider-2b") # one CUDA GPU, bf16, about 4 GB; downloads the weights on first use
177
+ d.system_one(
178
+ {"ticket": {"messages": [{"from": "customer", "text": "I was charged twice for order A-104. Please refund the duplicate."}]},
179
+ "refund_policy": "Duplicate charges are eligible for a refund."},
180
+ {"department": {"type": "choice", "instructions": "Which team should handle this?",
181
+ "criteria": {"returns": "Exchanges, refunds, wrong or damaged items", "billing": {"what": "Charges, invoices", "not_for": "delivery"}, "other": None}},
182
+ "refund_requested": {"type": "noul", "instructions": "Does `ticket.messages[0].text` request a refund?"},
183
+ "frustration": {"type": "score", "instructions": "How frustrated is the customer?", "criteria": ["calm", "frustrated", "very frustrated"]}})
184
+ # {"answers": {"department": {"choice": "billing", "confidence": 0.56, "certainty": 0.37, "probabilities": {"returns": 0.44, "billing": 0.56, "other": 0.00}},
185
+ # "refund_requested": {"noul": 0.99},
186
+ # "frustration": {"score": 0.76, "probabilities": {"0": 0.34, "1": 0.55, "2": 0.10}, "level_fit": {"0": 0.34, "1": 0.55, "2": 0.10}, "fit_mass": 0.99}}}
187
+ # (v10 weights; "returns" also mentions refunds, so the mass is split)
188
+
189
+ d.decide("My card was charged twice.", [{"question": "Which team?", "options": ["billing", "technical", "sales"]}])
190
+ # [{"choice": "billing", "confidence": 0.77, "probs": {"billing": 0.77, "technical": 0.19, "sales": 0.04}}] the plain form
191
+ ```
192
+
193
+ `examples/` has three complete programs: confidence-gated routing, composite scoring, and a hierarchical beam over Choice
194
+ probabilities.
195
+
196
+ ### HTTP server
197
+
198
+ ```bash
199
+ scripts/serve.sh Mapika/decider-2b 8000
200
+ ```
201
+
202
+ `POST /v1/systemone` is TypeSafe's wire format, so their SDKs work unchanged with `TYPESAFE_BASE_URL=http://localhost:8000`;
203
+ `POST /decide` is the plain form. A schema seen twice gets a cached prefix and its own CUDA graphs.
204
+
205
+ ## Train your own
206
+
207
+ ```bash
208
+ uv venv --python 3.12 .venv312 && uv pip install -p .venv312/bin/python -e ".[serve,train]"
209
+ scripts/train.sh full # datasets -> data/tasks.pkl -> data/mixture_full.pkl -> one epoch from Qwen3.5-2B-Base -> scripts/evaluate.sh
210
+ scripts/train.sh delta runs/some/model # or: continue an existing decider checkpoint on the new formats + a replay sample
211
+ ```
212
+
213
+ The full recipe and the data builders are in this repository: `decider/data/` downloads and converts about 95 public datasets
214
+ and assembles the mixture (`decider/data/mixture.py` lists every component with its size), `decider/train.py` is the
215
+ fine-tune, `scripts/evaluate.sh` scores it. One epoch is 1.47M examples and 455M tokens, 5.3 h on a GH200 plus 45 min of
216
+ evaluation, and it reproduces the released supervised weights: it matches v9 on the 94-task set (in-task 0.809 against 0.812,
217
+ held-out 0.739 against 0.741) and every probe family within noise, with a fitted temperature of 1.03 instead of 1.36.
218
+
219
+ The RL stage that turns v8 into v10 ([docs/RL.md](docs/RL.md)) needs a live Chrome with MiniWoB++, the exact game environments
220
+ and the training loop of a separate research repository; it is not in this package yet.
221
+
222
+ ## How it works
223
+
224
+ ```mermaid
225
+ flowchart LR
226
+ S["state<br/>text or JSON"] --> P["one prompt with<br/>one answer slot<br/>per question"]
227
+ Q["typed questions<br/>Choice / Score / Noul"] --> P
228
+ P --> F["one forward pass"]
229
+ F --> L["letter logits at<br/>each answer slot"]
230
+ L --> T["softmax over the valid<br/>options at a fitted<br/>temperature"]
231
+ T --> O["one probability distribution<br/>per question"]
232
+ ```
233
+
234
+ `decider/prompt.py` renders a request as text with one answer slot per question. `decider/model.py` reads the hidden state at
235
+ each slot, projects it onto one label token per option (A-J, then K-Z and two-letter tokens up to 255) and softmaxes over the
236
+ valid ones. Letters are never generated, so all slots come out of one pass. The temperature is fitted once on in-task data and
237
+ checked on held-out tasks. Every question can also be scored in its own row, and then adding, removing or reordering questions
238
+ cannot change another answer; every Score level is judged alone, without its number or its neighbours.
239
+
240
+ Two prompt layouts are trained, 50/50. **State-first** (`Context ... Question ... Options ... Answer: (`) is the default.
241
+ **Schema-first** puts the question and option blocks before the state, so they form a prefix that does not depend on the
242
+ state: `decider/schema_engine.py` runs that prefix once per schema, keeps its cache read-only, and a request then runs only
243
+ `Context: <state>` plus the slots, as a CUDA graph per (batch, length) bucket. Schema-first trades accuracy for speed, so the
244
+ cache is opt-in; the cost is measured in [docs/RESULTS.md](docs/RESULTS.md).
245
+
246
+ ### Calibration
247
+
248
+ ![belief excess over the exact laws, and click-outcome prediction, v8 against v10](media/v10_calibration.png)
249
+
250
+ Calibration is what the v10 RL objective trains directly. For every action in a game with a known probability law the model
251
+ is asked what will happen next, and its answer is scored against the exact law with a log score: v10 is 0.22 nats above the
252
+ law where v8 was 0.47. In the browser it predicts the outcome of its own click at a log score of −0.03 against −0.35.
253
+
254
+ ## Limits, stated plainly
255
+
256
+ * **One pass cannot do multi-step arithmetic.** There is no chain of thought and no intermediate state, so GSM8K-type items,
257
+ temporal arithmetic and multi-hop chains are out of reach. Split such a judgment into several questions.
258
+ * **Calibration on hard items is the weak axis.** decider-2b's top-label ECE on JevBench's hard items is 0.30: it is
259
+ confident where it is wrong there, which is what pulls its calibration axis to 46.6. The 35B's hard-tier ECE is 0.15.
260
+ * **Knowledge-heavy multiple choice.** decider-2b improves little over its base model on MMLU and MedQA. decider-35b-a3b
261
+ closes part of that gap (MMLU +19 points, hard tier 0.68) at 3 to 4 times the cost per decision and without the RL stage.
262
+ * **Optimizer setting on the 35B.** decider-35b-a3b was trained with FP32 master weights (Muon on the block matrices, AdamW
263
+ elsewhere). In later controlled runs that setting moved small models further from their base than the same schedule
264
+ without a master copy, and cost accuracy on knowledge tasks. The 2B was trained without a master copy and is not affected.
265
+ A 35B retrain without it is planned.
266
+ * **English only.** Calibration is measured on public datasets and teacher-labelled probes, not on your traffic.
267
+ * **The schema cache costs accuracy.** Use it for fixed classification-style schemas with short states; see docs/RESULTS.md.
268
+ * **Generic options need to look like buckets.** v10 continues the v8 weights, so the v9 terse-bucket result (generic 0.86)
269
+ does not apply to it; v8's 0.59 does. A plain `support` next to `other` sends an in-scope complaint to `other`.
270
+ * **Rules written into the question are not followed at this size.** On the form-filling probe a one-sentence question scores
271
+ 0.67 and a paragraph of rules 0.24. A fixed convention has to be in the training data, not in the question.
272
+ * **Picking a record out of a long JSON array by position is the least accurate input shape** (0.51 with 64 records against
273
+ 0.70 with one). Address records by key, or let `render_state` write the index into the array (0.62).
274
+ * **Known regressions.** TREC-fine with all 50 labels fell from 0.76 (v6) to 0.72 (v8). Held-out Freeway play fell to 0 and
275
+ did not come back when the game data was replayed. OpenJev is 0.8 points lower on v10 than on v8.
276
+ * **Teacher bias.** The custom-question data is labelled by a 27B teacher that shares some of the biases it is meant to fix;
277
+ it agreed with only 72% of its own generic-option labels. `decider/data/mixture.py` shows how they are filtered.
278
+ * **Browser results are narrow.** They are on the 22 click-only MiniWoB++ tasks: small synthetic pages, elements listed as
279
+ text. Typing, scrolling and real websites were not tested.
280
+ * **The vision variant** (`decider/vision`) is still on v5 text weights and is retraining.
281
+ * **Reproduction is not byte-identical.** The released weights were produced by staged continuation runs; `scripts/train.sh
282
+ full` reproduces the supervised stages in one run, and the 16-to-60-case hand-written probes move by a few cases either
283
+ way.
284
+
285
+ ## Repository layout
286
+
287
+ ```
288
+ decider/prompt.py the two prompt layouts, label table, answer slots
289
+ decider/model.py DecisionModel: backbone -> slot hidden states -> option logits
290
+ decider/systemone.py Choice / Score / Noul with criteria -> prompt rows; typed answers; isolated levels
291
+ decider/infer.py Decider: system_one(), schema() (compiled, cached question sets), decide()
292
+ decider/engine.py CUDA graphs, torch.compile, shared-prefix scoring; fp8.py, schema_engine.py, mps_ops.py
293
+ decider/serve.py HTTP server: /v1/systemone, /decide, continuous batching
294
+ decider/data/ ~95 public datasets, input-shape augmentations, the mixture, the 27B teacher data
295
+ decider/train.py cross-entropy fine-tune; evaluate.py accuracy / NLL / Brier / ECE / AURC per task
296
+ decider/probes/ hand-written batteries, question independence, isolated levels
297
+ decider/bench/ engine, schema-cache and MPS benchmarks, HTTP load test, Bespoke's public suite
298
+ decider/games/ ten text games + Super Mario Bros behind the same interface, imitation and PPO
299
+ decider/vision/ the vision-language variant (decisions from pixels)
300
+ moe/ frozen-expert Muon training, evaluation and NVFP4 quantization for decider-35b-a3b
301
+ scripts/ examples/ tests/ teacher_data/ media/
302
+ docs/ RESULTS.md (every measurement), CHANGELOG.md, HISTORY.md, RL.md, benchmarks/ (MPS)
303
+ ```
304
+
305
+ ## Citation
306
+
307
+ ```bibtex
308
+ @software{marosi2026decider,
309
+ author = {Marosi, Mark},
310
+ title = {decider: one-pass typed decisions with calibrated probabilities},
311
+ year = {2026},
312
+ url = {https://github.com/Mapika/decider}
313
+ }
314
+ ```
315
+
316
+ ## License
317
+
318
+ Apache 2.0. See [LICENSE](LICENSE).