laya-multilingual-turkish-noul

Turkish yes/no (noul) decision model: convaiinnovations/laya-multilingual fully fine-tuned on ahmetege/turkish_jev_noul. Independent fine-tune; not affiliated with TypeSafe/Jev.

Architecture

Model class laya.common.DecisionModel (non-autoregressive, single forward pass)
Encoder mmBERT-base (ModernBERT, 22 layers, hidden 768, 12 heads, 256k vocab)
Decision head 2 × nn.TransformerEncoderLayer (d=768, 12 heads, FFN 3072, pre-norm) + question-type embedding + option scorer (LayerNorm→Linear→GELU→Linear→1)
Parameters 321.9M total (encoder 306.9M incl. 196.6M token embeddings; decision head 15.0M)
Output one logit per option [MASK] marker; Noul options fixed as [false, true]; P(true) = softmax(z / T)[1]
Context budget max_len=512, head_max_len=256 (question + options)
Noul temperature 1.1588 (fitted on validation, clamped to [0.5, 5.0])
Weights float16 safetensors, fp32 temperature buffer

Input sequence (laya.common.build_sequence):

[CLS] noul question: <instructions> [SEP] [MASK] false: <criteria.false> [MASK] true: <criteria.true> [SEP] <state JSON> [SEP]

Usage

import laya

agent = laya.load("thealper2/laya-multilingual-turkish-noul")
result = agent.predict(
    {"metin": "Ankara Türkiye'nin başkentidir."},
    {"q": {"type": "noul",
            "instructions": "Metne göre Türkiye'nin başkenti Ankara mı?",
            "criteria": {"false": "hayır, metin bunu söylemiyor", "true": "evet, metin bunu söylüyor"}}},
)
p_true = result["answers"]["q"]["noul"]

Training

Objective soft cross-entropy on the two Noul marker logits (binary CE on P(true))
Fine-tuning full fine-tuning (no PEFT/LoRA)
Optimizer AdamW, weight decay 0.01; lr encoder 2.5e-05 / head 0.0001; cosine → 1e-06; warmup ratio 0.0
Batch micro 16 × grad-accum 2 = 32
Epochs 4 (selected epoch 1 by validation log_loss_tscaled)
Updates 254
Precision bf16 autocast, fp32 master weights; grad clip 1.0
Sequence length 512 tokens (0.23% of train sequences truncated)
Seed 42
Hardware NVIDIA GeForce RTX 5060 Ti; 0.03 h

Data

ahmetege/turkish_jev_noul @ 582dc7ad61d20498f985f62aa2a212acd3e86868 — Turkish TrGLUE (RTE, QNLI, MRPC, QQP, CoLA, SST-2), Belebele and a Turkish toxic-language set, rephrased into templated Noul questions; hard 0/1 labels. Train 8,100 / validation 1,300 / test 1,900 / test_unseen_task 1,000 (MNLI, unseen task and templates). Only state, instructions and criteria are model inputs. Validation/test rows whose state or quoted sentence also occurs in an earlier split are excluded from evaluation (29 test rows).

Evaluation

test split, threshold 0.5, temperature fitted on validation only. ECE: max-probability confidence, 15 bins (laya.common.ece_score); Brier: mean (P(true) − y)².

Model T n Accuracy F1 ROC-AUC Brier LogLoss ECE
Laya multilingual zero-shot 1.000 1871 0.6558 0.6189 0.6840 0.2668 0.9439 0.1930
Laya multilingual zero-shot + calibration 5.000 1871 0.6558 0.6189 0.6840 0.2265 0.6459 0.0541
Laya multilingual supervised FT 1.000 1871 0.8097 0.8011 0.9000 0.1293 0.4038 0.0214
Laya multilingual supervised FT + calibration 1.159 1871 0.8097 0.8011 0.9000 0.1288 0.4006 0.0072
Laya multilingual + RLCD 1.000 1871 0.8071 0.8033 0.9014 0.1408 0.4921 0.1026
Laya multilingual + RLCD + calibration 2.076 1871 0.8071 0.8033 0.9014 0.1280 0.4007 0.0338

test_unseen_task (MNLI):

Model T n Accuracy F1 ROC-AUC Brier LogLoss ECE
Laya multilingual zero-shot 1.000 1000 0.6830 0.7302 0.7574 0.2323 0.8922 0.1515
Laya multilingual zero-shot + calibration 5.000 1000 0.6830 0.7302 0.7574 0.2183 0.6389 0.0934
Laya multilingual supervised FT 1.000 1000 0.8610 0.8647 0.9115 0.1112 0.3867 0.0422
Laya multilingual supervised FT + calibration 1.159 1000 0.8610 0.8647 0.9115 0.1114 0.3773 0.0444
Laya multilingual + RLCD 1.000 1000 0.8550 0.8596 0.9097 0.1228 0.5271 0.1002
Laya multilingual + RLCD + calibration 2.076 1000 0.8550 0.8596 0.9097 0.1111 0.3693 0.0275

Per-source accuracy of this checkpoint on test (T = 1):

source n accuracy Brier
cola 100 0.4500 0.2521
mrpc 282 0.6879 0.2110
qnli 300 0.8700 0.1036
qqp 290 0.8586 0.1139
rte 300 0.9033 0.0709
sst2 300 0.7533 0.1621
toksik 299 0.8997 0.0776

Limitations

  • Labels are hard 0/1; probabilities are calibrated only to the distribution of this dataset.
  • Trained only on noul questions; choice/score behaviour is inherited from the base model and was not evaluated.
  • Inputs longer than 512 tokens are right-truncated (state side).

License

CC-BY-SA-4.0, following the training data (ahmetege/turkish_jev_noul). Base model convaiinnovations/laya-multilingual is Apache-2.0.

Reproducibility

python 3.12.3 · torch 2.11.0+cu128 · CUDA 12.8 · transformers 5.17.0 · datasets 4.3.0 · laya 0.3.20 · base model revision e4e9ddf21a7b1903b7acffd8814ad4307bf63a67. Full config: checkpoint_meta.json.

Downloads last month
8
Safetensors
Model size
0.3B params
Tensor type
F32
·
F16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for thealper2/laya-multilingual-turkish-noul

Finetuned
(99)
this model

Dataset used to train thealper2/laya-multilingual-turkish-noul

Evaluation results