Laya PT/ES Typed Decisions
This checkpoint fine-tunes convaiinnovations/laya-multilingual for native choice, score, and noul decisions in Portuguese and Spanish.
It keeps the original 322M-parameter mmBERT architecture. It adds no inference component and does not generate text. It returns typed answers and probabilities in one forward pass.
Important scope
This is a text model. Inference takes a textual state plus typed questions. The second training stage used text decisions derived from public speech corpora, but this checkpoint does not accept audio by itself. The separate audio projector is not included.
Use
pip install laya
import laya
agent = laya.load("kaimaia/laya-pt-es-typed")
state = {
"subject": "Cobrança duplicada",
"body": "A fatura 4411 foi cobrada duas vezes. Preciso do estorno hoje.",
}
questions = {
"department": {
"type": "choice",
"instructions": "Qual equipe deve atender este caso?",
"criteria": {
"billing": "faturas, pagamentos e estornos",
"technical": "falhas e indisponibilidade",
"other": "outros assuntos",
},
},
"urgency": {
"type": "score",
"instructions": "Qual é a urgência do caso?",
"criteria": ["baixa", "média", "alta"],
},
"refund_requested": {
"type": "noul",
"instructions": "O cliente pediu explicitamente um estorno?",
},
}
result = agent.predict(state, questions)
print(result["answers"])
The official Laya SDK defines these primitives as follows:
choice: selects one key from a runtime-defined criteria object.score: returns an ordinal score over a runtime-defined criteria list.noul: returns a probability from 0 to 1 for a yes-or-no statement.
Use Portuguese or Spanish instructions and option descriptions that match the input language.
Held-out benchmark
The comparison uses 384 held-out decisions from the translated LocalLLaMA/typed-decisions test split. It contains 64 examples for each language and task cell. A separate set of 1,160 validation decisions fits temperature scaling by question type and option count.
Every model answered the same questions. The TypeSafe latency includes network time. Local latency used 48 warm batch-size-one calls on a Modal A100-40GB worker.
| Model | Accuracy | PT | ES | Choice | Score | Noul | Brier | ECE | Score MAE | p50 / p95 |
|---|---|---|---|---|---|---|---|---|---|---|
| Laya PT/ES | 0.8073 | 0.8021 | 0.8125 | 0.7969 | 0.7891 | 0.8359 | 0.1111 | 0.0271 | 0.2327 | 18.25 / 18.69 ms |
| Laya multilingual | 0.3620 | 0.3646 | 0.3594 | 0.2891 | 0.2734 | 0.5234 | 0.2709 | 0.0820 | 0.7670 | 18.67 / 19.23 ms |
| TypeSafe Jev | 0.7396 | 0.7708 | 0.7083 | 0.6484 | 0.7578 | 0.8125 | 0.1413 | 0.0577 | 0.3681 | 358.88 / 439.78 ms |
The full metrics, per-language and per-task cells, sample IDs, latency protocol, and comparison gates are in evaluation_results.json.
Training
Training used the official Laya RLCD recipe with full-model updates. It did not use LoRA.
Stage 1 trained one trajectory for 4, 8, and 16 epochs on Portuguese and Spanish typed decisions. Validation selected the 8-epoch checkpoint. The source dataset was LocalLLaMA/typed-decisions, translated with Qwen/Qwen3-4B-Instruct-2507. The pipeline preserved task types, criteria, labels, soft targets, case IDs, and split groups.
Stage 2 continued the selected checkpoint for two epochs on 2,099 hard PT/ES examples. The set contained 827 choice, 998 score, and 274 noul examples. These text examples came from public Common Voice 22.0 and Multilingual LibriSpeech audio with generated decisions. Consensus validation filtered generated labels before training.
The objective combined RLCD and cross-entropy. RLCD used four perturbations, log plus spherical reward, and a linear noise schedule from 0.4 to 0.1.
The complete stage results are in stage1_training_result.json and stage2_training_result.json. The selected checkpoint metadata is in training.json and rl_agent_config.json.
Data and license
- Base checkpoint:
convaiinnovations/laya-multilingual, Apache-2.0. - Typed decisions:
LocalLLaMA/typed-decisions, revisionea9306458d6e9563628369a3d1e72e362fb381d2, Apache-2.0. - Translation model:
Qwen/Qwen3-4B-Instruct-2507, revisioncdbee75f17c01a7cc42f958dc650907174af0554, Apache-2.0. - Common Voice 22.0 source:
fsicoli/common_voice_22_0, CC0-1.0. - Multilingual LibriSpeech source:
facebook/multilingual_librispeech, CC-BY-4.0. - Decision generator:
Qwen/Qwen3-30B-A3B-Instruct-2507, revision0d7cf23991f47feeb3a57ecb4c9cee8ea4a17bfe, Apache-2.0.
This repository does not redistribute source dataset rows or audio. See ATTRIBUTIONS.md and provenance.json.
Limitations
- This checkpoint accepts text, not raw audio.
- Benchmark inputs cover four synthetic business workflows. They do not prove performance on all domains.
scoreremains the weakest calibrated primitive on the audio-derived validation set.- High-cardinality choices share a fixed token budget. Use a larger
head_max_lenor a hierarchical choice for many options. - The audio grounding behavior gate was pending when this text checkpoint was trained. Do not treat the audio-derived continuation as evidence of audio understanding.
- Refit calibration on a held-out target-domain set before using probabilities as risk scores.
Files
model.safetensors: complete fine-tuned weights.encoder/andtokenizer/: pinned model configuration and tokenizer.rl_agent_config.json: Laya runtime configuration and calibration by task/cardinality.training.json: selected stage-2 configuration, history, and validation results.stage1_training_result.json: 4/8/16 epoch trajectory and held-out evaluation.stage2_training_result.json: hard-example continuation and validation results.evaluation_results.json: full three-model benchmark artifact.typed_dataset_manifest.json: source and translation revisions.audio_dataset_metadata.json,audio_dataset_gates.json, andaudio_dataset_resplit_metadata.json: derived-data provenance and quality gates.provenance.json: compact release provenance.SHA256SUMS: integrity manifest.
Model tree for telepatia-ai/laya-pt-es-typed
Base model
convaiinnovations/laya-multilingualDataset used to train telepatia-ai/laya-pt-es-typed
Evaluation results
- Accuracy on Fixed Portuguese and Spanish held-out sampletest set self-reported0.807
- Brier score on Fixed Portuguese and Spanish held-out sampletest set self-reported0.111