跳到主内容
@wquguru
精选86r/LLMDevs(Reddit)技巧与观点

notjev:利用logprobs将本地LLM转为Jev风格决策引擎

notjev – Turn any local LLM into a Jev-style decision engine (one token + logprobs)

原文
发到 X
推荐理由

给跑本地模型的同学一个极佳的工程思路:用logprobs做单token决策比传统JSON解析快得多且稳定,这套System 1/2分层架构值得参考落地。

Hi there !

你好!

I built notjev, a small Node library that turns any OpenAI-compatible model into a fast System 1 decision engine.

我构建了 notjev,一个小型 Node 库,可将任何兼容 OpenAI 的模型转化为快速的 System 1 决策引擎。

Instead of generating text, it asks the model for a single token (`A`, `B`, `C`…) with `logprobs: true`, keeps only the letter probabilities, renormalises them, and returns:

它不生成文本,而是通过 `logprobs: true` 向模型请求单个 token(如 `A`、`B`、`C`…),仅保留字母的概率,对其进行重新归一化,然后返回:

  • a verdict
  • a probability
  • a margin
  • a tunable abstention threshold
  • 一个裁决结果
  • 一个概率值
  • 一个置信区间
  • 一个可调节的弃权阈值

You get Choice / Score / Noul style answers, just like Jev, but from the model you already run (vLLM, llama.cpp, Ollama, OpenAI…).

你可以获得类似 Choice / Score / Noul 风格的回答,就像 Jev 一样,但使用的是你已运行的模型(vLLM、llama.cpp、Ollama、OpenAI 等)。

Why it’s interesting

为什么它很有趣

  • Zero runtime dependencies
  • Works with any model that supports logprobs
  • Same weights as your chat model → true System 1 / System 2 split
  • Speaks the Jev `/v1/systemone` wire contract
  • Very fast: 23 ms p50 on Qwen3-8B with llama-server
  • 零运行时依赖
  • 适用于支持 logprobs 的任何模型
  • 与聊天模型共享权重 → 实现真正的 System 1 / System 2 分离
  • 遵循 Jev `/v1/systemone` 网络协议规范
  • 速度极快:在 llama-server 上运行 Qwen3-8B 时,p50 延迟为 23 毫秒

Quick example

快速示例

代码 · 1 行
```js

const { createClient } = require('notjev');

const jev = createClient();

const r = await jev.decide({

state: 'A: "Sarah Knafo"\nB: "Sarah Knafot"',

question: 'same entity?',

options: ['SAME', 'OTHER'],

theta: 0.5,

});

console.log(r.choice, r.p1, r.band, r.undecided);

// → null 0.50 med true

代码 · 6 行
When the margin is too thin, you just escalate to the same model in normal chat mode.
### Repo
https://github.com/9pings/notjev
Would love feedback, especially from people already playing with local models or Jev alternatives.
submitted by /u/n8tz
[link] [comments]

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

关联讨论

同一事件的更多信源

相似阅读

关联信息,但可能不是同一事件