jev README

The project's README from github.com/feder-cr/jev. As one markdown file: README.md.

jevos-1b

Yes/no decisions on a laptop CPU in 50–220 ms. Send a text and a yes/no question, get back P(yes).

jevos-1b playing a Chrome Dino-style game on the CPU, answering two yes/no questions per step (recording at 2× speed)

Benchmarks

Latency on a short request: jevos-1b 54 ms, Jev 344 ms, Laya 104 ms. On a long request: jevos-1b 220 ms, Jev 345 ms, Laya 449 ms. Accuracy on 2,000 yes/no questions from unseen policies: jevos-1b 0.815, Jev 0.927, Laya 0.489

What each one does

jevos-1b Jev Laya
Yes/no questions ✓ ✓ ✓
Multiple choice Soon ✓ ✓
Scores Soon ✓ ✓
Runs on your machine cloud your machine
Cost free per token free
Context 8,192 tokens not stated 512 tokens

Quickstart

Download jevos-1b-q4_k_m.gguf from the release, then:

uv sync
uv run jev download --only runtime        # llama.cpp for this machine
uv run jev serve --gguf jevos-1b-q4_k_m.gguf --device cpu --threads 16
curl http://127.0.0.1:8017/v1/systemone -H 'Content-Type: application/json' -d '{
  "model": "jev-latest",
  "state": "I was charged twice for the same order.",
  "questions": {"billing": {"type": "noul", "instructions": "Is this a billing problem?"}}}'
{
  "model": "jevos-1b-q4_k_m",
  "answers": {"billing": {"type": "noul", "noul": 0.9}},
  "usage": {"input_tokens": 27, "output_tokens": 0}
}

Then open http://127.0.0.1:8017/dino to watch it play.

API

The server speaks TypeSafe Jev's wire format, so code written for Jev's SDK works unchanged for yes/no questions.

POST /v1/systemone

Field What it is
model jev-latest (any jev-* name works) or the served model's name
state the text to decide on: a string, or any JSON object or array
questions one or more named questions, each {"type": "noul", "instructions": "…?"}

Every answer is noul, the probability that the answer is yes (0 to 1). Questions in the same request share the state, which is read once: the three questions below take about 165 ms together, against 103 ms for one of them alone.

{
  "model": "jev-latest",
  "state": {
    "item": "wireless mouse",
    "delivered": "5 days ago",
    "customer_message": "The box arrived empty. This is the second time!"
  },
  "questions": {
    "refund": {
      "type": "noul",
      "instructions": "Our policy refunds items reported missing within 30 days of delivery. Should this customer get a refund?"
    },
    "upset": {"type": "noul", "instructions": "Is the customer upset?"},
    "wrong_item": {"type": "noul", "instructions": "Does the customer say they received the wrong item?"}
  }
}
{
  "model": "jevos-1b-q4_k_m",
  "answers": {
    "refund": {"type": "noul", "noul": 0.78},
    "upset": {"type": "noul", "noul": 0.73},
    "wrong_item": {"type": "noul", "noul": 0.1}
  },
  "usage": {"input_tokens": 95, "output_tokens": 0}
}

Other endpoints

Endpoint Returns
GET /v1/models the served model and its jev-latest alias
GET /health {"status": "ready", …} once the model is loaded

From Python

import requests

answer = requests.post("http://127.0.0.1:8017/v1/systemone", json={
    "model": "jev-latest",
    "state": "I was charged twice for the same order.",
    "questions": {"billing": {"type": "noul", "instructions": "Is this a billing problem?"}},
}).json()

if answer["answers"]["billing"]["noul"] > 0.5:
    print("send to billing")

Server options

Option Default
--gguf path to the model file
--device auto cpu to stay on the CPU
--threads 4 CPU threads; set it to your core count, fewer if other heavy apps are running
--host, --port 127.0.0.1, 8017 where the server listens

Credits

Built together with Loris Salsi (@LosaLosSantos).

jev (feder-cr/jev)

Searching Database…

1.4K ·GitHub
What is this?jevos-1b is a free, open-source yes/no decision engine that runs locally on your laptop's CPU, returning the probability that the answer is 'yes' for a given text plus question in about 50-220 ms, as a self-hosted alternative to the cloud-based Jev service.
Is this a library I import, or a server I run?It is a standalone HTTP server exposing a POST /v1/systemone endpoint that speaks the same wire format as Jev's SDK, so existing Jev client code works against it unchanged.
How do I get it running?Download the jevos-1b-q4km.gguf model file from the project's GitHub release, then launch the server pointing --gguf at that file.
Can it answer multiple-choice or scored questions, not just yes/no?Not yet - only yes/no (noul) questions work today; sending a choice or score question is refused with a 422 error, though both are marked 'Soon' on the roadmap.
Does my text ever get sent to a cloud server?No - unlike Jev, which runs in the cloud, jevos-1b (like Laya) runs entirely on your own machine, so nothing leaves your computer.
How does jevos-1b stack up against the real Jev service?It matches Jev on yes/no questions and is free and offline instead of per-token and cloud-hosted, but it doesn't yet support multiple-choice or scored questions, which Jev already offers.
What model is actually running under the hood?It's a MiniCPM-based model shipped as a quantized GGUF file (jevos-1b-q4km.gguf) and served through CPU-based llama.cpp-style inference.
Can I ask several questions about the same piece of text at once?Yes - a single request can carry multiple named questions that share the same state, which is read only once, so three questions together take about 165 ms versus 103 ms for one alone.
What can I put in the 'state' field besides plain text?The state can be a plain string or any JSON object or array; the model reads it once and answers every question in the request against it.
Creator
feder-cr
Size
17.5 MB
Stars
1.4K
Age
2y
Commits · 90 Days