Skip to content

Jev directory

Laya on Bun

Run Laya locally on Bun with native ONNX inference and Hugging Face tokenizers: an HTTP server implementing TypeSafe's decision API plus an English/Persian playground with 16 demos, usable through the official @typesafe-ai/sdk with a custom baseURL.
Stars
13
Language
TypeScript
Reading time
2 min
Published by
Community
Author
ali-master
Last verified
Oct 2026

Highlights

  • Serving runs entirely inside Bun with native ONNX inference; Python 3.12 with uv is used only once to export the pretrained model.
  • The server implements TypeSafe's decision API, so the official @typesafe-ai/sdk works by pointing baseURL at http://127.0.0.1:3000.
  • Question types are choice (label and probabilities), score (expected value on an ordered scale) and noul (probability a statement is true); no generated text.
  • Model prep needs Bun 1.4.2, Python 3.12, uv and several GB free: about 820 MB of source weights plus a roughly 1.6 GB float32 ONNX model.
  • A smoke check starts a temporary server and verifies JavaScript/Python token parity plus real SDK responses against exported reference fixtures.

Quickstart

bash
bun install --frozen-lockfile
uv venv --python 3.12 .venv
uv pip install --python .venv/bin/python -r scripts/requirements-export.txt
bun run model:download
bun run model:export
bun start

Watch out

Grounded in the truncated repository README and GitHub metadata reviewed on 2026-10-15; the repository declares no license file, the one-time export is heavyweight (Python 3.12, uv and several GB), and the README's SDK example is cut off mid-call.

Questions about this entry

Short answers drawn from the linked project or page.

From the Jev guides

Original write-ups on what this entry is for.

From the Jev AI model community

Posts from builders shipping with Jev right now.

Follow @typesafeai