tinyjev 0.1.1__tar.gz → 0.1.2__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 (28) hide show
  1. {tinyjev-0.1.1/tinyjev.egg-info → tinyjev-0.1.2}/PKG-INFO +17 -8
  2. {tinyjev-0.1.1 → tinyjev-0.1.2}/README.md +14 -7
  3. {tinyjev-0.1.1 → tinyjev-0.1.2}/pyproject.toml +2 -1
  4. {tinyjev-0.1.1 → tinyjev-0.1.2}/tinyjev/agent.py +9 -1
  5. {tinyjev-0.1.1 → tinyjev-0.1.2/tinyjev.egg-info}/PKG-INFO +17 -8
  6. {tinyjev-0.1.1 → tinyjev-0.1.2}/tinyjev.egg-info/requires.txt +3 -0
  7. {tinyjev-0.1.1 → tinyjev-0.1.2}/LICENSE +0 -0
  8. {tinyjev-0.1.1 → tinyjev-0.1.2}/NOTICE +0 -0
  9. {tinyjev-0.1.1 → tinyjev-0.1.2}/setup.cfg +0 -0
  10. {tinyjev-0.1.1 → tinyjev-0.1.2}/tests/test_convert.py +0 -0
  11. {tinyjev-0.1.1 → tinyjev-0.1.2}/tests/test_decide.py +0 -0
  12. {tinyjev-0.1.1 → tinyjev-0.1.2}/tests/test_pointer_encoding.py +0 -0
  13. {tinyjev-0.1.1 → tinyjev-0.1.2}/tests/test_serve.py +0 -0
  14. {tinyjev-0.1.1 → tinyjev-0.1.2}/tinyjev/__init__.py +0 -0
  15. {tinyjev-0.1.1 → tinyjev-0.1.2}/tinyjev/backends/__init__.py +0 -0
  16. {tinyjev-0.1.1 → tinyjev-0.1.2}/tinyjev/backends/mlx_backend.py +0 -0
  17. {tinyjev-0.1.1 → tinyjev-0.1.2}/tinyjev/backends/torch_backend.py +0 -0
  18. {tinyjev-0.1.1 → tinyjev-0.1.2}/tinyjev/cli.py +0 -0
  19. {tinyjev-0.1.1 → tinyjev-0.1.2}/tinyjev/convert.py +0 -0
  20. {tinyjev-0.1.1 → tinyjev-0.1.2}/tinyjev/families/__init__.py +0 -0
  21. {tinyjev-0.1.1 → tinyjev-0.1.2}/tinyjev/families/marker.py +0 -0
  22. {tinyjev-0.1.1 → tinyjev-0.1.2}/tinyjev/families/pointer.py +0 -0
  23. {tinyjev-0.1.1 → tinyjev-0.1.2}/tinyjev/registry.py +0 -0
  24. {tinyjev-0.1.1 → tinyjev-0.1.2}/tinyjev/serve.py +0 -0
  25. {tinyjev-0.1.1 → tinyjev-0.1.2}/tinyjev.egg-info/SOURCES.txt +0 -0
  26. {tinyjev-0.1.1 → tinyjev-0.1.2}/tinyjev.egg-info/dependency_links.txt +0 -0
  27. {tinyjev-0.1.1 → tinyjev-0.1.2}/tinyjev.egg-info/entry_points.txt +0 -0
  28. {tinyjev-0.1.1 → tinyjev-0.1.2}/tinyjev.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tinyjev
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Typed decisions on your laptop: one forward pass, calibrated probabilities, no text generation. MLX or PyTorch.
5
5
  Author: Ankit Aglawe
6
6
  License: MIT
@@ -36,6 +36,8 @@ Requires-Dist: torch>=2.2; extra == "convert"
36
36
  Requires-Dist: safetensors>=0.4; extra == "convert"
37
37
  Provides-Extra: demo
38
38
  Requires-Dist: pillow>=10; extra == "demo"
39
+ Provides-Extra: modelscope
40
+ Requires-Dist: modelscope>=1.9; extra == "modelscope"
39
41
  Provides-Extra: dev
40
42
  Requires-Dist: pytest>=8; extra == "dev"
41
43
  Requires-Dist: pillow>=10; extra == "dev"
@@ -63,6 +65,13 @@ Dynamic: license-file
63
65
  <a href="https://github.com/ankit-aglawe/tinyjev/tree/main/examples">Examples</a>
64
66
  </p>
65
67
 
68
+ <p>
69
+ <b>English</b> ·
70
+ <a href="https://github.com/ankit-aglawe/tinyjev/blob/main/README.zh-CN.md">简体中文</a> ·
71
+ <a href="https://github.com/ankit-aglawe/tinyjev/blob/main/README.ja.md">日本語</a> ·
72
+ <a href="https://github.com/ankit-aglawe/tinyjev/blob/main/README.ko.md">한국어</a>
73
+ </p>
74
+
66
75
  </div>
67
76
 
68
77
  TinyJev answers typed questions about text and returns probabilities, in one forward pass, on your own machine.
