Downloads · 30 days
127
44% of all-time downloads
telepatia-ai/laya-pt-es-typed
laya-pt-es-typed is a text classification model from telepatia-ai. Use it when you need a label for a piece of text. It is set up for laya. The card lists the license as apache-2.0.
This checkpoint fine-tunes convaiinnovations/laya-multilingual for native choice, score, and noul decisions in Portuguese and Spanish.
Downloads · 30 days
127
44% of all-time downloads
All-time downloads
289
Public
Parameters
322M
678 MB on disk
Likes
4
Public
Click a slice to open those files.
.safetensors644 MB · 95%
From the Hugging Face model README
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.
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.
pip install laya
import laya
agent = laya.load("telepatia-ai/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.
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 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.
convaiinnovations/laya-multilingual, Apache-2.0.LocalLLaMA/typed-decisions, revision ea9306458d6e9563628369a3d1e72e362fb381d2, Apache-2.0.Qwen/Qwen3-4B-Instruct-2507, revision cdbee75f17c01a7cc42f958dc650907174af0554, Apache-2.0.fsicoli/common_voice_22_0, CC0-1.0.facebook/multilingual_librispeech, CC-BY-4.0.Qwen/Qwen3-30B-A3B-Instruct-2507, revision 0d7cf23991f47feeb3a57ecb4c9cee8ea4a17bfe, Apache-2.0.This repository does not redistribute source dataset rows or audio. See ATTRIBUTIONS.md and provenance.json.
score remains the weakest calibrated primitive on the audio-derived validation set.head_max_len or a hierarchical choice for many options.model.safetensors: complete fine-tuned weights.encoder/ and tokenizer/: 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, and audio_dataset_resplit_metadata.json: derived-data provenance and quality gates.provenance.json: compact release provenance.SHA256SUMS: integrity manifest.