Run Laya in the browser

Laya is small enough to run in a browser tab with no server and no API key. The input never leaves the page. The trade-off is a download of several hundred megabytes on the first visit and much slower inference than a native runtime.

362 projects

sudoku-laya-ai

KrisnaSantosa15

A browser-based Sudoku game uses Laya to recommend number placements

0·GitHub repo

snake-laya-ai

KrisnaSantosa15

A browser-based Snake game uses Laya to choose safe directions in real time

0·GitHub repo

SmartCart-Laya

sanjanabhat846

A Flask-backed dashboard uses Laya to evaluate e-commerce promotions, order urgency, and manual-review decisions

0·GitHub repo

laya-pixel-town

JohannesRabauer

A pixel-art town simulation lets Laya decide the daily actions of its residents

0·GitHub repo

ThunderBird-Laya-Mail-Triage-extension

invince

Classifies and tags incoming Thunderbird mail using a local Laya decision server

0·GitHub repo

Sytem-1-model-testing--jev--Laya-

dinod001

Benchmarks System 1 decision models against autoregressive LLMs for latency, cost, and accuracy

0·GitHub repo

sintonia

Chere3

Filters YouTube recommendations using time-based profiles and Jev or Laya classification

0·GitHub repo
L

laya-superfast

LazyHuman

Serves Laya decisions through an MCP bridge and browser automation relay

0·HF Space

laya-test-bench

frhnsdk

Provides a local web interface for single-text and CSV analysis with the Laya model

0·GitHub repo

tetromino

tomayac

A browser tetromino game uses the Decisions API with selectable Laya and open-jev backends

0·GitHub repo

omarchy-laya-workspace

nblanchard-intact

Uses a local Laya decision server to choose and launch apps in Omarchy workspaces

0·GitHub repo

omarchy-laya-attention

nblanchard-intact

Uses a local Laya server to triage agent and desktop notifications in Omarchy

0·GitHub repo

system-one-bench

alilibx

Benchmarks typed-decision models, including Laya, across labelled datasets for accuracy, calibration, latency and cost

0·GitHub repo

laya-demo

foxnukem

Runs a Tower Bloxx browser agent that uses Laya to decide when to drop blocks

0·GitHub repo

rogue

dea6cat

Compares answers from AI harnesses and ranks them using Laya

0·GitHub repo

legal-ia-meetings

anzaja72

Creates meeting minutes for Colombian lawyers and uses Laya to suggest speaker roles from transcripts

0·GitHub repo

quizlens

kevkoa2106

Captures browser quiz questions and compares answer choices using selected local or cloud models

0·GitHub repo

22-minds

Satya141

Runs a football simulation where each player uses Laya to choose actions during play

0·GitHub repo

laya-tu-do-bon-mua

LongIch2810

A web app uses the multilingual Laya model locally to classify clothing into seasons

0·GitHub repo

JobHunt

priyansha016

A LinkedIn job-search toolkit uses Laya for profile matching and connection management

0·GitHub repo

Jev-Laya

SilverRuler

Runs Laya locally behind a Jev-compatible API and browser playground

0·GitHub repo

DeciFlow

call518

Classifies log events in real time using Laya or Jev and supports batch review and monitoring

0·GitHub repo

laya-web-agent

0Xw3ak

Adapts Laya for constrained web-action decisions with browser execution and evaluation

0·GitHub repo

last-house-zombie-siege

airesearchjishengyin

Runs a browser-based tactical survival game where Laya selects squad actions

0·GitHub repo

Libraries

kevala is a zero-dependency Rust engine compiled to WebAssembly, with WebGPU kernels. It works from any page:

<script type="module">
  import { Kevala } from "https://cdn.jsdelivr.net/npm/kevala@latest/js/src/index.js";
  const kevala = await Kevala.load({ model: "laya", onProgress: console.log });
</script>

or pnpm add kevala. According to its README, the Laya int8 pack is 479 MB and is kept in browser storage after the first visit.

@r4ai/laya-web runs ONNX Runtime Web with WebGPU and a WebAssembly SIMD fallback, and is designed to run in a Web Worker:

npm install @r4ai/laya-web onnxruntime-web

Demos you can open

  • layaForWeb: the English checkpoint as quantized ONNX (default build about 440 MB), with a live demo.
  • open-jev-laya: multilingual Laya on Transformers.js (fp16 ONNX about 647 MB) with Gomoku, Big Two and a 3D maze.
  • layaAsRagJudge: checks RAG claims against retrieved evidence entirely in the tab.

Speed and support

The layaForWeb README reports that a three-question call on the default WASM backend took about 2 to 5 seconds on a 2-core machine. In that project, WebGPU works only with the int4 build, because ONNX Runtime's WebGPU MatMulNBits kernel supports 2- and 4-bit weights. open-jev-laya tries WebGPU and falls back to WebAssembly.

Caveats

Quantized browser builds do not match PyTorch exactly. layaForWeb reports 97.9% top-answer agreement for all three of its quantized builds, with the largest probability gaps in int4. For a real-time loop, laya-pong keeps the model native. Its README gives the reason: the checkpoint wants about 2.4 GB resident in f32, and wasm32 has a 4 GB address space and no Metal.

More ways to use Laya