Blog
How to Fine-Tune Laya, an Open-Weight Jev Alternative
Laya's open weights let you train a decision model on your own cases. Its notebook combines RL and supervised learning, with calibration changes needed before evaluation.
Published September 20, 2026
You can fine-tune Laya by adapting its published training notebook to your own labeled decisions, then calibrating and evaluating the resulting model on separate cases. The model family, reviewed September 20, 2026, provides 3 open-weight checkpoints: English, multilingual, and a version specialized for the typed-decisions benchmark. Open weights are downloadable learned parameters that developers can modify. That gives teams a customization route beyond changing questions sent to a hosted model. The practical starting point is narrower than the release’s broad claims: train a specific decision, such as routing an invoice exception or escalating a support case, and measure whether it improves. Our Laya vs Jev analysis examines the creator’s claim that his research preceded Jev. Here, we focus on how the available training code works and what a reinforcement learning (RL) environment must add. This is a code-based guide, not a report of training gains measured by rlsupply.
Which Laya weights should you start with?
Choose the checkpoint for your language and task before measuring a baseline. The published model card identifies ModernBERT as the English encoder and mmBERT as the multilingual encoder. An encoder converts the input and question into representations used to score the allowed answers.
| Checkpoint | Starting use | What to check |
|---|---|---|
| English | English-language decisions | Whether the input and question fit its token budget |
| Multilingual | Decisions involving other languages | Accuracy on the actual languages and scripts you serve |
| Typed-decisions | Tasks resembling its benchmark workflows | Whether apparent gains transfer beyond those workflows |

Pin model and software versions for reproducibility. The supplied notebook starts from the English checkpoint and assumes two NVIDIA T4 GPUs. Other checkpoints need matching model configuration and memory settings.
What data does Laya fine-tuning need?
Each example needs the state visible at decision time, a typed question, and a defensible target answer. Laya’s question definitions support:
- Choice: a probability distribution over named options, such as billing or technical support.
- Score: probabilities over ordered criteria, such as low, medium, and high urgency.
- Noul: a probability that a statement is true, such as whether required evidence is missing.
For a proposed invoice task, the state could include the invoice and permitted purchase-order evidence. The question asks whether to approve, request clarification, or escalate. The target must follow a reviewed policy, without putting the final adjudication into the input.
The typed-decisions dataset supplies 1,200 training cases and 6,000 decisions. Its targets average sampled distributions from a teacher model. Agreement measures imitation of that teacher, not independently verified business outcomes.
Split your data by underlying case before expanding it into questions. Related messages, duplicate documents, and questions about the same case should stay together. Our approach to capturing judgment in exceptions is relevant here: ambiguous cases need recorded reasons and review, not invented precision in their labels.
What does the training notebook actually optimize?
The training cell updates both the encoder and decision head. It combines a reinforcement learning objective with supervised cross-entropy, which rewards matching the target probability distribution. Calling this pure RL would omit part of the implemented loss.
The RL term samples perturbed answer scores and rewards the resulting probabilities using scoring rules designed to favor accurate probability estimates. These rewards come from labeled examples. They are not rewards from executing actions in an interactive environment.
To adapt the example:
- Save a baseline. Evaluate the starting weights on your fixed test cases before changing them.
- Prepare your examples. Preserve option order and normalized target probabilities. Set input and question token limits before preprocessing; keep them consistent through training, calibration, and inference. The notebook changes these limits after preparing examples.
- Update the weights. Use the notebook’s training cell, keeping your calibration and test cases out of its training input.
- Save and reload the result. Retain the model weights, tokenizer, encoder configuration, and decision configuration together. The notebook reloads the saved directory with
laya.Agent.
The example uses four epochs, or passes through the training data. Choose this setting using development data, without repeatedly consulting the final test set.
How should you calibrate and test the tuned model?
Use a calibration set that was excluded from weight training, followed by a separate final test set. Calibration means predicted probabilities match observed frequencies across comparable cases. Temperature scaling adjusts the sharpness of a model’s answer probabilities after training.
The notebook selects calibration examples from the training collection, all_items. Replace that selection with separate cases. Also clear inherited temperature_by_options settings, or refit them on calibration cases: the inference code prefers those values, grouped by the number of answer options, over newly fitted per-type temperatures. Confirm the intended values are used after reloading.
Report decision accuracy alongside probability quality and the share of cases sent for review. Define escalation thresholds using calibration cases, then freeze them for final testing. Laya’s confidence calculation summarizes the answer distribution; it does not by itself establish the chance that an answer is correct.
How does Laya become part of an RL training environment?
The environment must turn a selected answer into an action and verify its consequences. A policy chooses actions; an RL environment provides observations, executes actions, and returns rewards. Laya can supply the policy’s decision, while separate code performs the operation.
For the invoice example, approval must change a permitted record; escalation must create a valid handoff. The reward should use verified outcomes, not the model’s own confidence. Unlike the fixed-weight setup discussed in our Jev environment article, Laya allows weight updates, but the released notebook does not provide this interactive loop.
Start with explicit grading requirements and compare original and tuned models on unfamiliar cases. We can help specify the action mappings and independent checks: request an environment sample. This is a proposed use of Laya; we have not announced an rlsupply integration.
Request supply