Laya typed-decisions β€” fine-tune

A 421M-parameter non-autoregressive "System 1" decision model: it reads one state (a message, a JSON record, a ticket thread) plus a set of typed questions, and returns a probability distribution per question instead of generating text.

This is a community fine-tune of convaiinnovations/laya-typed-decisions, trained on the typed-decisions benchmark. It is not an official Convai Innovations release. Loading and inference go through the upstream runtime, pip install laya.

Quickstart

pip install -U laya
import json
import laya
from datasets import load_dataset

agent = laya.load("Salmoncat/laya-typed-decisions")   # 1.3 s on CPU

row = load_dataset("LocalLLaMA/typed-decisions", "customer_service", split="test")[0]
answers = agent.system_one(json.loads(row["state"]), json.loads(row["questions"]))

Trimmed output for that case (customer_service_000000), next to the gold labels:

question type prediction gold
action choice answer_directly 0.478 answer_directly 0.500
category choice delivery 0.949 delivery 0.923
churn_risk score 1.01 (level 1, p 0.626) level 1 (1.067)
needs_human noul false (P(true) 0.271) false (0.467)
urgency score 1.40 (level 1, p 0.605) level 1 (1.200)

All five argmaxes match. answers also carries confidence, answer_confidence and an action block per question, and usage reports token counts and truncation.

To keep the model resident on a hot path, or to score a queue of states:

answers_list = agent.predict_batch(states, questions)   # shared forward passes

Architecture

Encoder answerdotai/ModernBERT-large β€” 28 layers, hidden 1024, 16 heads, 8192 positions
Params 421,293,830 (encoder 394.8M, head 25.2M, scorer 1.05M, act_head 0.26M)
Weights 206 tensors in one model.safetensors, float16, 842 MB
Context 1024 tokens (max_len), option block budget 256 tokens (head_max_len)
Question types 3 primitives: choice (0), score (1), noul (2)

The 3 type slots are the question primitives, not workflows: a learned type_emb row is added to every token of the sequence according to the question's type, and each type carries its own softmax temperature.

state + question text, with one marker token per answer option
  └─ ModernBERT-large encoder
       └─ + type_emb[qtype]                       1024
            └─ 2-layer TransformerEncoder          pre-norm, 16 heads, ff 4096
                 β”œβ”€ scorer at marker positions     LayerNorm β†’ Linear(1024,1024) β†’ GELU β†’ Linear(1024,1)
                 β”‚    └─ masked softmax over options β†’ distribution
                 └─ CLS token + 4 features β†’ act_head β†’ Linear(1028,256) β†’ GELU β†’ Linear(256,2)
                      features: top-1 prob, top1βˆ’top2 gap, normalised entropy, option count / 255

noul questions are scored as P(true) over the false/true markers, score questions as an ordinal level, choice questions as a distribution over named options. act_head emits continue vs escalate; with act_costs.escalate 0.5 and a 3.0 penalty for a wrong action.

Benchmark

400 test cases Γ— 5 questions = 2,000 decisions, official test split, measured by the training run:

model accuracy soft acc Brier ↓ ECE ↓ score MAE ↓
this checkpoint 0.7715 0.5658 0.0507 0.1445 0.2223
convaiinnovations/laya-typed-decisions (published) 0.766 0.471 0.062 0.213 0.242
TypeSafe Jev 1.13.0 (published) 0.727 0.580 0.148 0.144 0.391
ModernBERT-base specialist (published) 0.646 0.542 0.119 0.179 0.444
per-question majority class 0.461 β€” β€” β€” β€”
random guess 0.318 β€” β€” β€” β€”

Latency 124.1 ms p50 / 164.5 ms p95 per decision on 2Γ—T4. 99.38% of decisions land within one ordinal level of the gold answer. Distance to the gold vote distributions: KL 0.0863, total variation 0.1319.

The lead over the base checkpoint is 0.0055 accuracy on 2,000 decisions β€” well inside noise (1 SE β‰ˆ 0.009). What differs more is calibration: Brier and MAE are lower and ECE is 0.14 against the base's published 0.21.

workflow decisions accuracy
invoice_processing 500 0.824
customer_service 500 0.772
security_incidents 500 0.764
agent_trace_observability 500 0.726

A 12-case spot check through the released runtime reproduced benchmark-level accuracy (47/60 correct argmaxes on customer_service).

Training

Init convaiinnovations/laya-typed-decisions, itself fine-tuned from convaiinnovations/laya
Data the benchmark's 1,200-case training split, 6,000 decisions
Method RLCD β€” REINFORCE with a group-mean baseline, plus soft cross-entropy against the teacher distributions; strictly proper reward (log + spherical, ranked probability score for ordinal questions)
Hardware 2Γ—T4, bf16, gradient checkpointing
Budget 7,313 updates, 1 epoch, 1.96 h
Batching max_len 1024, 4,096 tokens per batch

The upstream recipe and training notebook live in the base checkpoint's card.

Limitations

  • Specialist. Trained on four synthetic workflows. Off these workflows it behaves like the base laya checkpoint, or worse. English only.
  • The action head is saturated on this checkpoint. act_probability was exactly 1.0 on all 60 questions across 12 test cases, i.e. it never leaves "continue". Treat the action block as a placeholder, not a routing signal; gate on the per-question answer and confidence instead.
  • Over-confident. ECE 0.1445, and the per-type temperatures [1.033, 1.030, 1.117] were fitted on a slice of the data the model had just trained on (the same issue the base checkpoint reports). Refit temperatures on your own held-out rows before using any confidence threshold.
  • Soft accuracy trails Jev (0.5658 vs 0.580): the argmax is better, the distributions match the teacher less well.
  • Keep choice questions under ~20 options. Options share a fixed 256-token budget, so large label spaces leave few tokens per option.
  • The evaluation harness is not in this repository; benchmark figures come from the training run's own log and use published figures for the comparison rows.
  • No safety claims. Not suitable for autonomous decisions on billing, refunds, security response or customer commitments without human review.

Files

file contents
model.safetensors all 206 tensors, float16
rl_agent_config.json encoder name, head shape, temperatures, cost model, training log
encoder/config.json ModernBertConfig for the backbone
tokenizer/ fast tokenizer, vocab 50,368
benchmark_report.json raw numbers behind the benchmark tables

Citation

The method, architecture and runtime are from:

M, N.; M, A. From Laya to Vega: Open Non-Autoregressive Decision Models with Calibrated Probabilities. Preprints 2026, 2026110781. doi:10.20944/preprints202611.0781.v1

@article{m2026laya_vega,
  title   = {From Laya to Vega: Open Non-Autoregressive Decision Models with Calibrated Probabilities},
  author  = {M, N. and M, A.},
  journal = {Preprints},
  year    = {2026},
  pages   = {2026110781},
  doi     = {10.20944/preprints202611.0781.v1}
}

Backbone: ModernBERT-large. Benchmark: typed-decisions, Apache-2.0. Base checkpoint and laya runtime: Convai Innovations. Jev figures are third-party published and were not measured here.

Downloads last month

-

Downloads are not tracked for this model. How to track
Safetensors
Model size
0.4B params
Tensor type
F16
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for Salmoncat/laya-typed-decisions

Finetuned
(17)
this model

Dataset used to train Salmoncat/laya-typed-decisions