Put an open-source AI decision model on a RISC-V mainboard, with no internet and no GPU, and it can play Gomoku against people in real time. That is what we tried on the DC-ROMA RISC-V Mainboard III: running Laya, a decision model compatible with the Jev API, locally on the board’s AI cores to drive a complete on-device interactive app.
Highlights:
Below we cover what Laya is, why it belongs on the device, how it runs on the board, and how a model that only answers multiple-choice questions plays Gomoku.
Jev is a “System One” decision-model service from TypeSafe: you send it a state (an email, a ticket, a piece of JSON) and a few typed questions, and it returns typed answers instead of generated text. Jev is a closed-source cloud API.
Laya is a comparable model open-sourced by convaiinnovations on Hugging Face under the Apache-2.0 license, which allows commercial use. “Jev-style” means its request and response format matches Jev’s: its bundled laya-serve exposes the same POST /v1/systemone endpoint as Jev, so a program that calls Jev can switch to Laya just by changing the service address. The difference is that Laya’s weights can be downloaded and run fully offline.
Laya answers only three question types:
| Type | Question | Returns |
| choice | Several options, each with a description | The chosen option + a probability for each option |
| score | A set of levels | A score + a probability for each level |
| noul (yes/no) | A yes/no question | The probability of “yes” |
Its key traits:
According to the comparison published on the model card (Jev’s figures come from third-party public tests, with different samples and prompts), Laya is slightly more accurate than Jev on classification tasks with few options and answers a single question about 7× faster. On tasks with more than 20 options, Jev still leads.
Think of Laya as “a small model that answers multiple-choice questions”. It suits stable, fast, auditable decisions such as routing, scoring, and gatekeeping, not chatting or writing.
Decision tasks are typically high-frequency and latency-sensitive, and many involve data that shouldn’t leave the organization. Compared with calling a cloud API, running the decision model on a local device differs in the following ways:
| Aspect | Cloud decision API | Laya on the board |
| Network | Every request needs a connection | Works offline |
| Latency | Includes the network round trip | ~0.22 s inference, all on the board |
| Data | Content is sent to the provider | Never leaves the device |
| Cost | Usually billed per call | Deploy once, no per-call fees |
| Control | Closed model | Open weights, fine-tunable |
Laya has only about 300 million parameters, generates no text, and returns results in a single forward pass, which makes it a good fit for compute-limited edge devices.
The DC-ROMA RISC-V Mainboard III features the SpacemiT K3 chip. The K3’s 16 cores come in two groups:
SpacemiT provides its own ONNX Runtime and execution provider (SpaceMIT EP), which hands model inference to the A100 cores. On this board, Laya uses 4 A100 cores (numbers 8, 10, 12, and 14).
Our board runs Ubuntu 26.04 (riscv64, custom kernel 6.18.3, Python 3.14) rather than SpacemiT’s official Bianbu OS. Most issues in the next section stem from that difference.
Once deployed, it needs no network at runtime: the model, tokenizer, and inference libraries are all on the board. Loading the model takes about 25 s, and the process uses about 2 GB of memory.
Getting Laya onto the board solved four problems:
dpkg-deb -x into the project’s own folder, where they apply to this program only. Deleting the project folder uninstalls everything.torch.compile, so importing the encoder fails. Temporarily replacing it with a no-op during the import fixes this without affecting the model’s computation.Before Gomoku, we validated this setup by having Laya play Snake: 1,200 consecutive steps with zero deaths, averaging 117.5 ms per step.
Laya can’t “calculate” moves on its own; it only answers multiple-choice questions. So we turned Gomoku into a series of multiple-choice questions: a rule-based program sets the questions, and Laya picks the answers.
Each move takes five steps:
Players on the same local network can play from a browser on any computer or phone. For every move, the page shows the candidates Laya considered and their probabilities on the board, and a pop-up announces the win or loss. Players can choose to play Black or White and switch between Normal and Hard difficulty.

On the DC-ROMA Mainboard III with 4 AI-core threads. The opponent was a rule-based AI that combines one-move evaluation with a VCF search. Laya played 6 games at each difficulty, alternating between Black and White.
| Laya Difficulty | Win / Draw / Loss | Total Time per Move | Laya Inference Time | Safety-layer overrides |
| Normal | 1 / 3 / 2 | 279 ms | 243 ms | 64 Times |
| Hard | 5 / 0 / 1 | 463 ms | 222 ms | 0 Times |
A few observations:
So, more precisely: the rule search does the calculating, Laya reads the descriptions and makes the choice, and the guard prevents mistakes. Together they make a stable, autonomous on-device agent.
Gomoku is just one example. The core recipe is “rules write the question, Laya chooses, the guard backs it up”. Change how the question is written and you get a new way to play:
Laya on DC-ROMA Mainboard III shows that edge AI doesn’t have to rely on large models. A 300-million-parameter decision model that only answers multiple-choice questions, combined with the board’s AI cores and a layer of rule search, can power an interactive app that is real-time, offline, and fully transparent in how it decides.
The project is open source. Run the four commands below on the board to deploy it. The setup script downloads and verifies the runtime and model; if the board can’t reach the internet, you can download them on a PC and import them offline. Then open http://<board-ip>:8082 in a browser on a computer or phone to start playing.
git clone https://github.com/TechyLX/laya-gomoku-k3.git ~/laya-gomoku-k3
cd ~/laya-gomoku-k3
sh setup.sh
sh start.shCode language: PHP (php)