madewithlaya

Catalog / Tools & apps

0063Sites

laya-web: Laya running entirely in the browser as an 8-bit ONNX model

Live at laya-web.pages.dev. 524 MB of quantized English weights cached in the tab, onnxruntime-web over WebAssembly, and a parity page checked against the PyTorch reference.

Verified within 0.02 of the PyTorch reference.

Open source ↗ github.comcostfree, nothing leaves the tabtime-
nvkudva/laya-webREADME ↗
# laya-web

[Laya](https://huggingface.co/convaiinnovations/laya) — a System One decision model —
running entirely in the browser, as an 8-bit quantized copy of the English checkpoint.

**Live at [laya-web.pages.dev](https://laya-web.pages.dev)** · weights on
[Hugging Face](https://huggingface.co/nvkudva/laya-web-q8)



Laya is not a chat model. It reads a **state** — any text or JSON — scores the **options
you enumerate**, and returns one calibrated probability distribution per question in a
single forward pass. No sampling, no tokens out.

## Features

- **Three question types.** `noul` (true/false), `choice` (pick one named option),
  `score` (expectation over ordered levels).
- **Calibrated probabilities**, not raw softmax: temperatures fitted per question type
  and option count, plus an entropy-based confidence on every answer.
- **Nothing leaves the tab.** onnxruntime-web over WebAssembly — no API key, no backend,
  and no request carrying your state anywhere.
- **524 MB of weights, cached across reloads** in the Cache API. The page shows how much
  is cached and lets you delete it.
- **Verified against the PyTorch reference.** `/parity.html` re-runs both gates in the
  browser: byte-identical token ids, then end-to-end probabilities within 0.02.
- **Five worked presets** — email triage, moderation, routing, review scoring, escalation
  — each one state answered by three questions at once.

## How it works

Every question becomes one sequence, with a `[MASK]` marker in front of each option:

```
[CLS] <type> question: <instructions> [SEP] [MASK] opt0 [MASK] opt1 … [SEP] <state> [SEP]
```

1. **Tokenize** with transformers.js, straight from `tokenizer.json` — no model needed.
2. **Encode** the sequence with the quantized ModernBERT-large encoder (512 tokens).
3. *

Also filed under Tools & apps

  1. 0005

    laya-mlx plays Snake at 60 decisions per second

    介绍比Jev快50倍,在你设备上跑的laya-mlx! 只在你的设备上占用最高1G内存 Laya是一个开源的类似于Jev的,基于文本输出概率的分类系统 我将其移植到MLX,并且做了一些性能优化! 视频中就是这个模型在我的本地M3Max上玩贪吃蛇 这个模型能够以每秒决策60次的速度玩贪吃蛇! https://t.co/31KGUiNunb

    @mizorewww · Tools & apps · free, local · 60 decisions/s

  2. 0112

    Laya on Axera AX650 and AX8850 edge NPUs, under 70 ms

    AXERA-TECH's conversion of all three Laya checkpoints for its edge AI chips, reported at latency under 70 ms per decision on AX650/AX8850.

    AXERA-TECH · Tools & apps · free, on-device · < 70 ms on AX650 / AX8850

  3. 0099

    laya-mcp (PerryLink): a warm sidecar that fixes Laya's silent truncation and constant noul

    MCP server plus HTTP sidecar: token-budget preflight that reports what would be cut, a persisted calibration store, structured errors, and a noul fix (P(true) 0.5 → 1.0).

    @PerryLink · Tools & apps · free, local

  4. 0097

    Gomoku against Laya-MLX: you play black, the model picks white's move from six candidates

    Local 15x15 Gomoku on Apple Silicon. Rules in Python, board in the browser, every AI move one real Laya choice over up to six candidates, probabilities shown. No Gomoku training.

    smile-magic · Tools & apps · free, local