jev-lite 0.0.1__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.
- jev_lite-0.0.1/.env.example +18 -0
- jev_lite-0.0.1/.envrc.example +1 -0
- jev_lite-0.0.1/.github/workflows/ci.yml +33 -0
- jev_lite-0.0.1/.github/workflows/publish.yml +60 -0
- jev_lite-0.0.1/.gitignore +18 -0
- jev_lite-0.0.1/AGENTS.md +10 -0
- jev_lite-0.0.1/LICENSE +201 -0
- jev_lite-0.0.1/PKG-INFO +128 -0
- jev_lite-0.0.1/README.md +89 -0
- jev_lite-0.0.1/cache/README.md +10 -0
- jev_lite-0.0.1/docs/PRINCIPLES.md +7 -0
- jev_lite-0.0.1/docs/README.md +21 -0
- jev_lite-0.0.1/docs/alternatives/README.md +38 -0
- jev_lite-0.0.1/docs/alternatives/census.md +31 -0
- jev_lite-0.0.1/docs/alternatives/decider.md +50 -0
- jev_lite-0.0.1/docs/alternatives/jevbench.md +40 -0
- jev_lite-0.0.1/docs/alternatives/joshuasp-open-jev.md +37 -0
- jev_lite-0.0.1/docs/alternatives/kev.md +19 -0
- jev_lite-0.0.1/docs/alternatives/laya.md +45 -0
- jev_lite-0.0.1/docs/alternatives/razorback-openjev.md +27 -0
- jev_lite-0.0.1/docs/alternatives/semif.md +25 -0
- jev_lite-0.0.1/docs/alternatives/simple-jev.md +26 -0
- jev_lite-0.0.1/docs/alternatives/system-one-gemma.md +19 -0
- jev_lite-0.0.1/docs/alternatives/system-one-open.md +43 -0
- jev_lite-0.0.1/docs/alternatives/untried.md +40 -0
- jev_lite-0.0.1/docs/architecture-candidates.md +20 -0
- jev_lite-0.0.1/docs/architecture.md +30 -0
- jev_lite-0.0.1/docs/distill.md +31 -0
- jev_lite-0.0.1/docs/engine.md +33 -0
- jev_lite-0.0.1/docs/evals.md +57 -0
- jev_lite-0.0.1/docs/multilingual.md +47 -0
- jev_lite-0.0.1/docs/project.md +70 -0
- jev_lite-0.0.1/docs/release.md +34 -0
- jev_lite-0.0.1/docs/roadmap.md +31 -0
- jev_lite-0.0.1/docs/storage.md +26 -0
- jev_lite-0.0.1/docs/typesafe.md +42 -0
- jev_lite-0.0.1/evals/jevbench/README.md +17 -0
- jev_lite-0.0.1/evals/jevbench/easy.jsonl +48 -0
- jev_lite-0.0.1/evals/jevbench/hard.jsonl +111 -0
- jev_lite-0.0.1/evals/jevbench/original.jsonl +72 -0
- jev_lite-0.0.1/evals/seed.jsonl +8 -0
- jev_lite-0.0.1/evals/teacher_jev-1.13.0.jsonl +8 -0
- jev_lite-0.0.1/examples/frozen_smoke.py +56 -0
- jev_lite-0.0.1/examples/quickstart.py +59 -0
- jev_lite-0.0.1/jev_lite/__init__.py +70 -0
- jev_lite-0.0.1/jev_lite/_client.py +364 -0
- jev_lite-0.0.1/jev_lite/_constants.py +19 -0
- jev_lite-0.0.1/jev_lite/_exceptions.py +189 -0
- jev_lite-0.0.1/jev_lite/_resource.py +18 -0
- jev_lite-0.0.1/jev_lite/_telemetry.py +105 -0
- jev_lite-0.0.1/jev_lite/_version.py +3 -0
- jev_lite-0.0.1/jev_lite/engine/__init__.py +30 -0
- jev_lite-0.0.1/jev_lite/engine/backbone.py +348 -0
- jev_lite-0.0.1/jev_lite/engine/evaluate.py +189 -0
- jev_lite-0.0.1/jev_lite/engine/frozen.py +105 -0
- jev_lite-0.0.1/jev_lite/engine/hashing.py +46 -0
- jev_lite-0.0.1/jev_lite/engine/head.py +57 -0
- jev_lite-0.0.1/jev_lite/engine/hf.py +131 -0
- jev_lite-0.0.1/jev_lite/engine/interaction.py +84 -0
- jev_lite-0.0.1/jev_lite/engine/letters.py +21 -0
- jev_lite-0.0.1/jev_lite/engine/lexical.py +45 -0
- jev_lite-0.0.1/jev_lite/engine/pairs.py +106 -0
- jev_lite-0.0.1/jev_lite/engine/prompt.py +48 -0
- jev_lite-0.0.1/jev_lite/engine/protocol.py +31 -0
- jev_lite-0.0.1/jev_lite/engine/render.py +32 -0
- jev_lite-0.0.1/jev_lite/engine/slots.py +77 -0
- jev_lite-0.0.1/jev_lite/engine/system_one.py +92 -0
- jev_lite-0.0.1/jev_lite/eval/__init__.py +12 -0
- jev_lite-0.0.1/jev_lite/eval/__main__.py +6 -0
- jev_lite-0.0.1/jev_lite/eval/ban.py +26 -0
- jev_lite-0.0.1/jev_lite/eval/collect.py +64 -0
- jev_lite-0.0.1/jev_lite/eval/collect_public.py +105 -0
- jev_lite-0.0.1/jev_lite/eval/decode.py +20 -0
- jev_lite-0.0.1/jev_lite/eval/distill.py +199 -0
- jev_lite-0.0.1/jev_lite/eval/env.py +20 -0
- jev_lite-0.0.1/jev_lite/eval/jevbench.py +199 -0
- jev_lite-0.0.1/jev_lite/eval/json_cache.py +45 -0
- jev_lite-0.0.1/jev_lite/eval/langs.py +103 -0
- jev_lite-0.0.1/jev_lite/eval/metrics.py +67 -0
- jev_lite-0.0.1/jev_lite/eval/ollama.py +113 -0
- jev_lite-0.0.1/jev_lite/eval/public_states.py +188 -0
- jev_lite-0.0.1/jev_lite/eval/questions_gen.py +107 -0
- jev_lite-0.0.1/jev_lite/eval/schema.py +39 -0
- jev_lite-0.0.1/jev_lite/eval/targets.py +22 -0
- jev_lite-0.0.1/jev_lite/eval/teacher_cache.py +116 -0
- jev_lite-0.0.1/jev_lite/eval/tokenizer_gate.py +60 -0
- jev_lite-0.0.1/jev_lite/eval/train_head.py +195 -0
- jev_lite-0.0.1/jev_lite/eval/translate_public.py +180 -0
- jev_lite-0.0.1/jev_lite/py.typed +0 -0
- jev_lite-0.0.1/jev_lite/resources/__init__.py +17 -0
- jev_lite-0.0.1/jev_lite/resources/models.py +99 -0
- jev_lite-0.0.1/jev_lite/resources/system_one.py +189 -0
- jev_lite-0.0.1/jev_lite/types.py +187 -0
- jev_lite-0.0.1/pyproject.toml +142 -0
- jev_lite-0.0.1/tests/test_backbone.py +21 -0
- jev_lite-0.0.1/tests/test_client.py +365 -0
- jev_lite-0.0.1/tests/test_distill.py +146 -0
- jev_lite-0.0.1/tests/test_engine.py +139 -0
- jev_lite-0.0.1/tests/test_eval.py +69 -0
- jev_lite-0.0.1/tests/test_frozen.py +150 -0
- jev_lite-0.0.1/tests/test_jevbench.py +157 -0
- jev_lite-0.0.1/tests/test_pairs.py +125 -0
- jev_lite-0.0.1/tests/test_teacher_cache.py +98 -0
- jev_lite-0.0.1/tests/test_telemetry.py +60 -0
- jev_lite-0.0.1/tests/test_types.py +74 -0
- jev_lite-0.0.1/uv.lock +2827 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
TYPESAFE_API_KEY=
|
|
2
|
+
AI_GATEWAY_API_KEY=
|
|
3
|
+
TYPESAFE_BASE_URL=https://api.typesafe.ai
|
|
4
|
+
TYPESAFE_DEFAULT_MODEL=jev-latest
|
|
5
|
+
|
|
6
|
+
# Optional. Only used after jev_lite.instrument().
|
|
7
|
+
# Local Grafana LGTM HTTP OTLP is typically http://127.0.0.1:4318
|
|
8
|
+
OTEL_SERVICE_NAME=jev-lite
|
|
9
|
+
OTEL_EXPORTER_OTLP_ENDPOINT=http://127.0.0.1:4318
|
|
10
|
+
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
|
|
11
|
+
|
|
12
|
+
# Ollama Configuration (OpenAI-compatible). Distill generators only — not a teacher.
|
|
13
|
+
OLLAMA_BASE_URL=https://ollama.com/v1
|
|
14
|
+
OLLAMA_API_KEY=
|
|
15
|
+
|
|
16
|
+
# LiteLLM (OpenAI-compatible). Preferred generator gateway.
|
|
17
|
+
LITELLM_BASE_URL=
|
|
18
|
+
LITELLM_API_KEY=
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
dotenv
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
test:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
strategy:
|
|
15
|
+
fail-fast: false
|
|
16
|
+
matrix:
|
|
17
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v5
|
|
20
|
+
|
|
21
|
+
- uses: astral-sh/setup-uv@v6
|
|
22
|
+
with:
|
|
23
|
+
python-version: ${{ matrix.python-version }}
|
|
24
|
+
enable-cache: true
|
|
25
|
+
|
|
26
|
+
- name: Lint
|
|
27
|
+
run: uv run --locked ruff check . && uv run --locked ruff format --check .
|
|
28
|
+
|
|
29
|
+
- name: Test
|
|
30
|
+
run: uv run --locked pytest
|
|
31
|
+
|
|
32
|
+
- name: Build
|
|
33
|
+
run: uv build
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v5
|
|
16
|
+
with:
|
|
17
|
+
persist-credentials: false
|
|
18
|
+
|
|
19
|
+
- uses: astral-sh/setup-uv@v6
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.11"
|
|
22
|
+
enable-cache: true
|
|
23
|
+
|
|
24
|
+
- name: Check tag matches package version
|
|
25
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
26
|
+
run: |
|
|
27
|
+
expected="v$(uv run --locked python -c 'from jev_lite._version import __version__; print(__version__)')"
|
|
28
|
+
actual="${GITHUB_REF_NAME}"
|
|
29
|
+
if [ "$actual" != "$expected" ]; then
|
|
30
|
+
echo "tag $actual does not match package version $expected"
|
|
31
|
+
exit 1
|
|
32
|
+
fi
|
|
33
|
+
|
|
34
|
+
- name: Lint and test
|
|
35
|
+
run: uv run --locked ruff check . && uv run --locked ruff format --check . && uv run --locked pytest
|
|
36
|
+
|
|
37
|
+
- name: Build
|
|
38
|
+
run: uv build
|
|
39
|
+
|
|
40
|
+
- uses: actions/upload-artifact@v4
|
|
41
|
+
with:
|
|
42
|
+
name: dist
|
|
43
|
+
path: dist/
|
|
44
|
+
|
|
45
|
+
publish:
|
|
46
|
+
needs: build
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
environment:
|
|
49
|
+
name: pypi
|
|
50
|
+
url: https://pypi.org/p/jev-lite
|
|
51
|
+
permissions:
|
|
52
|
+
id-token: write
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/download-artifact@v4
|
|
55
|
+
with:
|
|
56
|
+
name: dist
|
|
57
|
+
path: dist/
|
|
58
|
+
|
|
59
|
+
- name: Publish to PyPI
|
|
60
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
jev_lite-0.0.1/AGENTS.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Agents
|
|
2
|
+
|
|
3
|
+
English. Python 3.11+, **uv**, **ruff**. Package is `jev_lite/` at repo root.
|
|
4
|
+
|
|
5
|
+
Read **[docs/README.md](docs/README.md)** first, then the linked files.
|
|
6
|
+
|
|
7
|
+
- Public API: `TypeSafe` / `AsyncTypeSafe`. Teacher is TypeSafe `jev-1.13.0`.
|
|
8
|
+
- Jev-class: encode `state` once, closed-set softmax, **no `generate()`**.
|
|
9
|
+
- Tracing is opt-in (`from jev_lite import instrument`). Never commit `.env` or keys.
|
|
10
|
+
- Do not publish until the owner confirms. Tag must match `jev_lite/_version.py`.
|
jev_lite-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
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, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
jev_lite-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: jev-lite
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: OpenAI-style sync and async Pydantic client for TypeSafe Jev (System One).
|
|
5
|
+
Project-URL: Documentation, https://github.com/allen2c/jev-lite#readme
|
|
6
|
+
Project-URL: Homepage, https://github.com/allen2c/jev-lite
|
|
7
|
+
Project-URL: Issues, https://github.com/allen2c/jev-lite/issues
|
|
8
|
+
Project-URL: Repository, https://github.com/allen2c/jev-lite
|
|
9
|
+
Author-email: Allen Chou <f1470891079@gmail.com>
|
|
10
|
+
License-Expression: Apache-2.0
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: jev,openai,opentelemetry,pydantic,system-one,typesafe
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
+
Classifier: Typing :: Typed
|
|
25
|
+
Requires-Python: >=3.11
|
|
26
|
+
Requires-Dist: httpx>=0.23
|
|
27
|
+
Requires-Dist: opentelemetry-api>=1.20
|
|
28
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.20
|
|
29
|
+
Requires-Dist: opentelemetry-sdk>=1.20
|
|
30
|
+
Requires-Dist: pydantic>=2
|
|
31
|
+
Provides-Extra: distill
|
|
32
|
+
Requires-Dist: datasets>=2; extra == 'distill'
|
|
33
|
+
Provides-Extra: ml
|
|
34
|
+
Requires-Dist: pillow>=9; extra == 'ml'
|
|
35
|
+
Requires-Dist: torch>=2.1; extra == 'ml'
|
|
36
|
+
Requires-Dist: torchvision>=0.16; extra == 'ml'
|
|
37
|
+
Requires-Dist: transformers>=4.40; extra == 'ml'
|
|
38
|
+
Description-Content-Type: text/markdown
|
|
39
|
+
|
|
40
|
+
# jev-lite
|
|
41
|
+
|
|
42
|
+
OpenAI-style Python client for [TypeSafe Jev](https://typesafe.ai/) (System One).
|
|
43
|
+
|
|
44
|
+
Jev does not generate text. Send `state` plus typed questions; get structured
|
|
45
|
+
decisions with probabilities. This first release (`v0.0.1`) is the official
|
|
46
|
+
TypeSafe HTTP client — sync and async, same shape as the OpenAI Python SDK.
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pip install jev-lite
|
|
50
|
+
# or: uv add jev-lite
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Python 3.11+. Set `TYPESAFE_API_KEY`. Docs: <https://docs.typesafe.ai/>
|
|
54
|
+
|
|
55
|
+
## Usage
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
from jev_lite import Choice, Noul, Score, TypeSafe
|
|
59
|
+
|
|
60
|
+
client = TypeSafe() # TYPESAFE_API_KEY
|
|
61
|
+
|
|
62
|
+
result = client.system_one.create(
|
|
63
|
+
state="I was charged twice. Please fix this ASAP.",
|
|
64
|
+
questions={
|
|
65
|
+
"billing": Noul(instructions="Is this ticket about billing?"),
|
|
66
|
+
"tone": Choice(
|
|
67
|
+
instructions="What is the customer's tone?",
|
|
68
|
+
criteria={"calm": None, "frustrated": None, "angry": None},
|
|
69
|
+
),
|
|
70
|
+
"urgency": Score(
|
|
71
|
+
instructions="How urgent is this ticket?",
|
|
72
|
+
criteria=["can wait", "this week", "today"],
|
|
73
|
+
),
|
|
74
|
+
},
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
print(result.nouls["billing"].noul)
|
|
78
|
+
print(result.choices["tone"].choice)
|
|
79
|
+
print(result.scores["urgency"].score)
|
|
80
|
+
print(result.elapsed_ms, result.request_id, result.usage)
|
|
81
|
+
print(client.models.list()) # GET /v1/models
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Async is the same surface with `await`:
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
from jev_lite import AsyncTypeSafe, Noul
|
|
88
|
+
|
|
89
|
+
async with AsyncTypeSafe() as client:
|
|
90
|
+
result = await client.system_one.create(
|
|
91
|
+
state="I was charged twice. Please fix this ASAP.",
|
|
92
|
+
questions={"billing": Noul(instructions="Is this ticket about billing?")},
|
|
93
|
+
)
|
|
94
|
+
models = await client.models.list()
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Pin the model with `TypeSafe(model="jev-1.13.0")` (or `TYPESAFE_DEFAULT_MODEL`);
|
|
98
|
+
`jev-latest` moves. Prefer one `system_one.create` with many questions over a
|
|
99
|
+
loop of calls.
|
|
100
|
+
|
|
101
|
+
## Tracing
|
|
102
|
+
|
|
103
|
+
Off by default. Opt in and pick the destination:
|
|
104
|
+
|
|
105
|
+
```python
|
|
106
|
+
from jev_lite import instrument
|
|
107
|
+
|
|
108
|
+
instrument(endpoint="http://127.0.0.1:4318") # local Grafana LGTM
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Or set `OTEL_EXPORTER_OTLP_ENDPOINT` and call `instrument()`, or install your
|
|
112
|
+
own `TracerProvider` first (Logfire, etc.). Spans record prompt, result, and
|
|
113
|
+
latency.
|
|
114
|
+
|
|
115
|
+
## Develop
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
uv sync --dev
|
|
119
|
+
uv run ruff check . && uv run pytest
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
The supported public API is the TypeSafe client. Optional local engines live
|
|
123
|
+
under `jev_lite.engine` (`pip install 'jev-lite[ml]'`). See
|
|
124
|
+
[docs/](https://github.com/allen2c/jev-lite/tree/main/docs).
|
|
125
|
+
|
|
126
|
+
## License
|
|
127
|
+
|
|
128
|
+
Apache-2.0
|
jev_lite-0.0.1/README.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# jev-lite
|
|
2
|
+
|
|
3
|
+
OpenAI-style Python client for [TypeSafe Jev](https://typesafe.ai/) (System One).
|
|
4
|
+
|
|
5
|
+
Jev does not generate text. Send `state` plus typed questions; get structured
|
|
6
|
+
decisions with probabilities. This first release (`v0.0.1`) is the official
|
|
7
|
+
TypeSafe HTTP client — sync and async, same shape as the OpenAI Python SDK.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install jev-lite
|
|
11
|
+
# or: uv add jev-lite
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Python 3.11+. Set `TYPESAFE_API_KEY`. Docs: <https://docs.typesafe.ai/>
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```python
|
|
19
|
+
from jev_lite import Choice, Noul, Score, TypeSafe
|
|
20
|
+
|
|
21
|
+
client = TypeSafe() # TYPESAFE_API_KEY
|
|
22
|
+
|
|
23
|
+
result = client.system_one.create(
|
|
24
|
+
state="I was charged twice. Please fix this ASAP.",
|
|
25
|
+
questions={
|
|
26
|
+
"billing": Noul(instructions="Is this ticket about billing?"),
|
|
27
|
+
"tone": Choice(
|
|
28
|
+
instructions="What is the customer's tone?",
|
|
29
|
+
criteria={"calm": None, "frustrated": None, "angry": None},
|
|
30
|
+
),
|
|
31
|
+
"urgency": Score(
|
|
32
|
+
instructions="How urgent is this ticket?",
|
|
33
|
+
criteria=["can wait", "this week", "today"],
|
|
34
|
+
),
|
|
35
|
+
},
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
print(result.nouls["billing"].noul)
|
|
39
|
+
print(result.choices["tone"].choice)
|
|
40
|
+
print(result.scores["urgency"].score)
|
|
41
|
+
print(result.elapsed_ms, result.request_id, result.usage)
|
|
42
|
+
print(client.models.list()) # GET /v1/models
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Async is the same surface with `await`:
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
from jev_lite import AsyncTypeSafe, Noul
|
|
49
|
+
|
|
50
|
+
async with AsyncTypeSafe() as client:
|
|
51
|
+
result = await client.system_one.create(
|
|
52
|
+
state="I was charged twice. Please fix this ASAP.",
|
|
53
|
+
questions={"billing": Noul(instructions="Is this ticket about billing?")},
|
|
54
|
+
)
|
|
55
|
+
models = await client.models.list()
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Pin the model with `TypeSafe(model="jev-1.13.0")` (or `TYPESAFE_DEFAULT_MODEL`);
|
|
59
|
+
`jev-latest` moves. Prefer one `system_one.create` with many questions over a
|
|
60
|
+
loop of calls.
|
|
61
|
+
|
|
62
|
+
## Tracing
|
|
63
|
+
|
|
64
|
+
Off by default. Opt in and pick the destination:
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
from jev_lite import instrument
|
|
68
|
+
|
|
69
|
+
instrument(endpoint="http://127.0.0.1:4318") # local Grafana LGTM
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Or set `OTEL_EXPORTER_OTLP_ENDPOINT` and call `instrument()`, or install your
|
|
73
|
+
own `TracerProvider` first (Logfire, etc.). Spans record prompt, result, and
|
|
74
|
+
latency.
|
|
75
|
+
|
|
76
|
+
## Develop
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
uv sync --dev
|
|
80
|
+
uv run ruff check . && uv run pytest
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The supported public API is the TypeSafe client. Optional local engines live
|
|
84
|
+
under `jev_lite.engine` (`pip install 'jev-lite[ml]'`). See
|
|
85
|
+
[docs/](https://github.com/allen2c/jev-lite/tree/main/docs).
|
|
86
|
+
|
|
87
|
+
## License
|
|
88
|
+
|
|
89
|
+
Apache-2.0
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Local caches
|
|
2
|
+
|
|
3
|
+
Gitignored. TypeSafe teacher calls: `cache/typesafe/` (diskcache).
|
|
4
|
+
Generator JSON: `cache/ollama/`.
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
uv run python -m jev_lite.eval --seed evals/seed.jsonl --out evals/local/teacher.jsonl
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
A second run with the same `(model, state, questions)` does not hit the API.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Principles
|
|
2
|
+
|
|
3
|
+
- Code owns control flow. Jev answers atomic typed questions; compose in Python.
|
|
4
|
+
- Prefer one `system_one.create` with many questions over a loop of calls.
|
|
5
|
+
- Log `request_id`, resolved `model`, full probabilities, and `elapsed_ms`.
|
|
6
|
+
- Tracing is opt-in (`instrument()`). Never assume a collector.
|
|
7
|
+
- English only in the repo. Ruff formats; do not fight the formatter.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Docs
|
|
2
|
+
|
|
3
|
+
Keep each file under ~100 lines (150 max). `AGENTS.md` only points here.
|
|
4
|
+
|
|
5
|
+
| File | What |
|
|
6
|
+
| --- | --- |
|
|
7
|
+
| [PRINCIPLES.md](PRINCIPLES.md) | Code owns control flow; opt-in tracing |
|
|
8
|
+
| [project.md](project.md) | Package layout, client, tracing |
|
|
9
|
+
| [release.md](release.md) | v0.0.1 freeze, PyPI Trusted Publishing |
|
|
10
|
+
| [typesafe.md](typesafe.md) | Live TypeSafe API notes |
|
|
11
|
+
| [architecture.md](architecture.md) | Jev invariants; encoder + slots |
|
|
12
|
+
| [architecture-candidates.md](architecture-candidates.md) | L English baseline; M3 multilingual text |
|
|
13
|
+
| [engine.md](engine.md) | Encode-once + closed-set softmax |
|
|
14
|
+
| [evals.md](evals.md) | Smoke vs Jev 1.13; public rank is JevBench |
|
|
15
|
+
| [multilingual.md](multilingual.md) | Internal language gate; translations are not a score |
|
|
16
|
+
| [distill.md](distill.md) | Teacher cache + mix (Jev-only; no JevBench) |
|
|
17
|
+
| [roadmap.md](roadmap.md) | What we will and will not build |
|
|
18
|
+
| [storage.md](storage.md) | HDD namespace, repo symlinks |
|
|
19
|
+
| [alternatives/](alternatives/README.md) | Open replicas; [jevbench.md](alternatives/jevbench.md) |
|
|
20
|
+
|
|
21
|
+
Official TypeSafe docs: <https://docs.typesafe.ai/>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Open Jev replicas
|
|
2
|
+
|
|
3
|
+
Live bake-off vs **jev-1.13.0** on 16 System One cases (8 in `evals/seed.jsonl`
|
|
4
|
+
plus 8 extra in gitignored `tmp/research_notes/seed_v2.jsonl`). Teacher and
|
|
5
|
+
raw HTTP logs: `tmp/research_notes/logs/`. Clones: `tmp/research_notes/clones/`
|
|
6
|
+
(NVMe). Date: 2026-09-19.
|
|
7
|
+
|
|
8
|
+
**This table is a smoke ranking.** Published comparisons use
|
|
9
|
+
[JevBench v1.2.2](jevbench.md). Systems we have not run:
|
|
10
|
+
[untried.md](untried.md). Local students we will train:
|
|
11
|
+
[architecture-candidates.md](../architecture-candidates.md).
|
|
12
|
+
|
|
13
|
+
## Ranking (18 Choice / 39 Noul / 7 Score)
|
|
14
|
+
|
|
15
|
+
| Rank | Project | How | p50 ms | Choice | Noul MAE | Score MAE |
|
|
16
|
+
| ---: | --- | --- | ---: | ---: | ---: | ---: |
|
|
17
|
+
| — | official Jev 1.13.0 | API | 652 | 1.00 | 0.003 | 0.001 |
|
|
18
|
+
| 1 | **[simple-jev](simple-jev.md) Qwen3.8-27B** | hosted logits | 1243 | **0.83** | **0.040** | **0.028** |
|
|
19
|
+
| 2 | **[decider-0.8b](decider.md)** | local CUDA | **33** | 0.72 | 0.128 | 0.481 |
|
|
20
|
+
| 3 | [system-one-open](system-one-open.md) E2B | Modal | 991 | 0.67 | 0.092 | 0.350 |
|
|
21
|
+
| 4 | [kev-0.5b](kev.md) | local CUDA | **18** | 0.67 | 0.439 | 0.726 |
|
|
22
|
+
| 5 | [laya](laya.md) 421M | local CUDA | 22 | 0.61 | 0.321 | 0.745 |
|
|
23
|
+
| 6 | [system-one-gemma](system-one-gemma.md) | local | 49 | 0.56 | 0.376 | 0.669 |
|
|
24
|
+
| 7 | simple-jev RWKV-mid | hosted | 985 | 0.22 | 0.440 | 0.585 |
|
|
25
|
+
|
|
26
|
+
Nimble Modal was HTTP 503. [SemIf](semif.md) is the frozen-logit shape this
|
|
27
|
+
repo copies; not re-run on seed_v2.
|
|
28
|
+
|
|
29
|
+
## Pick
|
|
30
|
+
|
|
31
|
+
- **Closest answers:** Simple Jev + Qwen3.8-27B (`POST /v1/systemone`).
|
|
32
|
+
- **Best local trained head:** `Mapika/decider-0.8b` (~33 ms warm).
|
|
33
|
+
- **Fastest, not a teacher:** kev / Laya (Noul/Score MAE is large).
|
|
34
|
+
- **This repo’s student:** not a replica of the rows above. English
|
|
35
|
+
baseline is pair L; multilingual text candidate is M3.
|
|
36
|
+
[architecture-candidates.md](../architecture-candidates.md).
|
|
37
|
+
|
|
38
|
+
Inspect-only clones: [census.md](census.md).
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Clone census (2026-09-19)
|
|
2
|
+
|
|
3
|
+
Shallow clones: `tmp/research_notes/clones/` (gitignored `tmp/`). 35 ok;
|
|
4
|
+
`AlexWortega/openjev` 404. Live bake-off: [README.md](README.md). Not run yet:
|
|
5
|
+
[untried.md](untried.md). Canonical score: [jevbench.md](jevbench.md).
|
|
6
|
+
|
|
7
|
+
## Inspected, not ranked on seed_v2
|
|
8
|
+
|
|
9
|
+
| Repo | Note |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| us/jev-local | `/v1/systemone` stub (hash scorer). Schema-valid, no intelligence. |
|
|
12
|
+
| bespokelabsai/nimble | Qwen3.5-9B LoRA; public Modal **503**. Author holdout 90% vs Jev 93% (synthetic). |
|
|
13
|
+
| ekzhang/openjev-sglang | Jev wire on Qwen 35B-A3B + SGLang; needs B200. |
|
|
14
|
+
| githubnext/localjev | Bun bridge; needs local DiffusionGemma `:8000`. |
|
|
15
|
+
| Argos1111/jev_local | llama.cpp LFM2.5 behind `/v1/systemone` (≠ us/jev-local). |
|
|
16
|
+
| TianyuCodings/NanoJev | 0.6B heads; local `/api/evaluate`, type `boolean` not `noul`. |
|
|
17
|
+
| vinnylarouge/jevlike | Option-attention; no System One HTTP. |
|
|
18
|
+
| olanotolu/jevbetter | Stronger jevlike head; synthetic menus. |
|
|
19
|
+
| zhengxuyu/litjev | Frozen Qwen `/v1/systemone`; default 27B. |
|
|
20
|
+
| kshetrajna12/reflex | Frozen Qwen `/v1/systemone`; Python `<3.13`. |
|
|
21
|
+
| rorshopping/jev-on-a-laptop | MLX parallel decode study. |
|
|
22
|
+
| bnsd55/jevmlx, hr98w/jev-visual, daseinlabs/open-jev | Apple MLX. |
|
|
23
|
+
| NullPo-jp/PocketJev | iOS. |
|
|
24
|
+
| OmniJev/PlayJev | Game VLM, not general System One. |
|
|
25
|
+
| typesafe-ai/system-one-adapter-python | Official LLM adapter, not a replica. |
|
|
26
|
+
| TheoLeeCJ/openjev | Redirect to [SemIf](semif.md). |
|
|
27
|
+
|
|
28
|
+
HF-only weights: `harshatheg/Qwen-2.5-1B-RLCD`, `LFM2.5-*-RLCD`,
|
|
29
|
+
`pngwn/system-one-qwen3.5-4b-scorer`, `DavidHatley/system-one-mini`.
|
|
30
|
+
|
|
31
|
+
No Seagate writes. Weights stayed on NVMe HF cache.
|