Open benchmark · November 2026

Laya vs GLiNER2 for Czech-first text routing

Two small local models that send a short text to one of 5–15 labels. We tested both on public Czech, Slovak, German, English and Russian data to answer one question: which one should a Czech-first team fine-tune?

Laya multilingualmmBERT-base encoder, 322M parameters · laya 0.5.6
GLiNER2.5-multi-DecidemDeBERTa-v3-base encoder, 287M parameters · gliner2 2.2.0
3 public datasets5 languages136 runs in two stagesCode and data on GitHub

The short answer

Each row compares the two models on the same test rows. The dot is the macro-F1 difference, the line its 95% interval. A model wins only when it is at least 3 points ahead, a bar we fixed before the runs.

Laya minus GLiNER, macro-F1 points, all languages pooled
GLiNER wins (3+ points ahead) no winner within ±3 points
Intervals: paired bootstrap, 1,000 resamples of the test rows (SIB-200 resampled by sentence, since its five languages are translations of the same sentences). Stage 1, one training seed per run, so the intervals cover test-set noise, not training noise. The three-seed results of Stage 2 are below.
Data table
After fine-tuningNo practical difference

With three seeds, within 2 macro-F1 points on every dataset. Only the 4,268-article Czech news test detects a consistent GLiNER edge, 2.4 points: real, but below our 3-point bar.

Without training dataGLiNER is ahead

10.6 points on banking intents and 4.3 on Czech news sections, with every label wording we tried. With little data, Laya catches up once trained with batch 8.

Czech without diacriticsLaya breaks on short requests

Removing diacritics costs Laya 25–32 points on Czech banking requests and GLiNER 5–7. On longer news texts the drops are 3–5 vs 1–3.

Hand-off to an LLMGLiNER's confidence is more useful

Better calibrated and with a lower risk–coverage area in most cells. Neither model reliably flags inputs from categories it was never trained on.

Shrnutí česky

Porovnali jsme dva malé lokální modely pro směrování textu do 5–15 kategorií (Laya multilingual a GLiNER2.5-multi-Decide) na třech veřejných datových sadách s češtinou: bankovní záměry (MINDS-14), témata vět (SIB-200) a rubriky českých zpráv. Ve dvou etapách (136 běhů, tři opakování tréninku) měříme přesnost po jazycích, kalibraci, předávání nejistých případů velkému modelu, potřebu dat a odolnost vůči „špinavé“ češtině. Po dotrénování se modely liší o méně než 2 body macro-F1; jen na velkém testu českých zpráv je GLiNER stabilně lepší o 2,4 bodu. Bez trénovacích dat vede GLiNER (o 10,6 bodu u bankovních záměrů). Laya výrazně ztrácí na češtině bez háčků a čárek (o 25–32 bodů u krátkých dotazů, GLiNER o 5–7). GLiNER má užitečnější míru jistoty pro předání velkému modelu. Strojově přeložená česká trénovací data nahradí 77–88 % přínosu původních českých dat.

Why we ran this

We are building a Czech-first router: a small, fast model that sends each incoming text to one of 5–15 labels and passes unclear cases on to a large language model. It has to run on our own hardware and be fine-tunable on our labels, so models offered only as a cloud service were out.

Czech first

Most of the traffic is Czech; the rest is Slovak, English, German and Russian. A model that is good in English but weak in Czech is no use to us.

No data of our own yet

We had no labelled history and no budget for hand labelling, so the benchmark uses only public datasets that are already labelled and contain Czech.

Two candidates

Laya multilingual, which we expected to suit mixed-language input, and GLiNER2.5-multi-Decide, built to classify from label names alone. Both are Apache-2.0 and run locally. A third candidate was dropped because it runs only as a cloud service.

A quick orientation

The aim was an honest 80/20 answer: one seed, default recipes, no hyperparameter search. Rigour was added only where it was cheap.

