Model card: run it in a container (recommended) or from Python; links
Browse files
README.md
CHANGED
|
@@ -5,15 +5,79 @@ tags: [decision-model, onnx, classification, jevx]
|
|
| 5 |
---
|
| 6 |
# OpenJevX v0.4.0
|
| 7 |
|
| 8 |
-
A small, fast decision model: yes/no, pick-one and 0–N rating questions about a state (JSON or text)
|
| 9 |
-
|
| 10 |
-
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
## What changed in v0.4.0
|
|
|
|
| 17 |
Fine-tuned on 443k decisions: rule-labelled everyday software-work decisions (operations/SRE,
|
| 18 |
developers, testers, tech leads, managers, agent-style checks such as log triage, dangerous
|
| 19 |
commands, prompt injection, secrets) plus a sample of the OpenJevX corpus. Every test-set
|
|
@@ -30,6 +94,12 @@ question was removed from training first (22,576 leaked questions found and drop
|
|
| 30 |
On the public typed-decisions test, questions where the human labellers agreed score ~87%;
|
| 31 |
where they disagreed (41% of the test) every model scores ~60%, which caps that benchmark.
|
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
## Fine-tune further
|
| 34 |
-
|
| 35 |
-
|
|
|
|
|
|
|
|
|
| 5 |
---
|
| 6 |
# OpenJevX v0.4.0
|
| 7 |
|
| 8 |
+
A small, fast decision model: yes/no, pick-one and 0–N rating questions about a state (JSON or text),
|
| 9 |
+
answered in about 0.2 s on a laptop CPU. **It is meant to run in a container next to your own services**:
|
| 10 |
+
one container, the model inside, your requests never leave your machine.
|
| 11 |
|
| 12 |
+
- Site: [muthuishere.github.io/openjevx](https://muthuishere.github.io/openjevx/)
|
| 13 |
+
- Server, releases, Docker image, recipes: [github.com/muthuishere/openjevx](https://github.com/muthuishere/openjevx)
|
| 14 |
+
- CLI: [jevx](https://github.com/muthuishere/jevx)
|
| 15 |
+
|
| 16 |
+
**Use `openjevx.w8.onnx`** (8-bit weight-only, 598 MB; activations stay float, so answers don't depend on
|
| 17 |
+
what else is in the request). The other files are for fine-tuning further: `model.safetensors`, `encoder/`,
|
| 18 |
+
`tokenizer/`, `rl_agent_config.json`, `openjevx.onnx` (fp32).
|
| 19 |
+
|
| 20 |
+
## Run it in a container (recommended)
|
| 21 |
+
|
| 22 |
+
```bash
|
| 23 |
+
git clone https://github.com/muthuishere/openjevx.git && cd openjevx
|
| 24 |
+
docker compose up -d --build # server + model on http://127.0.0.1:21118
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
No clone? Load the prebuilt image from the [release](https://github.com/muthuishere/openjevx/releases/latest):
|
| 28 |
+
|
| 29 |
+
```bash
|
| 30 |
+
curl -L -O https://github.com/muthuishere/openjevx/releases/download/v0.4.0/openjevx-docker-amd64.tar
|
| 31 |
+
docker load -i openjevx-docker-amd64.tar
|
| 32 |
+
docker run -d -p 127.0.0.1:21118:21118 ghcr.io/muthuishere/openjevx:latest-amd64
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
Then ask it:
|
| 36 |
+
|
| 37 |
+
```bash
|
| 38 |
+
curl -s http://127.0.0.1:21118/v1/systemone -d '{
|
| 39 |
+
"state": {"age": 17},
|
| 40 |
+
"questions": {
|
| 41 |
+
"adult": {"type": "noul", "instructions": "Is this person an adult (18 or older)?"},
|
| 42 |
+
"team": {"type": "choice", "instructions": "Which team should handle this ticket?",
|
| 43 |
+
"criteria": {"billing": "payments and charges", "engineering": "bugs and outages"}},
|
| 44 |
+
"sev": {"type": "score", "instructions": "How severe is this?", "criteria": ["low", "medium", "high"]}
|
| 45 |
+
}}'
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
Each answer has `probabilities` and a `confidence`; `noul` gives P(true), `choice` the picked key, `score` the
|
| 49 |
+
expected level. The container also serves a live dashboard on `/` and runnable examples on `/recipes`.
|
| 50 |
+
Prefer a plain binary? macOS, Linux and Windows builds are on the release page.
|
| 51 |
+
|
| 52 |
+
## Or in Python
|
| 53 |
+
|
| 54 |
+
Same answers as the server (a port of its prompt layout, markers, temperature and softmax; checked against the
|
| 55 |
+
server on the same model: identical probabilities).
|
| 56 |
+
|
| 57 |
+
```bash
|
| 58 |
+
pip install onnxruntime tokenizers huggingface_hub
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
```python
|
| 62 |
+
from huggingface_hub import hf_hub_download
|
| 63 |
+
import importlib.util
|
| 64 |
+
|
| 65 |
+
path = hf_hub_download("muthuishere/openjevx", "openjevx.py")
|
| 66 |
+
spec = importlib.util.spec_from_file_location("openjevx", path); openjevx = importlib.util.module_from_spec(spec)
|
| 67 |
+
spec.loader.exec_module(openjevx)
|
| 68 |
+
|
| 69 |
+
jev = openjevx.OpenJevX() # downloads openjevx.w8.onnx + tokenizer once
|
| 70 |
+
print(jev.decide({"age": 17}, {
|
| 71 |
+
"adult": {"type": "noul", "instructions": "Is this person an adult (18 or older)?"},
|
| 72 |
+
}))
|
| 73 |
+
# {'answers': {'adult': {'type': 'noul', 'noul': 0.1397, 'confidence': 0.8603, ...}}}
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
`openjevx.py` is a single file (also in the GitHub repo under `python/`); copy it into your project if you
|
| 77 |
+
prefer. Request and answer shapes match `POST /v1/systemone`.
|
| 78 |
|
| 79 |
## What changed in v0.4.0
|
| 80 |
+
|
| 81 |
Fine-tuned on 443k decisions: rule-labelled everyday software-work decisions (operations/SRE,
|
| 82 |
developers, testers, tech leads, managers, agent-style checks such as log triage, dangerous
|
| 83 |
commands, prompt injection, secrets) plus a sample of the OpenJevX corpus. Every test-set
|
|
|
|
| 94 |
On the public typed-decisions test, questions where the human labellers agreed score ~87%;
|
| 95 |
where they disagreed (41% of the test) every model scores ~60%, which caps that benchmark.
|
| 96 |
|
| 97 |
+
Known weak spot: simple everyday rules (thresholds, dates) are right only about two times in three in v0.4.0;
|
| 98 |
+
the next version is being trained specifically on those. The
|
| 99 |
+
[recipes](https://github.com/muthuishere/openjevx/tree/main/recipes) show honestly where it misses.
|
| 100 |
+
|
| 101 |
## Fine-tune further
|
| 102 |
+
|
| 103 |
+
The whole pipeline (data generators, leakage check, one-job GPU training that returns the 8-bit ONNX, and the
|
| 104 |
+
release gate) is in the GitHub repo under
|
| 105 |
+
[`finetuning/`](https://github.com/muthuishere/openjevx/tree/main/finetuning). No training data is published.
|