Laya Decision Model on DC-ROMA Mainboard III: Fast, Private AI Decisions at the Edge

October 30, 2026

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:

  • Fully offline: The model and inference libraries live on the board, so it works without a network, and game data never leaves the device.
  • Runs on the AI cores: Inference goes to the A100 AI cores of the SpacemiT K3, and Laya answers in about 0.46 s after you move.
  • Transparent decisions: The points Laya considered on each move, and the probability it gave each one, are drawn right on the web board.
  • Real playing strength: On Hard, it won 5 of 6 games against the rule-based AI.
  • Open source and reproducible: The code and deployment docs (Chinese and English) are on GitHub, and four commands install it.

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.

What is Laya, the Jev-style model?

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:

TypeQuestionReturns
choiceSeveral options, each with a descriptionThe chosen option + a probability for each option
scoreA set of levelsA score + a probability for each level
noul (yes/no)A yes/no questionThe probability of “yes”

Its key traits:

  • No text generation: One forward pass returns every answer, so nothing fails to parse and nothing is made up.
  • Trustworthy probabilities: It is trained with reinforcement learning using a strictly proper scoring rule, an approach officially called RLCD. The model earns the highest reward only when it reports its true level of confidence, so the probabilities it gives can be used directly for decision-making.
  • Multilingual: We use the multilingual variant. It is built on the mmBERT-base encoder, has about 322 million parameters, supports 100+ languages, and its weight file is 643 MB.

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.

Why run it on the device?

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:

AspectCloud decision APILaya on the board
NetworkEvery request needs a connectionWorks offline
LatencyIncludes the network round trip~0.22 s inference, all on the board
DataContent is sent to the providerNever leaves the device
CostUsually billed per callDeploy once, no per-call fees
ControlClosed modelOpen 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.

Platform: the DC-ROMA Mainboard III and the K3’s AI cores

The DC-ROMA RISC-V Mainboard III features the SpacemiT K3 chip. The K3’s 16 cores come in two groups:

  • 8 X100 general-purpose cores: Run the OS, the rule search, and the web server
  • 8 A100 AI cores: Have AI instruction extensions and use on-chip TCM memory for matrix math

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.

Local, offline deployment

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:

  1. The AI-core runtime stays out of the system. SpacemiT’s TCM package depends on Bianbu’s generic kernel, so installing it with apt could replace the board’s boot kernel. We download three packages from SpacemiT’s official repository and unpack them with dpkg-deb -x into the project’s own folder, where they apply to this program only. Deleting the project folder uninstalls everything.
  2. The model is downloaded on a PC. The board can’t reach Hugging Face, so we download the model on a PC and copy it over SFTP. The setup script checks each file’s SHA256.
  3. A Python 3.14 compatibility workaround. Ubuntu 26.04 ships Python 3.14, where PyTorch 2.9 doesn’t support 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.
  4. Inference runs on the AI cores. Running the same model with PyTorch on the general-purpose cores took about 50 s for one call with three questions. With the ONNX FP16 version on the A100 AI cores, one Gomoku decision takes about 0.22 s of inference. The inputs differ, so this isn’t a strict comparison, but it shows the AI cores are what make real-time interaction possible.

Before Gomoku, we validated this setup by having Laya play Snake: 1,200 consecutive steps with zero deaths, averaging 117.5 ms per step.

The interactive scenario: playing Gomoku with people

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:

  1. Rules list candidates. Find empty points near the stones, identify the patterns each side could form at each point (five, open four, four, open three, …), and search for a VCF (Victory by Continuous Fours).
  2. Hard mode searches one move deeper. If the opponent has a winning VCF, keep only the moves that defend against it. Then check the opponent’s best reply to each candidate, re-rank, and keep the top 3.
  3. Write a multiple-choice question. The position is described in one English sentence, and each candidate gets a one-line description such as “Makes an open three. Leaves the opponent no strong reply.”, tagged with its search rank.
  4. Laya chooses. The choice question goes to Laya on the A100 AI cores, which gives each candidate a probability, and the highest-scoring move is picked.
  5. Safety layer. Always complete a five, and always block the opponent’s five. Against a forcing threat like an open three, only defensive moves are allowed. If Laya picks an unsafe move, swap in the allowed move it scored highest.

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.

Benchmark

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 DifficultyWin / Draw / LossTotal Time per MoveLaya Inference TimeSafety-layer overrides
Normal1 / 3 / 2279 ms243 ms64 Times
Hard5 / 0 / 1463 ms222 ms0 Times

A few observations:

  • Smooth interaction. Laya replies less than half a second after you move.
  • Hard mode’s gain comes from better options. Once Laya got only 3 searched strong points with their rank in the description, the guard never had to step in: every move was a safe point Laya chose itself. Without the rank tags, the same search only reaches draws.
  • Laya alone loses. With the guard off and Laya deciding everything, it loses even to the weakest rule opponent, because it misses the opponent’s threats.

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.

What else you can build

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:

  • Other board games and small games: Rules list the legal moves, and Laya picks one. Snake has already been validated on the same board, with 1,200 consecutive steps and zero deaths.
  • Local customer service and ticket routing: Judge intent, urgency, and whether to hand off to a human, with customer data never leaving the device.
  • On-device automation: Describe sensor state in a sentence and let Laya choose the next action, such as an alert level or an operating mode.
  • Pairing with a local LLM: The same board can also run generative models such as Qwen. Let the LLM do the talking and Laya do the judging. For example, using Laya to classify the user’s intent before deciding which LLM tool to call.
  • Replacing the cloud Jev: Since the API is compatible, an app that calls Jev can switch to a local Laya by changing the address.

Conclusion

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)

References

RECENT BLOG

DeepComputing and Start9 Launch the RISC-V Router: Open Hardware for a Private, Secure Home Network
November 10, 2026
Congratulations to Our Key Partner ESWIN Computing on Its Hong Kong Listing: A Milestone for RISC-V
November 9, 2026
RISC-V Hong Kong Day 2026: Upstreaming RISC-V and Celebrating the Builders
October 27, 2026