Jev 類似の決定モデルをローカルで動かす
Jev 自体はダウンロードできません——重みは非公開でホスト型です。しかしオープンなエコシステムは今や、同じ形の自己ホスト可能な本物の決定モデルを提供しています。ハードウェアを選べば、動くローカル環境までの最短パスが得られます:インストール、モデル、サーバー、そして 1 つのスクリプトとしてコピーできるテスト呼び出し。
These are independent, open Jev-like decision models (Laya, OpenJev) — not TypeSafe's official Jev weights, which are closed and hosted. Same primitives (choice · score · noul), but you own calibration and quality. Some third-party checkpoints even ship uncalibrated confidence (their MLX build warns about out-of-range temperatures), so validate on your own labelled data before wiring a threshold in production.
python3.11 -m venv .venv && source .venv/bin/activate
pip install laya-mlxhf download aac6fef/laya-mlximport laya_mlx as laya
agent = laya.load("aac6fef/laya-mlx")
result = agent.predict(
"I was billed twice. Please refund the duplicate.",
{
"department": {
"type": "choice",
"instructions": "Who should handle this?",
"criteria": ["billing", "technical", "sales"],
}
},
)
print(result["answers"]["department"])Laya-MLX runs in-process — there is no HTTP server, you call it from Python. Types: choice · score · noul (calibrated P(true)). For 30+ languages load aac6fef/laya-multilingual-mlx instead.
どれを選べばいい?
- Mac / Apple Silicon → Laya-MLX. 最小で最も簡単:約 420M のモデルが M シリーズ Mac 上でインプロセスにミリ秒で動きます。GPU もサーバーも不要。ローカル開発とプライバシーに最適。
- Node.js / TypeScript → @receptron/laya. 同じ発想を ONNX 経由で JS ランタイムから——Python は一切不要。スタックが既に Node なら最適。
- Docker (GPU) → OpenJev. より大きく、GPU で提供されるモデルを、Jev 互換の HTTP API として
:8080で公開。ドロップインの API エンドポイントが欲しく、NVIDIA カードがある場合に最適。 - NVIDIA bare-metal → OpenJev. 同じモデルを Docker なしで、vLLM ランタイムを完全に制御。
これらは公式の Jev ではありません
Laya と OpenJev は独立したコミュニティプロジェクトで、型付き決定の考え方をオープンな重みで作り直したものです——TypeSafe の Jev ではなく、その校正と品質は各自のものです。これがホスト API に対する本当のトレードオフです:ローカルはネットワークホップゼロ・呼び出しごとのコストなしですが、検証は自分の責任です。固定・校正済みで運用不要の決定が欲しいなら、ホスト経路は POST /api/v1/decide 一発です。