How it went

  1. Question and plan. We framed the router question, picked the two candidates and cut the plan to a lean grid: 3 datasets, 2 models, zero-shot and fine-tuned, one seed, 20 runs. A Czech film-review set was dropped because star ratings are a scale, not a routing task.

  2. Runs. All 20 runs finished the same evening.

  3. Statistical review. SIB-200's five languages are translations of the same sentences, so its pooled intervals now resample sentences, not rows. The wording changed from "Laya slightly ahead" to "no difference found", and this interactive report was added.

  4. Second stage planned. The tie moved the choice to axes this benchmark barely measured. A second stage adds three seeds, hand-off quality, data needs per label and a Czech focus.

  5. Stage 1 defects found. Its fine-tuned checkpoints had not been kept, and predicted probabilities had been rounded, by our code to 6 decimals and by laya itself to 4, so confidence rankings were partly lost. Stage 2 re-runs the models with full-precision probabilities.

  6. Stage 2 runs. 116 runs in about 5 hours, no failures.

How the benchmark works

Both models get the same rows, the same label names in the same order and the same prompt, zero-shot and fine-tuned. Each uses its library's default fine-tuning recipe; there is no hyperparameter search.

Where every row goes
PUBLIC DATA SPLITS TRAINING ROWS PER BLOCK MODELS SCORING MINDS-1414 banking intentscs de en ru SIB-2007 sentence topicscs sk de en ru Czech News12 news sectionscs pinned Hugging Face revisions split once, seed 42 train splitfine-tuning rows calib split test split AZero-shotpublished weights, no training rows D20 rows per label140–280 rows, languages mixed BFull train split1,337–3,505 rows, all languages CCzech rows only (SIB-200)701 rows; tested in all 5 languages LayammBERT-base GLiNER2mDeBERTa-v3-base same rows, labels, prompt default recipe each raw Metrics on test macro-F1 and accuracy ECE, raw and after T Laya − GLiNER, paired bootstrap, 1,000 resamples Temperature Tone per run rescaled calib rows: fit T by minimum log-loss, nothing else test rows: scored once, never trained or tuned on
Temperature scaling divides the model's log-probabilities by T before the softmax. It never changes which label wins, only how confident the model claims to be.

Same inputs

Laya gets one choice question with its default instruction and the label names as options. GLiNER gets one single-label task with the same names. No label descriptions for either.

Decision rule

Fixed before the runs: a model wins a cell only if its macro-F1 is at least 3 points higher. Anything smaller is reported as no winner.

Uncertainty

95% intervals from 1,000 bootstrap resamples, paired for differences. One training seed, so seed-to-seed variation is not measured.

Laya multilingualGLiNER2.5-multi-Decide
Weightsconvaiinnovations/laya, subfolder multilingual, revision 246177efastino/GLiNER2.5-multi-Decide, revision 36e46e4
EncodermmBERT-base, 322M parametersmDeBERTa-v3-base, 287M parameters
Packagelaya==0.5.6, Apache-2.0gliner2[train]==2.2.0, Apache-2.0
Recipelibrary default: 4 epochs, effective batch 64, RLCD objective, fp16model card: 3 epochs, batch 8, fp16
Not testedthe newer vegaml engine that laya.Agent() loads by default since 0.5multi-label, constraint and extraction features

How much data, and what it can detect

Train, calibration and test sizes follow each dataset's official split where one exists (our own 60/10/30 split for MINDS-14). The last column is the half-width of the 95% interval on the difference between the fine-tuned models: gaps smaller than that are invisible here.

Read it like this: on MINDS-14 the fine-tuned models differ by 1.7 points, and the test set can pin that down only to ±1.8. A 1–2 point difference cannot be seen with this much data; a 5-point difference on a whole dataset could not hide. Per-language rows are a check for large failures, not a ranking.

More training data, smaller gap

GLiNER starts ahead without training. Twenty examples per label close most of the gap, and the full training split closes the rest.