@@ -90,12 +99,6 @@ TinyJev is MIT licensed.
90
99
  Eight real support tickets, one after another, on a base M1. Three questions per ticket in a
91
100
  single forward pass, about 110 ms each. Every number in that recording came from a live run.
92
101
 
93
- Half of them route themselves. The other half do not, and that is the interesting part. Ticket
94
- six says the order was late, the wrong size, and double charged, so the probability spreads
95
- across all three teams and confidence falls to 0.14. Below the gate it goes to a person instead
96
- of being guessed at. A message that turns out to be a compliment does the same thing. A model
97
- that only ever returned a label would have picked a team for both.
98
-
99
102
  ```bash
100
103
  pip install 'tinyjev[mlx,demo]'
101
104
  python demos/triage_desk.py --gif demo.gif
@@ -225,7 +228,13 @@ A question is `{"type": "choice" | "noul" | "score", "instructions": ..., "crite
225
228
 
226
229
  One published model, `tinyjev-0.6b`: a Qwen3-0.6B-Base backbone with a pointer head, trained on public typed-decision data. It is a first release and it is small — on question types unlike anything it has seen, use the confidence gate rather than the raw label. Specialising it on a few hundred of your own labelled examples is the intended path and beats prompt tuning a larger model.
227
230
 
228
- Not yet: multilingual, vision, or label sets in the hundreds.
231
+ It handles other languages better than expected, which we did not train for. Translating 25 cases of
232
+ a held-out English benchmark into Chinese and re-running them scored 22/25 against 20/25 for the
233
+ English originals, with the question schema left in English. That is parity on a small sample, not
234
+ a multilingual claim, and confidence runs flatter in Chinese so fewer cases clear a fixed gate. The
235
+ backbone is Qwen3, which is where this comes from.
236
+
237
+ Not yet: vision, or label sets in the hundreds.
229
238
 
230
239
  ## Support this project
231
240
 
@@ -18,6 +18,13 @@
18
18
  <a href="https://github.com/ankit-aglawe/tinyjev/tree/main/examples">Examples</a>
19
19
  </p>
20
20
 
21
+ <p>
22
+ <b>English</b> ·
23
+ <a href="https://github.com/ankit-aglawe/tinyjev/blob/main/README.zh-CN.md">简体中文</a> ·
24
+ <a href="https://github.com/ankit-aglawe/tinyjev/blob/main/README.ja.md">日本語</a> ·
25
+ <a href="https://github.com/ankit-aglawe/tinyjev/blob/main/README.ko.md">한국어</a>
26
+ </p>
27
+
21
28
  </div>
22
29
 
23
30
  TinyJev answers typed questions about text and returns probabilities, in one forward pass, on your own machine.
@@ -45,12 +52,6 @@ TinyJev is MIT licensed.
45
52
  Eight real support tickets, one after another, on a base M1. Three questions per ticket in a
46
53
  single forward pass, about 110 ms each. Every number in that recording came from a live run.
47
54
 
48
- Half of them route themselves. The other half do not, and that is the interesting part. Ticket
49
- six says the order was late, the wrong size, and double charged, so the probability spreads
50
- across all three teams and confidence falls to 0.14. Below the gate it goes to a person instead
51
- of being guessed at. A message that turns out to be a compliment does the same thing. A model
52
- that only ever returned a label would have picked a team for both.
53
-
54
55
  ```bash
55
56
  pip install 'tinyjev[mlx,demo]'
56
57
  python demos/triage_desk.py --gif demo.gif
@@ -180,7 +181,13 @@ A question is `{"type": "choice" | "noul" | "score", "instructions": ..., "crite
180
181
 
181
182
  One published model, `tinyjev-0.6b`: a Qwen3-0.6B-Base backbone with a pointer head, trained on public typed-decision data. It is a first release and it is small — on question types unlike anything it has seen, use the confidence gate rather than the raw label. Specialising it on a few hundred of your own labelled examples is the intended path and beats prompt tuning a larger model.
182
183
 
183
- Not yet: multilingual, vision, or label sets in the hundreds.
184
+ It handles other languages better than expected, which we did not train for. Translating 25 cases of
185
+ a held-out English benchmark into Chinese and re-running them scored 22/25 against 20/25 for the
186
+ English originals, with the question schema left in English. That is parity on a small sample, not
187
+ a multilingual claim, and confidence runs flatter in Chinese so fewer cases clear a fixed gate. The
188
+ backbone is Qwen3, which is where this comes from.
189
+
190
+ Not yet: vision, or label sets in the hundreds.
184
191
 
185
192
  ## Support this project
186
193
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "tinyjev"
7
- version = "0.1.1"
7
+ version = "0.1.2"
8
8
  description = "Typed decisions on your laptop: one forward pass, calibrated probabilities, no text generation. MLX or PyTorch."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -34,6 +34,7 @@ mlx = ["mlx>=0.22", "mlx-lm>=0.20"]
34
34
  torch = ["torch>=2.2", "transformers>=4.45"]
35
35
  convert = ["torch>=2.2", "safetensors>=0.4"]
36
36
  demo = ["pillow>=10"]
37
+ modelscope = ["modelscope>=1.9"]
37
38
  dev = ["pytest>=8", "pillow>=10", "torch>=2.2", "transformers>=4.45"]
38
39
 
39
40
  [project.scripts]
@@ -14,8 +14,16 @@ TYPE_ALIASES = {"noul": "boolean", "boolean": "boolean", "choice": "choice", "sc
14
14
 
15
15
 
16
16
  def _resolve(model_path, subfolder: Optional[str] = None) -> Path:
17
+ """A local directory, a Hub repo id, or `modelscope:<org>/<repo>` for mirrors of
18
+ this model on ModelScope, which is reachable from places the Hub is not."""
17
19
  from .registry import resolve
18
- repo, sub = resolve(str(model_path))
20
+ name = str(model_path)
21
+ if name.startswith("modelscope:"):
22
+ from modelscope import snapshot_download as ms_download
23
+ root = Path(ms_download(name.split(":", 1)[1]))
24
+ return root / subfolder if subfolder else root
25
+
26
+ repo, sub = resolve(name)
19
27
  sub = subfolder or sub
20
28
  p = Path(repo).expanduser()
21
29
  if p.exists():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tinyjev
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Typed decisions on your laptop: one forward pass, calibrated probabilities, no text generation. MLX or PyTorch.
5
5
  Author: Ankit Aglawe
6
6
  License: MIT
@@ -36,6 +36,8 @@ Requires-Dist: torch>=2.2; extra == "convert"
36
36
  Requires-Dist: safetensors>=0.4; extra == "convert"
37
37
  Provides-Extra: demo
38
38
  Requires-Dist: pillow>=10; extra == "demo"
39
+ Provides-Extra: modelscope
40
+ Requires-Dist: modelscope>=1.9; extra == "modelscope"
39
41
  Provides-Extra: dev
40
42
  Requires-Dist: pytest>=8; extra == "dev"
41
43
  Requires-Dist: pillow>=10; extra == "dev"
@@ -63,6 +65,13 @@ Dynamic: license-file
63
65
  <a href="https://github.com/ankit-aglawe/tinyjev/tree/main/examples">Examples</a>
64
66
  </p>
65
67
 
68
+ <p>
69
+ <b>English</b> ·
70
+ <a href="https://github.com/ankit-aglawe/tinyjev/blob/main/README.zh-CN.md">简体中文</a> ·
71
+ <a href="https://github.com/ankit-aglawe/tinyjev/blob/main/README.ja.md">日本語</a> ·
72
+ <a href="https://github.com/ankit-aglawe/tinyjev/blob/main/README.ko.md">한국어</a>
73
+ </p>
74
+
66
75
  </div>
67
76
 
68
77
  TinyJev answers typed questions about text and returns probabilities, in one forward pass, on your own machine.
@@ -90,12 +99,6 @@ TinyJev is MIT licensed.
90
99
  Eight real support tickets, one after another, on a base M1. Three questions per ticket in a
91
100
  single forward pass, about 110 ms each. Every number in that recording came from a live run.
92
101
 
93
- Half of them route themselves. The other half do not, and that is the interesting part. Ticket
94
- six says the order was late, the wrong size, and double charged, so the probability spreads
95
- across all three teams and confidence falls to 0.14. Below the gate it goes to a person instead
96
- of being guessed at. A message that turns out to be a compliment does the same thing. A model
97
- that only ever returned a label would have picked a team for both.
98
-
99
102
  ```bash
100
103
  pip install 'tinyjev[mlx,demo]'
101
104
  python demos/triage_desk.py --gif demo.gif
@@ -225,7 +228,13 @@ A question is `{"type": "choice" | "noul" | "score", "instructions": ..., "crite
225
228
 
226
229
  One published model, `tinyjev-0.6b`: a Qwen3-0.6B-Base backbone with a pointer head, trained on public typed-decision data. It is a first release and it is small — on question types unlike anything it has seen, use the confidence gate rather than the raw label. Specialising it on a few hundred of your own labelled examples is the intended path and beats prompt tuning a larger model.
227
230
 
228
- Not yet: multilingual, vision, or label sets in the hundreds.
231
+ It handles other languages better than expected, which we did not train for. Translating 25 cases of
232
+ a held-out English benchmark into Chinese and re-running them scored 22/25 against 20/25 for the
233
+ English originals, with the question schema left in English. That is parity on a small sample, not
234
+ a multilingual claim, and confidence runs flatter in Chinese so fewer cases clear a fixed gate. The
235
+ backbone is Qwen3, which is where this comes from.
236
+
237
+ Not yet: vision, or label sets in the hundreds.
229
238
 
230
239
  ## Support this project
231
240
 
@@ -20,6 +20,9 @@ transformers>=4.45
20
20
  mlx>=0.22
21
21
  mlx-lm>=0.20
22
22
 
23
+ [modelscope]
24
+ modelscope>=1.9
25
+
23
26
  [torch]
24
27
  torch>=2.2
25
28
  transformers>=4.45
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes