Snake · balanced (multilingual)
A Laya typed-decision model, fine-tuned with LayaStudio on an Apple silicon Mac. It answers the questions below in a single forward pass, with calibrated probabilities and zero generated tokens.
Base model: aac6fef/laya-multilingual-mlx · method: lora, proper objective · trained in
18 minutes on an Apple silicon Mac.
Measured on the held-out test split
| Metric | Base model | This model |
|---|---|---|
| Accuracy | 15.8% | 98.8% [97.6%–99.4%] |
| Calibration error (ECE) | 0.246 | 0.002 |
| Log loss | 1.607 | 0.047 |
| Brier score | 0.865 | 0.021 |
| Decisions scored | 600 | 600 |
Fine-tuning fixed 500 test decisions the base model got wrong and broke 2 it got right (exact McNemar p < 0.001).
Test rows were never trained on. Accuracy intervals are Wilson intervals; the paired test is an exact McNemar test between the base and the fine-tuned model on the same rows.
Use it
pip install laya-mlx # Apple silicon
import json, laya_mlx as laya
from huggingface_hub import hf_hub_download
agent = laya.load("madhavbiplov/laya-snake-mlx")
questions = json.load(open(hf_hub_download("madhavbiplov/laya-snake-mlx", "questions.json")))
print(agent.predict("your text here", questions)["answers"])
Ask it these questions: the instructions and option texts are part of the model's input, so changing them changes the task it was tuned for.
{
"move": {
"type": "choice",
"instructions": "Snake board. Pick the next move: stay inside the board, do not hit the snake, and take the shortest safe path to the food.",
"criteria": {
"UP": "one cell up",
"DOWN": "one cell down",
"LEFT": "one cell left",
"RIGHT": "one cell right"
}
}
}
The same folder also loads in the upstream PyTorch package on Linux and NVIDIA, and LayaStudio can export it to ONNX.