Macro-F1 (%) by amount of training data, all languages pooled
Laya multilingual GLiNER2.5-multi-Decide whisker: 95% interval
The horizontal axis is ordered, not to scale. On SIB-200, 20 examples per label is 140 rows against 3,505 in the full split, which is why its middle step is small.
Data table

Language by language

Zero-shot, Czech is Laya's weakest language on banking intents (60.8 against GLiNER's 74.5). After fine-tuning every language lands within the no-winner zone, but per-language test sets are small and the intervals wide.

Laya minus GLiNER per language, macro-F1 points
GLiNER wins Laya wins no winner within ±3 points
158–204 test rows per language (Czech News: 600 Czech rows). The scale stays the same in both views.
Data table

Can you threshold on the confidence?

A router often acts on confidence: route if the model is 90% sure, escalate otherwise. That only works if 90% means right nine times in ten. Expected calibration error (ECE) measures how far claimed confidence is from actual accuracy.

Expected calibration error (%), as shipped and after temperature scaling
Laya GLiNER as the model returns it after one fitted temperature
Lower is better. Top-label ECE with 15 confidence bins on the test rows. The temperature is fitted on 220–500 calibration rows per run.
Data table
Claimed confidence vs share correct
Test rows grouped into ten confidence bins. Points below the diagonal are overconfident: the model is right less often than it claims.
as shipped after temperature scaling perfect calibration
Bins with fewer than 5 rows are not drawn.
Data table

Training on Czech only

If the labelled data you have is Czech, does the router still work for Slovak, German, English and Russian? On SIB-200 we fine-tuned both models on the 701 Czech training sentences alone and tested in all five languages.

SIB-200 macro-F1 (%): trained on Czech only vs on all five languages
Laya GLiNER trained on all 5 languages (3,505 rows) trained on Czech only (701 rows)
Δ = Czech only minus all languages. The largest single drop is GLiNER in German, 3.8 points. Trained on Czech only, the two models are level with each other (Laya − GLiNER +0.2 pooled).
Data table

Speed and training cost

For one text at a time both models take 20–25 ms on a T4 and 0.1–0.2 s on 8 CPU threads, which is fast enough for routing. In batches, Laya scores 2.6–2.8 times as many texts per second.

Inference on Czech inputs
Laya multilingual GLiNER2.5-multi-Decide
Median over 100 texts on the GPU and 30 on the CPU, after a warm-up. Inputs average 85, 124 and 355 characters on MINDS-14, SIB-200 and Czech News.
Data table

Stage 2: three seeds, hand-off and Czech

The tie after fine-tuning moved the decision to things Stage 1 barely measured. Stage 2 (116 runs, same T4, same default recipes) repeats the main cells with three seeds and asks four practical questions: how well each model hands unclear cases to an LLM, how much data it needs, whether label wording matters, and how it copes with real Czech input. All alternative wordings and the decision rule were fixed before any Stage 2 score was seen.

The tie moved the decision

When accuracy after fine-tuning does not separate the models, the choice depends on hand-off quality, data needs and robustness.

One seed looked thin

Stage 1 could not say whether a 1–2 point gap came from the model or from the training run.

Czech is the market

Stage 1 showed Laya relatively weakest in Czech in 6 of 7 multilingual cells and behind on Czech News in all three settings. That needed confirming or ruling out.

Defects to fix

Checkpoints had not been kept and probabilities had been rounded, so the models had to be re-run anyway.

Three seeds: still a tie

Macro-F1, mean ± SD over three seeds. Δ = Laya − GLiNER with a 95% interval over test rows and seeds. Seeds move a score by 0.2–1.6 points; seed 0 reproduces Stage 1 within 0.6. Stage 1's +1.7 for Laya on MINDS-14 does not survive.

