opendecider 0.1.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.
- opendecider-0.1.0/LICENSE +200 -0
- opendecider-0.1.0/NOTICE +27 -0
- opendecider-0.1.0/PKG-INFO +310 -0
- opendecider-0.1.0/README.md +280 -0
- opendecider-0.1.0/opendecider/__init__.py +70 -0
- opendecider-0.1.0/opendecider/bench_speed.py +64 -0
- opendecider-0.1.0/opendecider/nano.py +59 -0
- opendecider-0.1.0/opendecider/questions.py +89 -0
- opendecider-0.1.0/opendecider/small.py +75 -0
- opendecider-0.1.0/opendecider.egg-info/PKG-INFO +310 -0
- opendecider-0.1.0/opendecider.egg-info/SOURCES.txt +15 -0
- opendecider-0.1.0/opendecider.egg-info/dependency_links.txt +1 -0
- opendecider-0.1.0/opendecider.egg-info/requires.txt +11 -0
- opendecider-0.1.0/opendecider.egg-info/top_level.txt +1 -0
- opendecider-0.1.0/pyproject.toml +39 -0
- opendecider-0.1.0/setup.cfg +4 -0
- opendecider-0.1.0/tests/test_questions.py +48 -0
|
@@ -0,0 +1,200 @@
|
|
|
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 describing the origin of the Work and
|
|
141
|
+
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 accept support,
|
|
167
|
+
indemnity, warranty, or other liability obligations and/or rights
|
|
168
|
+
consistent with this License. However, in accepting such obligations,
|
|
169
|
+
You may act only on Your own behalf and on Your sole responsibility,
|
|
170
|
+
not on behalf of any other Contributor, and only if You agree to
|
|
171
|
+
indemnify, defend, and hold each Contributor harmless for any
|
|
172
|
+
liability incurred by, or claims asserted against, such Contributor
|
|
173
|
+
by reason of your accepting any such warranty or additional liability.
|
|
174
|
+
|
|
175
|
+
END OF TERMS AND CONDITIONS
|
|
176
|
+
|
|
177
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
178
|
+
|
|
179
|
+
To apply the Apache License to your work, attach the following
|
|
180
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
181
|
+
replaced with your own identifying information. (Don't include
|
|
182
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
183
|
+
comment syntax for the file format. We also recommend that a
|
|
184
|
+
file or class name and description of purpose be included on the
|
|
185
|
+
same "printed page" as the copyright notice for easier
|
|
186
|
+
identification within third-party archives.
|
|
187
|
+
|
|
188
|
+
Copyright 2026 Manjunath Janardhan
|
|
189
|
+
|
|
190
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
191
|
+
you may not use this file except in compliance with the License.
|
|
192
|
+
You may obtain a copy of the License at
|
|
193
|
+
|
|
194
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
195
|
+
|
|
196
|
+
Unless required by applicable law or agreed to in writing, software
|
|
197
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
198
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
199
|
+
See the License for the specific language governing permissions and
|
|
200
|
+
limitations under the License.
|
opendecider-0.1.0/NOTICE
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
OpenDecider
|
|
2
|
+
Copyright 2026 Manjunath Janardhan
|
|
3
|
+
|
|
4
|
+
The code in this repository is licensed under the Apache License, Version 2.0 (LICENSE).
|
|
5
|
+
|
|
6
|
+
Model weights
|
|
7
|
+
- opendecider-nano: fine-tuned from Ettin-encoder-400m (jhu-clsp/ettin-encoder-400m, MIT).
|
|
8
|
+
- opendecider-small: LoRA adapter for Qwen3-4B-Instruct-2507 (Qwen/Qwen3-4B-Instruct-2507, Apache-2.0).
|
|
9
|
+
|
|
10
|
+
Training data (used for training only; no dataset text is redistributed)
|
|
11
|
+
- knowledgator/gliclass-v2.0 (Apache-2.0)
|
|
12
|
+
- CLINC150, clinc/clinc_oos (CC BY 3.0)
|
|
13
|
+
- GoEmotions, google-research-datasets/go_emotions (Apache-2.0)
|
|
14
|
+
- SQuAD 2.0, rajpurkar/squad_v2 (CC BY-SA 4.0)
|
|
15
|
+
- WANLI, alisawuffles/WANLI (CC BY 4.0)
|
|
16
|
+
- FEVER NLI, pietrolesci/nli_fever (CC BY-SA 3.0, from Wikipedia)
|
|
17
|
+
- DBpedia-14, fancyzhx/dbpedia_14 (CC BY-SA 3.0)
|
|
18
|
+
- Civil Comments, google/civil_comments (CC0)
|
|
19
|
+
- SMS Spam Collection, UCI Machine Learning Repository (CC BY 4.0)
|
|
20
|
+
- Natural Questions, via sentence-transformers/natural-questions (CC BY-SA 3.0)
|
|
21
|
+
- PAWS, google-research-datasets/paws (Google LLC; free for any use with attribution)
|
|
22
|
+
- HotpotQA, hotpotqa/hotpot_qa (CC BY-SA 4.0)
|
|
23
|
+
- typed-decisions train split, LocalLLaMA/typed-decisions (opendecider-nano only; the test split is never used)
|
|
24
|
+
- Synthetic business cases, emails and reviews written for this project by DeepSeek V4.1 Flash (MIT) and
|
|
25
|
+
Qwen3-30B-A3B-Instruct-2507 (Apache-2.0)
|
|
26
|
+
|
|
27
|
+
Teacher models (soft labels): Qwen3-235B-A22B-Instruct-2507 (Apache-2.0), DeepSeek V4.1 Flash (MIT).
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: opendecider
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Small open decision models (System One): typed choice / score / yes-no questions with calibrated probabilities. Runs on CPU, NVIDIA and Apple Silicon.
|
|
5
|
+
Author: Manjunath Janardhan
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/manjunathshiva/opendecider
|
|
8
|
+
Project-URL: Models, https://huggingface.co/manjunathshiva/opendecider-nano
|
|
9
|
+
Keywords: decision model,system one,classification,calibration,typed decisions,jev,laya
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
16
|
+
Requires-Python: >=3.10
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
License-File: NOTICE
|
|
20
|
+
Requires-Dist: torch>=2.1
|
|
21
|
+
Requires-Dist: transformers>=4.51
|
|
22
|
+
Requires-Dist: safetensors>=0.4
|
|
23
|
+
Requires-Dist: huggingface_hub>=0.23
|
|
24
|
+
Provides-Extra: small
|
|
25
|
+
Requires-Dist: peft>=0.11; extra == "small"
|
|
26
|
+
Requires-Dist: accelerate; extra == "small"
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Requires-Dist: pytest; extra == "dev"
|
|
29
|
+
Dynamic: license-file
|
|
30
|
+
|
|
31
|
+
<p align="center">
|
|
32
|
+
<picture>
|
|
33
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/manjunathshiva/opendecider/main/assets/logo-lockup-dark.png" />
|
|
34
|
+
<img src="https://raw.githubusercontent.com/manjunathshiva/opendecider/main/assets/logo-lockup.png" alt="OpenDecider" width="400" />
|
|
35
|
+
</picture>
|
|
36
|
+
</p>
|
|
37
|
+
|
|
38
|
+
**Open, calibrated System 1 decision models.** Ask typed questions (`choice`, `score`, `noul`) about any state (text, email, ticket or JSON) and get a calibrated probability for every option: 17 ms on an NVIDIA GPU, 18 ms on a Mac. Distilled from open teachers, and benchmarked head to head against TypeSafe Jev, Laya, CLM-8B and frontier LLMs on the same questions with the same scorer.
|
|
39
|
+
|
|
40
|
+
<div align="center">
|
|
41
|
+
|
|
42
|
+
[](https://huggingface.co/manjunathshiva/opendecider-nano)
|
|
43
|
+
[](https://huggingface.co/manjunathshiva/opendecider-small)
|
|
44
|
+
[](https://huggingface.co/collections/manjunathshiva/opendecider-6ab8c838909092518d50a9ea)
|
|
45
|
+
[](https://pypi.org/project/opendecider/)
|
|
46
|
+
[](https://huggingface.co/spaces/manjunathshiva/opendecider-demo)
|
|
47
|
+
[](https://github.com/manjunathshiva/opendecider/blob/main/COMPARISON.md)
|
|
48
|
+
[](https://github.com/manjunathshiva/opendecider#installation-details)
|
|
49
|
+
[](https://opensource.org/licenses/Apache-2.0)
|
|
50
|
+
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
## Installation
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
pip install opendecider # opendecider-nano
|
|
57
|
+
pip install "opendecider[small]" # adds peft for opendecider-small
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Python 3.10 or newer. Works on Linux, Windows and macOS, on CPU, NVIDIA (CUDA) and Apple Silicon (MPS), and picks the
|
|
61
|
+
device for you. Platform notes: [Installation details](https://github.com/manjunathshiva/opendecider#installation-details).
|
|
62
|
+
Try it without installing: [live demo](https://huggingface.co/spaces/manjunathshiva/opendecider-demo).
|
|
63
|
+
|
|
64
|
+
## Quickstart
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
from opendecider import load
|
|
68
|
+
|
|
69
|
+
model = load("manjunathshiva/opendecider-nano") # 0.8 GB, downloaded on first use; "…/opendecider-small" for the 4B
|
|
70
|
+
|
|
71
|
+
state = "Hi, we were billed twice for March. Please refund the duplicate today or we will cancel our plan."
|
|
72
|
+
questions = {
|
|
73
|
+
"department": {"type": "choice", "instructions": "Which department should handle this?",
|
|
74
|
+
"criteria": {"billing": "invoices, payments, refunds",
|
|
75
|
+
"technical": "bugs, outages, system errors",
|
|
76
|
+
"other": "everything else"}},
|
|
77
|
+
"urgency": {"type": "score", "instructions": "How urgent is this?",
|
|
78
|
+
"criteria": ["not urgent", "soon", "blocking"]},
|
|
79
|
+
"churn_risk": {"type": "noul", "instructions": "Does the user threaten to cancel or leave?"},
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
result = model.system_one(state, questions)
|
|
83
|
+
print(result["answers"]["department"]["choice"]) # billing (probability 0.927)
|
|
84
|
+
print(result["answers"]["urgency"]["score"]) # 2 = blocking (probability 0.604)
|
|
85
|
+
print(result["answers"]["churn_risk"]["noul"]) # 0.922 = probability the answer is yes
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
A state can be plain text or any JSON-serialisable object: a ticket with subject, body and customer fields, a log
|
|
89
|
+
record, an agent's tool-call trace. Questions can also be written with the helper classes `Choice`, `Score` and `Noul`.
|
|
90
|
+
|
|
91
|
+
## Beats Laya and Jev on typed-decisions
|
|
92
|
+
|
|
93
|
+
On the [typed-decisions](https://huggingface.co/datasets/LocalLLaMA/typed-decisions) benchmark (2,000 decisions across four
|
|
94
|
+
business workflows), scored with the [Antz AI Jev-vs-Laya harness](https://github.com/pavanjava/jev_and_laya_benchmarking),
|
|
95
|
+
**opendecider-nano scores 0.796**, against **0.766** for Laya's typed-decisions checkpoint (+0.030, 95% CI +0.014 to
|
|
96
|
+
+0.044) and **0.754** for TypeSafe Jev. Like Laya's checkpoint, it was fine-tuned on the dataset's train split; the test
|
|
97
|
+
split was never used for training or model selection. **opendecider-small, which never saw the dataset, scores 0.672**,
|
|
98
|
+
against 0.362 for Laya's base checkpoint.
|
|
99
|
+
|
|
100
|
+
## What's new in 0.1.0
|
|
101
|
+
|
|
102
|
+
* **First release:** `opendecider-nano` (~400M, Ettin encoder) and `opendecider-small` (4B, LoRA on Qwen3-4B-Instruct-2507).
|
|
103
|
+
* **Measured against TypeSafe Jev directly,** through TypeSafe's own API, on every benchmark, alongside Laya, CLM-8B and five frontier LLMs.
|
|
104
|
+
* **Same results on every platform:** both models give identical benchmark scores on Apple Silicon (MPS) and Linux + NVIDIA (CUDA).
|
|
105
|
+
* **Licence-clean data:** every training dataset is listed in [NOTICE](https://github.com/manjunathshiva/opendecider/blob/main/NOTICE). A non-commercial dataset found in our audit was removed before release, and no outputs of Claude or GPT models were used.
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
<p align="center">
|
|
110
|
+
<img src="https://raw.githubusercontent.com/manjunathshiva/opendecider/main/assets/opendecider_vs_jev_laya.png" alt="OpenDecider versus TypeSafe Jev, Laya, CLM-8B and frontier LLMs: typed-decisions accuracy, accuracy versus latency on 200 general decisions, Laya's own application battery, and calibration" width="100%" />
|
|
111
|
+
</p>
|
|
112
|
+
|
|
113
|
+
OpenDecider answers typed questions over any state in **a single forward pass** (nano) or a single next-token read
|
|
114
|
+
(small). There's no text generation, so nothing to parse and nothing to hallucinate. Every answer carries a full,
|
|
115
|
+
calibrated probability distribution you can threshold, route on or log.
|
|
116
|
+
|
|
117
|
+
Two checkpoints:
|
|
118
|
+
|
|
119
|
+
| | backbone | params | context | memory | use it for |
|
|
120
|
+
|---|---|---|---|---|---|
|
|
121
|
+
| [`opendecider-nano`](https://huggingface.co/manjunathshiva/opendecider-nano) | Ettin-encoder-400m | ~400M | 2,048 | 2.0 GiB | speed: 17–18 ms per question, ~9 ms batched; typed business decisions |
|
|
122
|
+
| [`opendecider-small`](https://huggingface.co/manjunathshiva/opendecider-small) | Qwen3-4B-Instruct-2507 + LoRA | 4B | 768 (training inputs) | 8.9 GiB, fits a 16 GB Mac | accuracy and calibration on decisions it has never seen |
|
|
123
|
+
|
|
124
|
+
### Coming next (in development)
|
|
125
|
+
|
|
126
|
+
* **opendecider-medium** (Qwen3-30B-A3B, for 36 GB+ machines) and **opendecider-large** (Qwen3-Next-80B-A3B, for 64 GB),
|
|
127
|
+
aimed at closing the remaining gap to frontier LLMs.
|
|
128
|
+
* **MLX builds** for Apple Silicon, a **Colab notebook** for NVIDIA, and the **benchmark harness** as runnable scripts.
|
|
129
|
+
|
|
130
|
+
## Installation details
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# 1. a virtual environment (macOS / Linux)
|
|
134
|
+
python3 -m venv .venv && source .venv/bin/activate
|
|
135
|
+
# Windows PowerShell: py -m venv .venv ; .venv\Scripts\Activate.ps1
|
|
136
|
+
|
|
137
|
+
# 2. PyTorch for your hardware (skip if already installed)
|
|
138
|
+
pip install torch # macOS (Apple Silicon uses MPS) and CPU
|
|
139
|
+
pip install torch --index-url https://download.pytorch.org/whl/cu128 # Linux / Windows with an NVIDIA GPU
|
|
140
|
+
|
|
141
|
+
# 3. OpenDecider
|
|
142
|
+
pip install "opendecider[small]"
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
* **Device:** CUDA, then MPS, then CPU, chosen automatically. Override with `load(..., device="cpu")`.
|
|
146
|
+
* **Offline or air-gapped:** download a model folder once (`huggingface-cli download manjunathshiva/opendecider-nano --local-dir ./nano`), then `load("./nano")`.
|
|
147
|
+
* **CPU only:** nano runs fine on CPU for batch jobs. small needs ~17 GB of RAM in fp32 and is slow on CPU.
|
|
148
|
+
* **Memory:** nano 2.0 GiB, small 8.9 GiB of GPU or unified memory (measured on Apple Silicon).
|
|
149
|
+
|
|
150
|
+
## Decision primitives
|
|
151
|
+
|
|
152
|
+
```python
|
|
153
|
+
from opendecider import Choice, Score, Noul
|
|
154
|
+
|
|
155
|
+
Choice("Which team?", {"billing": "charges, refunds", "technical": "bugs"}) # pick one; descriptions optional
|
|
156
|
+
Choice("Which intent?", ["refund", "replacement", "information"]) # a plain list of labels
|
|
157
|
+
Score("How urgent?", ["not urgent", "soon", "blocking"]) # ordered levels, lowest first
|
|
158
|
+
Noul("Is this spam?") # yes / no
|
|
159
|
+
Noul("Is this spam?", {"true": "unsolicited marketing", "false": "mail the user wants"})
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Answers:
|
|
163
|
+
|
|
164
|
+
```python
|
|
165
|
+
{"type": "choice", "choice": "billing", "probabilities": {"billing": 0.927, ...}, "confidence": 0.927}
|
|
166
|
+
{"type": "score", "score": 2, "expected": 1.51, "probabilities": {"0": 0.091, "1": 0.305, "2": 0.604}, "confidence": 0.604}
|
|
167
|
+
{"type": "noul", "noul": 0.922, "probabilities": {"true": 0.922, "false": 0.078}, "confidence": 0.922}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
`system_one(state, questions)` takes any number of questions about one state. opendecider-nano answers all of them in
|
|
171
|
+
one padded batch (9.3 ms per question at 50 questions on a Mac); opendecider-small answers them in sequence.
|
|
172
|
+
|
|
173
|
+
Measure latency on your own hardware: `python -m opendecider.bench_speed manjunathshiva/opendecider-nano`.
|
|
174
|
+
|
|
175
|
+
## Architecture
|
|
176
|
+
|
|
177
|
+
* **opendecider-nano:** Ettin-encoder-400m (bidirectional, fully fine-tuned) reads
|
|
178
|
+
`question: …, [MASK] option 1, [MASK] option 2, …, input: <state>`. The hidden state at each `[MASK]` goes through a
|
|
179
|
+
small MLP (Linear–GELU–LayerNorm–Linear) to one logit, then a softmax across that question's options. The answer space
|
|
180
|
+
is defined at request time, so new schemas need no retraining. There's no per-option token budget, so a 78-option
|
|
181
|
+
question costs one forward pass.
|
|
182
|
+
* **opendecider-small:** Qwen3-4B-Instruct-2507 with a LoRA adapter (r = 16, all linear projections). The options are
|
|
183
|
+
lettered, and one forward pass gives the probability of each letter as the next token. Above 26 options it scores each
|
|
184
|
+
option name's log-probability after the shared prompt.
|
|
185
|
+
|
|
186
|
+
## Training
|
|
187
|
+
|
|
188
|
+
**Distillation from calibrated teachers.** Two openly licensed teachers, Qwen3-235B-A22B-Instruct-2507 (Apache-2.0) and
|
|
189
|
+
DeepSeek V4.1 Flash (MIT), scored every training question through token log-probabilities. Each teacher was
|
|
190
|
+
temperature-scaled on held-out gold labels before the two were averaged, so the students learn calibrated distributions,
|
|
191
|
+
not hard labels. Datasets that come with gold labels only use label-smoothed gold.
|
|
192
|
+
|
|
193
|
+
**Data.** Public classification, intent, emotion, NLI, reading-comprehension, topic, toxicity, spam, relevance and
|
|
194
|
+
paraphrase datasets, plus synthetic business cases, emails and product reviews written for this project (full list and
|
|
195
|
+
licences in [NOTICE](https://github.com/manjunathshiva/opendecider/blob/main/NOTICE)). opendecider-nano then had a short fine-tune on the typed-decisions train split.
|
|
196
|
+
**No benchmark dataset below, or its family, is in the training data**, and every training pool was checked for text
|
|
197
|
+
overlap with all test sets (0 overlaps).
|
|
198
|
+
|
|
199
|
+
## Benchmarks
|
|
200
|
+
|
|
201
|
+
Every model answered the same questions and was scored by the same code. **TypeSafe Jev was measured directly through
|
|
202
|
+
TypeSafe's own API**, not taken from published figures. Full tables, per-task results and methodology: [COMPARISON.md](https://github.com/manjunathshiva/opendecider/blob/main/COMPARISON.md).
|
|
203
|
+
|
|
204
|
+
### Speed
|
|
205
|
+
|
|
206
|
+
| questions per call | nano, NVIDIA L40S | nano, Apple M4 Max | small, NVIDIA L40S | small, Apple M4 Max |
|
|
207
|
+
|---|---|---|---|---|
|
|
208
|
+
| 1 | 16.1 ms | 18.1 ms | 37.6 ms | 141 ms |
|
|
209
|
+
| 5 | 24.4 ms (4.9 ms/q) | 54.3 ms (10.9 ms/q) | 190.1 ms (38.0 ms/q) | 680 ms (136 ms/q) |
|
|
210
|
+
| 10 | 42.9 ms (4.3 ms/q) | 98.1 ms (9.8 ms/q) | 388.2 ms (38.8 ms/q) | 1.37 s (137 ms/q) |
|
|
211
|
+
| 50 | 189.5 ms (3.8 ms/q) | 467 ms (9.3 ms/q) | 1.94 s (38.7 ms/q) | 6.86 s (137 ms/q) |
|
|
212
|
+
|
|
213
|
+
For reference, TypeSafe Jev answered at a **404 ms** median per question through its API in our runs.
|
|
214
|
+
|
|
215
|
+
### OpenDecider vs TypeSafe Jev (measured through TypeSafe's API)
|
|
216
|
+
|
|
217
|
+
| Benchmark / metric | TypeSafe Jev 1.13 | opendecider-nano | opendecider-small |
|
|
218
|
+
|---|---|---|---|
|
|
219
|
+
| typed-decisions, 2,000 decisions | 0.754 | **0.796** | 0.672 (zero-shot) |
|
|
220
|
+
| 200 general decisions (BANKING77, BoolQ, Yelp, ChaosNLI) | 0.730 | 0.680 | **0.735** |
|
|
221
|
+
| Laya's application battery, 10 tasks | **0.774** | 0.656 | 0.702 |
|
|
222
|
+
| Calibration error (ECE), general decisions | 0.164 | 0.092 | **0.087** |
|
|
223
|
+
| Distance from the human label spread (ChaosNLI JSD) | 0.148 | 0.045 | **0.040** |
|
|
224
|
+
| Median latency, 1 question | 404 ms (API) | **17 ms** (L40S) | 40 ms (L40S) |
|
|
225
|
+
| Weights | closed API | **Apache-2.0** | **Apache-2.0** |
|
|
226
|
+
| Cost | $0.025 per 1,000 decisions | self-hosted | self-hosted |
|
|
227
|
+
|
|
228
|
+
#### Where Jev leads
|
|
229
|
+
|
|
230
|
+
* **Laya's application battery:** Jev 0.774 vs 0.702 (small) and 0.656 (nano); 0.803 on the five tasks Laya was not
|
|
231
|
+
trained on. Jev is strongest on phishing (0.897, vs our 0.63), spam (0.985), model routing (0.975) and 77-label
|
|
232
|
+
BANKING77 (0.845).
|
|
233
|
+
* **BoolQ-style yes/no reading questions** (0.94, vs 0.74 nano and 0.90 small) and **BANKING77 routing with 78 options**
|
|
234
|
+
on our bench (0.76, vs 0.68 and 0.70).
|
|
235
|
+
* **typed-decisions without fine-tuning:** Jev 0.754 vs opendecider-small 0.672. The fine-tuned nano (0.796) passes it.
|
|
236
|
+
|
|
237
|
+
Where OpenDecider leads Jev: typed-decisions after fine-tuning (0.796 vs 0.754), general decisions (small 0.735 vs
|
|
238
|
+
0.730), calibration (ECE 0.087–0.092 vs 0.164), agreement with human label spread (JSD 0.040–0.045 vs 0.148), latency
|
|
239
|
+
(17–40 ms vs 404 ms), open weights and self-hosting.
|
|
240
|
+
|
|
241
|
+
### OpenDecider vs Laya
|
|
242
|
+
|
|
243
|
+
| Benchmark | Laya | Laya typed-decisions | opendecider-nano | opendecider-small |
|
|
244
|
+
|---|---|---|---|---|
|
|
245
|
+
| typed-decisions (Antz harness) | 0.362 | 0.766 | **0.796** | 0.672 |
|
|
246
|
+
| 200 general decisions | 0.545 | 0.570 | 0.680 | **0.735** |
|
|
247
|
+
| Laya's battery, all 10 tasks | 0.695 | **0.702** | 0.656 | **0.702** |
|
|
248
|
+
| Laya's battery, the 5 tasks Laya was not trained on | 0.579 | 0.609 | 0.656 | **0.743** |
|
|
249
|
+
| BANKING77, 77 labels (Laya's battery) | 0.425 | 0.492 | 0.645 | **0.748** |
|
|
250
|
+
| Calibration error (ECE), general decisions | 0.327 | 0.162 | 0.092 | **0.087** |
|
|
251
|
+
|
|
252
|
+
#### Where Laya leads
|
|
253
|
+
|
|
254
|
+
* **The five datasets Laya was trained on:** AG News 0.95, Enron spam 0.99, phishing 0.98, MS MARCO relevance 0.63,
|
|
255
|
+
support triage 0.50. OpenDecider did not train on any of them.
|
|
256
|
+
* **Multilingual:** Laya has a 100+ language checkpoint and a router. OpenDecider is evaluated in English only.
|
|
257
|
+
* **Single-question speed on short inputs:** Laya is in the same range as nano (21–33 ms).
|
|
258
|
+
|
|
259
|
+
### Frontier LLMs, CLM-8B and untrained baselines (same 200 general decisions)
|
|
260
|
+
|
|
261
|
+
| Model | accuracy | ECE | median latency | $ / 1,000 decisions |
|
|
262
|
+
|---|---|---|---|---|
|
|
263
|
+
| Claude Fable 5.1 | **0.840** | **0.064** | 4.27 s | $11.81 |
|
|
264
|
+
| GPT-6 Astra | 0.790 | 0.119 | 2.22 s | $6.96 |
|
|
265
|
+
| DeepSeek V4.1 Flash | 0.760 | 0.138 | 4.08 s | $0.158 |
|
|
266
|
+
| MiniMax M3 | 0.755 | 0.112 | 1.02 s | $0.149 |
|
|
267
|
+
| Qwen3-Next-80B-A3B, untrained | 0.750 | 0.230 | local | – |
|
|
268
|
+
| Kimi K3 | 0.745 | 0.119 | 6.28 s | $3.64 |
|
|
269
|
+
| **opendecider-small** | **0.735** | **0.087** | **40 ms** | self-hosted |
|
|
270
|
+
| TypeSafe Jev 1.13 | 0.730 | 0.164 | 404 ms | $0.025 |
|
|
271
|
+
| Qwen3-4B-Instruct-2507, untrained (small's base) | 0.700 | 0.289 | local | – |
|
|
272
|
+
| **opendecider-nano** | **0.680** | **0.092** | **17 ms** | self-hosted |
|
|
273
|
+
| CLM-8B (Contrastive-LM) | 0.400 | 0.106 | ~35 ms | self-hosted |
|
|
274
|
+
|
|
275
|
+
Frontier LLMs are more accurate, at 25–370× the latency and with a per-call bill. Distillation moved Qwen3-4B from 0.700
|
|
276
|
+
to 0.735 and cut its calibration error from 0.289 to 0.087. CLM-8B, a contrastive reranker, is near chance on
|
|
277
|
+
classification-style decisions (0.000 on label-only BANKING77); its strongest task is passage relevance (0.603 on MS
|
|
278
|
+
MARCO, near Laya's 0.625, which trained on it).
|
|
279
|
+
|
|
280
|
+
## Honest limits
|
|
281
|
+
|
|
282
|
+
* **Phishing detection is the weakest task:** 0.63 on Laya's battery for both models, against Jev's 0.90 and Laya's 0.98 (Laya trained on that dataset).
|
|
283
|
+
* **TypeSafe Jev leads Laya's application battery** (0.774 vs 0.702 small, 0.656 nano).
|
|
284
|
+
* **opendecider-nano trails Laya on Laya's battery overall** (0.656 vs 0.695), because half its tasks are Laya's training data.
|
|
285
|
+
* **opendecider-small is zero-shot on typed-decisions** and trails Jev there (0.672 vs 0.754).
|
|
286
|
+
* **English only so far.** The training data includes some Spanish, German, French, Portuguese, Italian and Dutch, but no multilingual evaluation has been run.
|
|
287
|
+
* **opendecider-small answers questions one at a time** (~137 ms per question on a Mac, ~40 ms on an L40S). Use nano when you need many decisions per second.
|
|
288
|
+
* **Descriptions help.** Very terse or cryptic option labels are harder for every model, so give options a short description when you can.
|
|
289
|
+
|
|
290
|
+
## Links
|
|
291
|
+
|
|
292
|
+
* **Live demo:** https://huggingface.co/spaces/manjunathshiva/opendecider-demo
|
|
293
|
+
* **PyPI:** https://pypi.org/project/opendecider/
|
|
294
|
+
* **Models:** [opendecider-nano](https://huggingface.co/manjunathshiva/opendecider-nano) · [opendecider-small](https://huggingface.co/manjunathshiva/opendecider-small) · [collection](https://huggingface.co/collections/manjunathshiva/opendecider-6ab8c838909092518d50a9ea)
|
|
295
|
+
* **Full benchmark tables:** [COMPARISON.md](https://github.com/manjunathshiva/opendecider/blob/main/COMPARISON.md)
|
|
296
|
+
* **Related:** [Jev vs frontier LLMs benchmark](https://github.com/manjunathshiva/jev-frontier-bench)
|
|
297
|
+
|
|
298
|
+
## License
|
|
299
|
+
|
|
300
|
+
Code and weights: Apache-2.0. Base models: Ettin-encoder-400m (MIT), Qwen3-4B-Instruct-2507 (Apache-2.0).
|
|
301
|
+
Training-data attributions: [NOTICE](https://github.com/manjunathshiva/opendecider/blob/main/NOTICE).
|
|
302
|
+
|
|
303
|
+
```bibtex
|
|
304
|
+
@software{janardhan2026opendecider,
|
|
305
|
+
title = {OpenDecider: open, calibrated System 1 decision models},
|
|
306
|
+
author = {Manjunath Janardhan},
|
|
307
|
+
year = {2026},
|
|
308
|
+
url = {https://github.com/manjunathshiva/opendecider}
|
|
309
|
+
}
|
|
310
|
+
```
|