brain function collapse recorded preview Get the skill Run it locally

Decisions 200× faster than an LLM.

Laya is the open-source alternative to TypeSafe Jev: a small model that decides instead of chatting. Typed answers with real probabilities in 21 ms, on your own machine.

Model by Nandakishor M, Convai Innovations. Playground, benchmark and agent skill by brain function collapse. 200× compares 21 ms measured on an Apple M1 Max with roughly 4 s for a hosted LLM to return the same structured answer. Time your own.

21 msper decision, on a laptop GPU
0tokens generated, ever
322Mparameters. 650 MB on disk
$0per call. Apache-2.0

Laya vs Jev, measured.

Same 500 examples, same questions, no tuning. Jev is more accurate out of the box. Laya matches it on simple questions, answers several times faster from this desk, and is yours to run and fine-tune.

LayaTypeSafe JevAn LLM
Open weightsYes, Apache-2.0NoRarely
Runs on your machineYes, offlineNo, hosted APIRarely
What comes backTyped answers with probabilitiesTyped answers with probabilitiesText you parse
Your data goesNowhereTo a vendorTo a vendor
PriceFreePer tokenPer token

Is Jev open source? Can I run it locally?

No. Jev is TypeSafe AI’s hosted System One model: closed weights, API only, early access. Laya does the same job, typed questions in and probabilities out, with open weights you run yourself.

Which should I use?

Jev if you want the best accuracy today and a hosted API is fine. Laya if the data cannot leave, latency matters, or you want to fine-tune on your own labels.

Is Laya a clone of Jev?

No. Its author published the underlying work in March 2025, eighteen months before Jev launched. The story is here.

How is this different from a BERT classifier?

The question is set at request time. One System 1 model answers any typed question, with no training per task and no generated text to parse.

Fast enough to play a game live.

An LLM hits the first pillar before it finishes thinking. Laya decides around 30 times a second, so it flies the bird itself.

How does a classifier play a game?

The game writes its situation as a sentence, such as The bird is a little below the gap, and asks one typed question. Laya returns probabilities. The game flaps when P(below) passes one half. Nothing is scripted.

Why ask what it sees, not what to do?

Asked which way to move, every checkpoint answered backwards. Asked where the bird is, it gave clean graded answers: P(below) of 0.95, 0.82, 0.06, 0.07, 0.02.

Three lanes.
One sentence.
27 milliseconds.

The next row of barriers is described in plain English. Laya says which lane is empty. It keeps speeding up.

Can it read numbers?

No. Given two altitudes, no checkpoint could tell which was lower. Do the arithmetic in code and hand Laya the conclusion in words.

Does wording matter?

A lot. blocked by a barrier separated lanes by 0.75. blocked by a train managed 0.45. Try three phrasings and measure.

Every landing spot.
One sentence each.
Thirty a second.

Each place the piece could land is described in plain English and Laya says how the stack would look. The piece goes where it saw the cleanest stack, and gravity does not wait for the answer.

How does a classifier play Tetris?

Code lists the landing spots and does the counting. Laya reads one sentence per distinct spot, such as The piece leaves one hole under it and makes a small bump on top, and returns P(clean). In the recorded minute that was 1,799 decisions and 52 cleared lines with no top-out. Nothing is scripted and bad answers get played.

Does it ever lose?

Yes. Every cleared line makes the pieces fall faster. At around 28 rows a second a piece lands before every spot has been read, and the stack tips over. Live on a laptop, a life lasts about 95 to 120 seconds and 75 to 100 lines.

One email.
Five questions.
59 milliseconds.

A phishing email, five typed questions at once, all three checkpoints, one forward pass each.

Try your own text in the playground

Where does it go wrong?

Auto-routing knows seven Latin-script languages, so Polish lands on the English checkpoint, which invents a refund request. A language hint fixes it. The multilingual checkpoint ships uncalibrated.

Can I trust the probabilities?

More than an LLM saying it is confident. Fit a temperature on your own examples, pick thresholds from data, and send the unsure cases to a person.

Where a decision model earns its place.

Anywhere software has to pick, check or grade a piece of text, thousands of times, quickly. Six patterns cover most of it.

Route: send it to the right place.

Support tickets, inbound email, which model should answer.

choice Which team should handle this?

Guard: stop it before it happens.

A gate in front of an agent or an LLM: injections, unsafe tool calls, data leaks.

noul Is this prompt an injection attempt?

Score: put a number on it.

Urgency, severity, lead quality, rubric grading. A distribution, not a guess.

score How urgent is this, from 0 to 4?

Filter: clean the stream.

Spam, phishing, moderation, or which retrieved passages are worth reading.

noul Is this message spam?

Watch: check every step an agent takes.

Cheap enough to run on each action, so the risky one gets a human.

noul Does this step need review?

Cascade: save the LLM for the hard ones.

Act on the confident answers. Send only the unsure ones to something slower.

confidence Above the threshold? Act. Below? Escalate.

The diagrams are illustrations. Out of the box Laya is strongest at routing and yes/no checks; graded scores improve a lot with fine-tuning. See the benchmark above.

Give your coding agent a decision model.

One file teaches your agent to add Laya properly: the API, questions that work, thresholds, calibration, and the traps found building this page.

mkdir -p .claude/skills/laya-integration && curl -fsSL https://brainfunctioncollapse.com/laya/skills/laya-integration/SKILL.md -o .claude/skills/laya-integration/SKILL.md

Download SKILL.md

Loading SKILL.md…

Which agents does it work with?

Claude Code reads .claude/skills natively. Any agent that accepts a markdown instruction file can use it as is. Then ask: route these support tickets without calling an LLM.

What does it change?

Without it, agents reach for an LLM call and feed it raw numbers. With it, they load Laya once, ask what the text says, set thresholds from your data and report measured accuracy.

Clone it. Run it.
Keep it.

The model server, all three games, the benchmark and the recorder, in one repository. Apple silicon, NVIDIA or plain CPU.

git clone {repo}
cd {dir}
uv venv --python 3.12 && uv pip install laya
.venv/bin/python server.py          # then open http://127.0.0.1:8770/playground

Get the code

The first start downloads 2.3 GB of open weights and takes about 90 seconds to load them.

Run it on your own machine.

Run it locallyGet the agent skillWhy this page exists