DatasetRows per labelLayaGLiNERΔ [95% CI]
MINDS-142086.5 ± 1.588.9 ± 0.5−2.4 [−5.0, +0.2]
MINDS-14full93.9 ± 0.794.5 ± 0.9−0.7 [−2.5, +1.1]
SIB-2002080.6 ± 0.881.2 ± 0.5−0.7 [−4.1, +3.0]
SIB-200full86.7 ± 1.086.6 ± 0.4+0.1 [−2.9, +3.4]
Czech News2053.9 ± 1.057.6 ± 1.0−3.6 [−6.7, −0.6]
Czech Newsfull64.6 ± 0.866.4 ± 0.4−1.8 [−4.8, +1.2]
Czech News, 4,268full63.6 ± 0.566.0 ± 0.2−2.4 [−3.6, −1.3]

Little data: Laya's lag was its recipe

Macro-F1, mean over three seeds; Czech News on the 4,268-article test. With its default effective batch of 64, Laya makes only a handful of updates on small sets. With batch 8 it matches GLiNER at every small size (within ±1.2 points). Only Laya's recipe was varied. *One seed.

DatasetRows per labelLaya defaultLaya batch 8GLiNER
MINDS-14070.9–81.5
MINDS-141079.387.386.6
MINDS-142086.589.288.9
MINDS-145092.393.693.1
MINDS-14full (~95)93.9–94.5
Czech News043.0–47.3
Czech News1044.855.954.8
Czech News2053.258.357.6
Czech News5059.460.861.6
Czech News10062.0–64.1
Czech Newsfull (200)63.6–66.0
Czech News1,000*66.9–69.4

Messy Czech: diacritics are the risk

Change in macro-F1 on the same Czech test rows after the perturbation, full training, mean over seeds. Without diacritics, Laya changes its answer for a quarter of short Czech requests, GLiNER for 8%; zero-shot and with 20 examples per label the pattern is the same. Lower case does not change GLiNER's predictions at all.

DatasetPerturbationLayaGLiNER
MINDS-14no diacritics−26.0 [−32.0, −20.4]−5.9 [−10.1, −1.9]
MINDS-14lower case−0.50.0
MINDS-14typos, 5% of words−0.8−0.5
SIB-200no diacritics−4.2−2.5
Czech Newsno diacritics−3.3−0.7
Czech Newsall three−3.7−1.2

Hand-off: GLiNER's confidence is the better signal

A temperature and a threshold are fitted on the calibration split and applied to the test split. Coverage = share of inputs kept for a 95% accuracy target (91–97% reached on new data); AURC = area under the risk–coverage curve, lower is better. Full training, mean over seeds. Laya's temperatures stay at 3–7 with full-precision probabilities, so its overconfidence is real.

DatasetLaya ECE after TGLiNER ECE after TLaya coverage @95%GLiNER coverage @95%Laya AURCGLiNER AURC
MINDS-142.82.199.898.50.620.50
SIB-2007.05.167.262.94.153.49
Czech News (4,268)7.44.218.432.117.2912.55

Labels hidden from training (one seed): AUROC = how well confidence separates inputs of known labels from inputs of labels the model never saw; 50% is chance. Escalated = share of hidden-label inputs sent to the LLM when 10% of known inputs are.

DatasetHidden labelsLaya AUROCGLiNER AUROCEscalated, Laya / GLiNER (%)
MINDS-144 / 1493.793.786 / 88
SIB-2002 / 768.082.933 / 60
Czech News3 / 1273.773.651 / 45

Czech data, wording and translation

Tokenizer

Laya's tokenizer does not split Czech more finely than GLiNER's (1.65 vs 1.87 tokens per word on MINDS-14 Czech), so it cannot explain a Czech gap.

Czech tilt

Laya's gap in Czech minus its gap elsewhere: −1.9 points pooled [−4.8, +1.0], negative in 5 of 6 cells. A hint, not an established effect.

Czech News at scale

GLiNER's edge of about 2–2.5 points holds from 50 examples per label up to 1,000 and in 10 of 12 sections. On headlines alone the models tie.

Label wording

