jev README

项目的 README,来自 github.com/feder-cr/jev。合并为一个 markdown 文件:README.md。

jevos, decisions on a laptop CPU. An animation: a text and a question sent to /v1/systemone, the probability that comes back, 28 ms against 129, 311 and 3,060 for the others, and the one binary that serves it.

Decisions on a laptop CPU in 28–130 ms. Send a text and a question (yes/no, multiple choice or a score) and get back the probability of each answer, in TypeSafe Jev's API, on your own machine.

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

Quickstart

From the release, download the archive for your system and jevos-v5-openvino-int8.zip, then:

tar -xzf jev-linux-x64.tar.gz                 # Windows: unzip jev-windows-x64.zip
cd jev
unzip ../jevos-v5-openvino-int8.zip           # creates model/
./jev serve                                   # Windows: jev.exe serve

The model is also on Hugging Face, feder-cr/jev: hf download feder-cr/jev --include "model/*" --local-dir jev puts it in jev/model/.

curl http://127.0.0.1:8017/v1/systemone -H 'Content-Type: application/json' -d '{
  "model": "jev-latest",
  "state": "My invoice shows a charge I do not recognize.",
  "questions": {"billing": {"type": "noul", "instructions": "Is this a billing problem?"}}}'
{"model": "jevos-v5", "answers": {"billing": {"type": "noul", "noul": 0.97}}, "usage": {"input_tokens": 28, "output_tokens": 0}}

One binary, CPU only, no Python. The release and the Hugging Face repo also have the model as GGUF for llama.cpp.

Benchmarks

Latency on a short / long request: jevos-v5 30 / 132 ms; Jev 311 / 314 ms; Qwen3.5-4B 3,060 / 4,761 ms; Laya 129 / 480 ms. Accuracy on 7 tasks (Admission policy, Rental policy, Rules and scenarios, Agent rules, Authority rules, Fraud points, Patent phrases): jevos-v5 0.92, 0.81, 0.76, 0.74, 0.79, 0.53, 0.36; Jev 1.00, 0.91, 0.88, 0.85, 0.98, 0.69, 0.59; Qwen3.5-4B 0.82, 0.60, 0.72, 0.60, 0.78, 0.45, 0.18; Laya 0.54, 0.31, 0.55, 0.45, 0.64, 0.25, 0.32

Same questions for every system, through the same HTTP client. Latency is the median of 10 requests (for jevos, of 40 over four sessions) on an Intel Core Ultra 7 255H laptop, 16 threads, each text read from scratch. No task text was used to train jevos; all seven sets were among those used to choose the released checkpoint.

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

API

POST /v1/systemone, in TypeSafe Jev's wire format: code written for Jev's SDK works unchanged for yes/no questions. One request can ask several questions about the same text, which is read once:

{
  "model": "jev-latest",
  "state": {"item": "wireless mouse", "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?"},
    "team": {"type": "choice", "instructions": "Which team should handle this message?",
             "criteria": {"billing": "payments, refunds", "shipping": "deliveries, missing parcels", "tech": "a product that does not work"}},
    "anger": {"type": "score", "instructions": "How angry is the customer?", "criteria": ["calm", "annoyed", "angry", "furious"]}
  }
}

A noul returns P(yes); a choice the most probable option; a score the expected level. Choices and scores also return a probability per answer and a confidence: when it is low, send the case to a person. Put the rule in the question, and do sums in code.

GET /health reports readiness and the SHA-256 of the model files; ./jev decide request.json answers a request file without a server.

Options

Option Default
--threads all logical CPUs fewer if other heavy apps are running
--host, --port 127.0.0.1, 8017 where the server listens
--model-dir model beside the binary the model folder

With JEV_API_KEY set, every call but /health needs Authorization: Bearer <key>. About 1 GB of memory, 1.4 GB with the text cache full. Every option is described at the top of src/main.cpp.

Build from source

python -m pip install -r requirements.txt     # OpenVINO's SDK, CMake, Ninja, the tests' packages
python scripts/build.py                       # dist/jev; on Windows, from a Visual Studio developer prompt
python tests/check.py                         # with the model in dist/jev/model

More

Guides and measurements are in the wiki. Built together with Loris Salsi (@LosaLosSantos).

jev (feder-cr/jev)

正在搜索数据库…

971 ·GitHub
这是什么?jevos-1b 是一个免费开源的是/否决策引擎,可在你笔记本的 CPU 上本地运行,对给定文本加问题,在大约 50-220 毫秒内返回答案为「是」的概率,可作为云端 Jev 服务的自托管替代品。
这是我导入的库,还是我自己运行的服务?它是一个独立的 HTTP 服务器,暴露 POST /v1/systemone 端点,使用与 Jev SDK 相同的传输格式,因此现有的 Jev 客户端代码无需修改即可直接对接。
怎么把它跑起来?从项目的 GitHub release 下载 jevos-1b-q4km.gguf 模型文件,然后启动服务器并用 --gguf 指向该文件。
除了是/否题,它能回答多选题或打分题吗?还不能——目前只有是/否(noul)题可用;发送选择题或打分题会被 422 错误拒绝,不过这两类在路线图上都标记为「即将推出」。
我的文本会被发送到云服务器吗?不会——与运行在云端的 Jev 不同,jevos-1b(和 Laya 一样)完全在你自己的机器上运行,什么都不会离开你的电脑。
和真正的 Jev 服务相比,jevos-1b 表现如何?它的是/否题表现与 Jev 相当,而且免费、可离线,不像 Jev 那样按 token 计费且托管在云端,但它还不支持 Jev 已提供的多选题和打分题。
底层实际运行的是什么模型?它是一个基于 MiniCPM 的模型,以量化的 GGUF 文件(jevos-1b-q4km.gguf)形式发布,通过基于 CPU 的 llama.cpp 风格推理提供服务。
我能一次就同一段文本问好几个问题吗?可以——单个请求可以携带多个共享同一状态的具名问题,该状态只读取一次,因此三个问题一起约耗时 165 毫秒,而单个问题约 103 毫秒。
除了纯文本,「state」字段里还能放什么?state 可以是纯字符串,也可以是任意 JSON 对象或数组;模型只读取它一次,并据此回答请求中的每个问题。
作者
feder-cr
大小
17.6 MB
星标
971
时长
2年
提交 · 90 天