mertcobanov commited on
Commit
5b1aeb7
·
verified ·
1 Parent(s): b41eceb

Ollaya package for amyrmahdy/decima-small

Browse files
README.md ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model:
4
+ - amyrmahdy/decima-small
5
+ - amyrmahdy/decima-base
6
+ - amyrmahdy/decima-agent
7
+ library_name: onnx
8
+ tags:
9
+ - ollaya
10
+ - onnx
11
+ - decision-model
12
+ - system-one
13
+ pipeline_tag: text-classification
14
+ ---
15
+
16
+ # decima for Ollaya
17
+
18
+ [Ollaya](https://github.com/ollaya-dev/ollaya) package of **[amyrmahdy/decima-small](https://huggingface.co/amyrmahdy/decima-small)** and **[amyrmahdy/decima-base](https://huggingface.co/amyrmahdy/decima-base)** and **[amyrmahdy/decima-agent](https://huggingface.co/amyrmahdy/decima-agent)** by A. M. Madani (amyrmahdy).
19
+ Ollaya runs open decision models locally, the way Ollama runs LLMs: typed questions in,
20
+ calibrated answers out, behind a TypeSafe-compatible API.
21
+
22
+ ```sh
23
+ ollaya run decima
24
+ ```
25
+
26
+ ## What is in this repository
27
+
28
+ This repository holds only the files Ollaya derives, with no weights. Each graph is an ONNX export of the
29
+ original model whose weights **reference the authors' own weight files by byte offset**,
30
+ so `ollaya pull` downloads the weights from the upstream repositories, unmodified and pinned to a
31
+ commit, and verifies their sha256.
32
+
33
+ | Tag | Upstream | Files |
34
+ |---|---|---|
35
+ | `decima:small` | [amyrmahdy/decima-small@2e7f4d0](https://huggingface.co/amyrmahdy/decima-small/tree/2e7f4d0757df0215f48f2a9b2b589e1f3a6348ed) | `small/model-fp32.onnx`, `small/decision.json`, `small/calibration.json` |
36
+ | `decima:base` | [amyrmahdy/decima-base@2468005](https://huggingface.co/amyrmahdy/decima-base/tree/2468005d5e48e95eb74072c32a6d9df164578071) | `base/model-fp32.onnx`, `base/decision.json`, `base/calibration.json` |
37
+ | `decima:agent` | [amyrmahdy/decima-agent@86a07aa](https://huggingface.co/amyrmahdy/decima-agent/tree/86a07aab1c340fa5869bdb754e57d3851a1d288a) | `agent/model-fp32.onnx`, `agent/decision.json`, `agent/calibration.json` |
38
+
39
+ Each tag has an fp32 graph, used on CPU and GPU. Each tag also has `decision.json` (sequence layout, special tokens) and
40
+ `calibration.json` (temperatures).
41
+
42
+ ## Parity
43
+
44
+ Ollaya's Rust runtime matches the author's own code (decima/model.py and systemone.py, fp32) on 581 questions from 122 requests for each of small, base and agent, on CPU and CUDA (RTX 4090 and RTX 5090): identical token rows and truncation, the same 18 rejected requests, the same decision on every question, scores within 2.0e-5 and probabilities within 5.5e-6.
45
+
46
+ ## License
47
+
48
+ Same as the upstream model (Apache-2.0). Ollaya itself is Apache-2.0.
agent/calibration.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "temperature": [
3
+ 0.6081955235647175,
4
+ 1.0,
5
+ 0.6081955235647175
6
+ ],
7
+ "temperature_by_options": {},
8
+ "source": "pytorch/decima.json `temperature`, fitted by the author. Score questions take it inside the ordinal head (decision.json `temperature`), so their slot here is 1."
9
+ }
agent/decision.json ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "engine": "onnx",
3
+ "family": "decima",
4
+ "layout": "decima-late-interaction-v1",
5
+ "upstream": {
6
+ "repo": "amyrmahdy/decima-agent",
7
+ "revision": "86a07aab1c340fa5869bdb754e57d3851a1d288a",
8
+ "tag": "v2.1",
9
+ "checkpoint": "pytorch",
10
+ "code": {
11
+ "repo": "https://github.com/amyrmahdy/decima",
12
+ "tag": "v1.1.1",
13
+ "commit": "2df60942c68b0e1dfc87743462745bacdd936d8a"
14
+ },
15
+ "license": "Apache-2.0",
16
+ "base": "amyrmahdy/decima-base, on jhu-clsp/mmBERT-base (MIT)"
17
+ },
18
+ "contract": {
19
+ "inputs": {
20
+ "state_ids": {
21
+ "dtype": "int64",
22
+ "shape": [
23
+ "questions",
24
+ "state_len"
25
+ ],
26
+ "note": "each question's state row, right-padded with special_tokens.pad"
27
+ },
28
+ "state_mask": {
29
+ "dtype": "int64",
30
+ "shape": [
31
+ "questions",
32
+ "state_len"
33
+ ],
34
+ "note": "1 on tokens"
35
+ },
36
+ "option_ids": {
37
+ "dtype": "int64",
38
+ "shape": [
39
+ "options",
40
+ "option_len"
41
+ ],
42
+ "note": "every option row, questions in order, right-padded"
43
+ },
44
+ "option_mask": {
45
+ "dtype": "int64",
46
+ "shape": [
47
+ "options",
48
+ "option_len"
49
+ ],
50
+ "note": "1 on tokens"
51
+ },
52
+ "option_state": {
53
+ "dtype": "int64",
54
+ "shape": [
55
+ "options"
56
+ ],
57
+ "note": "the question (state row) of each option"
58
+ }
59
+ },
60
+ "outputs": {
61
+ "scores": {
62
+ "dtype": "float32",
63
+ "shape": [
64
+ "options"
65
+ ],
66
+ "note": "raw option scores; choice and noul: softmax(scores / temperature)"
67
+ },
68
+ "ordinal_g": {
69
+ "dtype": "float32",
70
+ "shape": [
71
+ "options"
72
+ ],
73
+ "note": "ord_g(z) per option"
74
+ },
75
+ "ordinal_gap": {
76
+ "dtype": "float32",
77
+ "shape": [
78
+ "options"
79
+ ],
80
+ "note": "ord_gap(z) per option"
81
+ }
82
+ }
83
+ },
84
+ "state_prefix": "",
85
+ "option_prefix": "",
86
+ "question_in_state": true,
87
+ "question_in_options": true,
88
+ "max_state_tokens": 2048,
89
+ "max_option_tokens": 64,
90
+ "special_tokens": {
91
+ "cls": 2,
92
+ "sep": 1,
93
+ "pad": 0
94
+ },
95
+ "noul": {
96
+ "options": [
97
+ "yes",
98
+ "no"
99
+ ],
100
+ "criteria": "\nTrue if: {true}\nFalse if: {false}",
101
+ "missing": "\u2014"
102
+ },
103
+ "limits": {
104
+ "questions": [
105
+ 1,
106
+ 256
107
+ ],
108
+ "choices": [
109
+ 2,
110
+ 255
111
+ ],
112
+ "levels": [
113
+ 2,
114
+ 10
115
+ ]
116
+ },
117
+ "temperature": 0.6081955235647175,
118
+ "option_logits": {
119
+ "choice": "labels in the caller's order",
120
+ "score": "levels in order",
121
+ "noul": "[yes, no]"
122
+ },
123
+ "opset": 20
124
+ }
agent/model-fp32.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:713a903f75c20edb4cf2646e3eed54247b3565e4e917cabfe18cf87b64bcac0f
3
+ size 5083416
base/calibration.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "temperature": [
3
+ 0.7269418400253115,
4
+ 1.0,
5
+ 0.7269418400253115
6
+ ],
7
+ "temperature_by_options": {},
8
+ "source": "pytorch/decima.json `temperature`, fitted by the author. Score questions take it inside the ordinal head (decision.json `temperature`), so their slot here is 1."
9
+ }
base/decision.json ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "engine": "onnx",
3
+ "family": "decima",
4
+ "layout": "decima-late-interaction-v1",
5
+ "upstream": {
6
+ "repo": "amyrmahdy/decima-base",
7
+ "revision": "2468005d5e48e95eb74072c32a6d9df164578071",
8
+ "tag": "v2.0",
9
+ "checkpoint": "pytorch",
10
+ "code": {
11
+ "repo": "https://github.com/amyrmahdy/decima",
12
+ "tag": "v1.1.1",
13
+ "commit": "2df60942c68b0e1dfc87743462745bacdd936d8a"
14
+ },
15
+ "license": "Apache-2.0",
16
+ "base": "jhu-clsp/mmBERT-base (MIT)"
17
+ },
18
+ "contract": {
19
+ "inputs": {
20
+ "state_ids": {
21
+ "dtype": "int64",
22
+ "shape": [
23
+ "questions",
24
+ "state_len"
25
+ ],
26
+ "note": "each question's state row, right-padded with special_tokens.pad"
27
+ },
28
+ "state_mask": {
29
+ "dtype": "int64",
30
+ "shape": [
31
+ "questions",
32
+ "state_len"
33
+ ],
34
+ "note": "1 on tokens"
35
+ },
36
+ "option_ids": {
37
+ "dtype": "int64",
38
+ "shape": [
39
+ "options",
40
+ "option_len"
41
+ ],
42
+ "note": "every option row, questions in order, right-padded"
43
+ },
44
+ "option_mask": {
45
+ "dtype": "int64",
46
+ "shape": [
47
+ "options",
48
+ "option_len"
49
+ ],
50
+ "note": "1 on tokens"
51
+ },
52
+ "option_state": {
53
+ "dtype": "int64",
54
+ "shape": [
55
+ "options"
56
+ ],
57
+ "note": "the question (state row) of each option"
58
+ }
59
+ },
60
+ "outputs": {
61
+ "scores": {
62
+ "dtype": "float32",
63
+ "shape": [
64
+ "options"
65
+ ],
66
+ "note": "raw option scores; choice and noul: softmax(scores / temperature)"
67
+ },
68
+ "ordinal_g": {
69
+ "dtype": "float32",
70
+ "shape": [
71
+ "options"
72
+ ],
73
+ "note": "ord_g(z) per option"
74
+ },
75
+ "ordinal_gap": {
76
+ "dtype": "float32",
77
+ "shape": [
78
+ "options"
79
+ ],
80
+ "note": "ord_gap(z) per option"
81
+ }
82
+ }
83
+ },
84
+ "state_prefix": "",
85
+ "option_prefix": "",
86
+ "question_in_state": true,
87
+ "question_in_options": true,
88
+ "max_state_tokens": 512,
89
+ "max_option_tokens": 64,
90
+ "special_tokens": {
91
+ "cls": 2,
92
+ "sep": 1,
93
+ "pad": 0
94
+ },
95
+ "noul": {
96
+ "options": [
97
+ "yes",
98
+ "no"
99
+ ],
100
+ "criteria": "\nTrue if: {true}\nFalse if: {false}",
101
+ "missing": "\u2014"
102
+ },
103
+ "limits": {
104
+ "questions": [
105
+ 1,
106
+ 256
107
+ ],
108
+ "choices": [
109
+ 2,
110
+ 255
111
+ ],
112
+ "levels": [
113
+ 2,
114
+ 10
115
+ ]
116
+ },
117
+ "temperature": 0.7269418400253115,
118
+ "option_logits": {
119
+ "choice": "labels in the caller's order",
120
+ "score": "levels in order",
121
+ "noul": "[yes, no]"
122
+ },
123
+ "opset": 20
124
+ }
base/model-fp32.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:14bda1306d8e85243e73ad9cdc154d92679d9f35f6de6b4d96b305d617798aaf
3
+ size 5083412
small/calibration.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "temperature": [
3
+ 0.9355568358032639,
4
+ 1.0,
5
+ 0.9355568358032639
6
+ ],
7
+ "temperature_by_options": {},
8
+ "source": "pytorch/decima.json `temperature`, fitted by the author. Score questions take it inside the ordinal head (decision.json `temperature`), so their slot here is 1."
9
+ }
small/decision.json ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "engine": "onnx",
3
+ "family": "decima",
4
+ "layout": "decima-late-interaction-v1",
5
+ "upstream": {
6
+ "repo": "amyrmahdy/decima-small",
7
+ "revision": "2e7f4d0757df0215f48f2a9b2b589e1f3a6348ed",
8
+ "tag": "v1.1.1",
9
+ "checkpoint": "pytorch",
10
+ "code": {
11
+ "repo": "https://github.com/amyrmahdy/decima",
12
+ "tag": "v1.1.1",
13
+ "commit": "2df60942c68b0e1dfc87743462745bacdd936d8a"
14
+ },
15
+ "license": "Apache-2.0",
16
+ "base": "intfloat/multilingual-e5-small (MIT)"
17
+ },
18
+ "contract": {
19
+ "inputs": {
20
+ "state_ids": {
21
+ "dtype": "int64",
22
+ "shape": [
23
+ "questions",
24
+ "state_len"
25
+ ],
26
+ "note": "each question's state row, right-padded with special_tokens.pad"
27
+ },
28
+ "state_mask": {
29
+ "dtype": "int64",
30
+ "shape": [
31
+ "questions",
32
+ "state_len"
33
+ ],
34
+ "note": "1 on tokens"
35
+ },
36
+ "option_ids": {
37
+ "dtype": "int64",
38
+ "shape": [
39
+ "options",
40
+ "option_len"
41
+ ],
42
+ "note": "every option row, questions in order, right-padded"
43
+ },
44
+ "option_mask": {
45
+ "dtype": "int64",
46
+ "shape": [
47
+ "options",
48
+ "option_len"
49
+ ],
50
+ "note": "1 on tokens"
51
+ },
52
+ "option_state": {
53
+ "dtype": "int64",
54
+ "shape": [
55
+ "options"
56
+ ],
57
+ "note": "the question (state row) of each option"
58
+ }
59
+ },
60
+ "outputs": {
61
+ "scores": {
62
+ "dtype": "float32",
63
+ "shape": [
64
+ "options"
65
+ ],
66
+ "note": "raw option scores; choice and noul: softmax(scores / temperature)"
67
+ },
68
+ "ordinal_g": {
69
+ "dtype": "float32",
70
+ "shape": [
71
+ "options"
72
+ ],
73
+ "note": "ord_g(z) per option"
74
+ },
75
+ "ordinal_gap": {
76
+ "dtype": "float32",
77
+ "shape": [
78
+ "options"
79
+ ],
80
+ "note": "ord_gap(z) per option"
81
+ }
82
+ }
83
+ },
84
+ "state_prefix": "query: ",
85
+ "option_prefix": "passage: ",
86
+ "question_in_state": true,
87
+ "question_in_options": true,
88
+ "max_state_tokens": 512,
89
+ "max_option_tokens": 64,
90
+ "special_tokens": {
91
+ "cls": 0,
92
+ "sep": 2,
93
+ "pad": 1
94
+ },
95
+ "noul": {
96
+ "options": [
97
+ "yes",
98
+ "no"
99
+ ],
100
+ "criteria": "\nTrue if: {true}\nFalse if: {false}",
101
+ "missing": "\u2014"
102
+ },
103
+ "limits": {
104
+ "questions": [
105
+ 1,
106
+ 256
107
+ ],
108
+ "choices": [
109
+ 2,
110
+ 255
111
+ ],
112
+ "levels": [
113
+ 2,
114
+ 10
115
+ ]
116
+ },
117
+ "temperature": 0.9355568358032639,
118
+ "option_logits": {
119
+ "choice": "labels in the caller's order",
120
+ "score": "levels in order",
121
+ "noul": "[yes, no]"
122
+ },
123
+ "opset": 20
124
+ }
small/model-fp32.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f83c59768e53fba332d8c51dcdf029893c5cbdf660c0efaba8b747bcaa18250f
3
+ size 3340536