Laya vs Jev (T-Rex arena)
A side-by-side arena rather than a spec sheet: local Laya and hosted Jev make the same choices in Chrome's T-Rex game, and the run is scored on agreement, latency and crashes.
What this repo actually measures
Two decision models play Chrome's T-Rex game on a shared obstacle course: Laya runs locally on Apple Silicon through MLX, while Jev answers through TypeSafe's hosted API. A deterministic physics planner proposes the candidate moves, the models pick between them, and a safety layer may override a choice it judges unsafe or stale. The demo renders live latency charts, decision feedback and slow-motion crash replays.
The scoring design is the honest part: assisted scores measure the combined system — model plus guard — and the "best move" statistic measures agreement with the planner, not independent model skill. Running with --unassisted removes the shields if you want the raw comparison, and the repository says so in the README rather than hiding it in a footnote.
Run it
git clone https://github.com/virajbhartiya/laya-vs-jev.git
cd laya-vs-jev
uv sync --extra demo --extra trex --extra dev
uv run --extra demo hf download aac6fef/laya-multilingual-mlx \
--local-dir models/hub/laya-multilingual-mlx
cp .env.example .env # set TYPESAFE_API_KEY before running
uv run --extra trex laya-trex --round-seconds 0 --env-file .env
Local-only mode plays without an API key (--players laya), and timed matches use --round-seconds 60 --rounds 3. Recordings export to 1080p/30 FPS replays, so a run can be reviewed move by move rather than trusted as a number.
Why a game is a fair test bed
- Every frame is a decision. A game loop is thousands of bounded questions per run — exactly the shape a typed-decision model is built for, and the shape that punishes a slow model immediately.
- Latency is visible. Local inference and a hosted API sit on the same timeline, so the cost of a network round trip is not an abstraction.
- Failure is inspectable. Crash replays make a bad threshold setting diagnosable instead of anecdotal — the layers that own the 0.85 / 0.7 / 0.5 gates are plain code, not model magic.
For anyone sizing a local decision model against a hosted one, this repository is the closest thing to a public, reproducible side-by-side: same course, same questions, two runtimes, recorded evidence.
Source
Repository: virajbhartiya/laya-vs-jev — built on mizorewww/laya-mlx (the MLX port of Laya). Code Apache-2.0; Chromium game assets keep their BSD-3-Clause notice; Jev runs through TypeSafe's API under your own account.
Other repositories in this series
- Laya-MLX — Apple Silicon runtime
- Laya (official package) — Python · 100+ languages
Keep browsing: all open-source repos · Jev cases · what Jev is · the Laya guide
Last updated: 2026-09-23 · sources & corrections · every card links to its author's original post