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.

361 projects

layaAsRagJudge

vishalmysore

Verifies RAG claims in the browser using Laya decisions and evaluates accuracy against labeled claims

1·GitHub repo

laya-console

biyyl234

Provides a local web console and REST API for Laya inference and intent classification

1·GitHub repo

RayCodes_LayaAI

47thtechcorner

A browser-based Pong game uses Laya to control an AI opponent's paddle

1·GitHub repo

laya-vs-dijkstra

antonellof

Compares Laya MLX pathfinding decisions with Dijkstra on seeded weighted mazes

1·GitHub repo

katai

Shiawaseu

A browser automation agent uses fine-tuned Laya models to select actions and target elements

1·GitHub repo

laya-browser

Benny93

Uses a local Laya model to resolve plain-English selectors in browser automation

1·GitHub repo

laya-voice-browser

AkshayKulkarni1904

Controls Chromium-based browsers by voice using local Laya decisions on Windows

1·GitHub repo
M

laya-web-demo

mizchi

Runs Laya typed decisions in browser games using ONNX Runtime Web and WebGPU

1·HF Space

layaMOE

vishalmysore

Routes Laya requests to domain-specific expert heads, with a browser demo using ONNX Runtime Web

1·GitHub repo

laya-agent

inboxxobni

Runs Laya typed decisions locally on Apple Silicon and provides an HTTP server and agent integrations

1·GitHub repo

laya-jev-tester

Collanteslu

Tests Laya or Jev-compatible endpoints through a browser-based interface for typed decisions

1·GitHub repo

system-one-web-ai

Josuesp1620

An interactive web guide measuring Laya on Spanish customer-service messages and explaining its implementation

1·GitHub repo

Civic-Signal-Laya

satiricalguru

Routes multilingual public-service requests with Laya and presents decisions for human review

1·GitHub repo

laya-skill

StevenLi-phoenix

A Claude Code skill runs, fine-tunes, evaluates, and exports Laya typed-decision models

1·GitHub repo

hoja-de-ruta

fcori47

A Python web app orders YouTube videos into learning roadmaps using Jev or Laya

1·GitHub repo

mesh-decisions-playground

michaelneale

Provides a local web interface for making Laya decisions through Mesh LLM

1·GitHub repo

SafeSphere.ai

akshayvibe

Detects harassment and stalking locally in social and email services using Laya via ONNX

1·GitHub repo

playground

ufuayk

Provides a browser playground for a Laya-MLX decision model served by FastAPI

1·GitHub repo

edge-decision-laya-system1-demo

skdwriting

Demonstrates low-latency edge decisions using the Laya System 1 model and safety guardrails

1·GitHub repo

snake

ufuayk

Runs a browser-based Snake game whose moves are selected by the laya-mlx model

1·GitHub repo

browser-laya

wexare-ai

Runs the Laya decision model in browsers using WebGPU or ONNX Runtime Web

1·GitHub repo
O

Laya-Arabic-Demo

oddadmix

Demonstrates an Arabic Laya decision model for safety labels, custom categories, yes/no questions and lane choices

1·HF Space
G

@system-one-ai/model-laya

GitHub Actions

Adds optional Laya model plugins to System One browser and Node runtimes

317·npm package
C

laya-browser-suite-c

cklxx

Provides held-out real-site tasks for evaluating a browser agent

0·HF dataset

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