Czech label names help both models on Czech inputs (MINDS-14 Czech: GLiNER 74.5 → 90.9, Laya 60.8 → 74.4) but cost Laya elsewhere. GLiNER is ahead or tied with every wording.

Machine-translated Czech (MINDS-14, Czech test rows, mean over seeds). The English training rows were translated into Czech with MiLMMT-46-4B; every test row is native. Translation adds about 6 points; the remaining gap to native Czech data is within noise.

ModelNo Czech in training+ machine-translated CzechNative CzechShare of the gain recovered
Laya86.492.093.777% [7, 138]
GLiNER88.694.995.888% [52, 148]

Every Stage 2 table: results/stage2/tables.md; every number: results/stage2/metrics.json, computed by scripts/evaluate_stage2.py. Checkpoints were kept only for full training, seed 0, and the large Czech News test has 4,268 articles instead of the planned 5,000.

Which one to use

What these results support for a router with 5–15 labels on Czech-first traffic.

How many labelled examples per label can you get?
none, or about 20
Start with GLiNER2.5-multi-Decide

10.6 points ahead zero-shot on intents and 4.3 on Czech news. With 10–50 examples per label Laya catches up only if trained with batch 8 instead of its default.

a few hundred or more
Accuracy will not decide Either model
  • Scoring large batches on a GPU: Laya, with 2.6–2.8× the throughput.
  • Handing unclear cases to an LLM: GLiNER, whose confidence is better calibrated and ranks errors better.
  • Czech typed without diacritics: GLiNER. Laya loses up to 32 points on short requests.
Either way, fit a temperature on a few hundred held-out rows before you threshold on confidence, and check the choice on a few hundred rows of your own traffic, including text without diacritics: these datasets are stand-ins for it.

Limitations

Few seeds, default recipes

Stage 1 used one seed; Stage 2 adds three for the main cells, but the hidden-label runs, the 1,000-per-label run and the zero-shot wordings have one. Only one recipe change was tried, Laya with batch 8.

Stand-in data, not real traffic

MINDS-14 is transcribed spoken banking requests, SIB-200 translated encyclopedic sentences, Czech News topic classification. None has a "none of the above" label; Stage 2 hides labels from training as a proxy for out-of-scope traffic. The messy-Czech variants are synthetic, not real user text.

Small per-language test sets

158–204 rows per language, about 12 per label on MINDS-14. Per-language intervals run up to ±8.5 points; read the pooled numbers first.

Low-data block keeps full calibration

Block D trains on 20 rows per label but fits its temperature on the usual 220–500 calibration rows, which a real low-data project might not have.

Czech News sections follow outlets

Some sections come mostly from one outlet in the training sample, so a model can partly learn an outlet's style. The test sample comes from a different shard with a more mixed outlet mix.

Not covered

More than 14 labels, very long inputs, GLiNER2's multi-label and extraction features, Laya's abstain and route outputs and its vegaml engine.

Reproduce

Everything on this page is computed from the per-example predictions in results/predictions/. The data is downloaded at pinned revisions; no Hugging Face token is needed.

git clone https://github.com/edwphn/laya-gliner2-czech-benchmark && cd laya-gliner2-czech-benchmark
python -m venv .venv && . .venv/bin/activate
pip install -r requirements.txt       # or requirements-lock.txt for the exact environment
python scripts/prepare_data.py        # about 1 minute
python scripts/run_benchmark.py       # all 20 runs, resumable; needs a GPU
python scripts/latency.py
python scripts/evaluate.py            # results/metrics.json, results/tables.md
python scripts/make_figures.py        # results/figures/*.png
python scripts/make_report.py         # this page: docs/index.html
# Stage 2
python scripts/prepare_stage2.py
python scripts/translate_mt.py        # machine-translated Czech, needs a GPU
python scripts/run_stage2.py          # 116 runs, resumable
python scripts/evaluate_stage2.py     # results/stage2/metrics.json, tables.md