SAVRN
Search Contact SAVRN

Open-weight model · Text classification

laya-multilingual

by Scott Lamkin scottrlamkin/laya-multilingual

laya-multilingual is an open-weight model for text classification from Scott Lamkin, released under Apache License 2.0. It has 322M parameters. At 16-bit it needs about 0.8 GB of GPU memory, which fits on 1x MI300X from $1.85 an hour, at the lowest prices in the SAVRN Index.

Non-autoregressive System 1 decision model covering 100+ languages. Give it a state (text, email, ticket, or JSON) and typed questions; it returns typed answers with probabilities in a single forward pass.

Parameters322M
Context—
Weights643.8 MB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads—

Runs On

What it takes to serve laya-multilingual (322M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 0.6 GB 0.8 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 0.3 GB 0.4 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.2 GB 0.2 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Oct 1, 2026.

laya-multilingual on every accelerator the SAVRN Index prices, at every precision

Model Card

By Scott Lamkin, published under apache-2.0, revision c5283e910a9c.

Non-autoregressive System 1 decision model covering 100+ languages. Give it a state (text, email, ticket, or JSON) and typed questions; it returns typed answers with probabilities in a single forward pass. No text generation, so nothing to parse and nothing to hallucinate. Part of the Laya family — use this checkpoint for anything that is not English. The default Router() keeps both english and this checkpoint resident, so a mixed workload no longer swaps checkpoints on every language change. For a server, load them up front so even the first request of each language is just a forward pass: router.attach("multilingual", agent) registers an Agent you already built, so a process that loaded…

Read Scott Lamkin's full model card

Non-autoregressive System 1 decision model covering 100+ languages. Give it a state (text, email, ticket, or JSON) and typed questions; it returns typed answers with probabilities in a single forward pass. No text generation, so nothing to parse and nothing to hallucinate.

Part of the Laya family — use this checkpoint for anything that is not English.

checkpoint encoder params context use it for
convaiinnovations/laya ModernBERT-large 421M 512 English
convaiinnovations/laya-multilingual (this repo) mmBERT-base 322M 1024 (up to 8,192) 100+ languages, ~2x faster
convaiinnovations/laya-typed-decisions ModernBERT-large 421M 1024 the typed-decisions workflows

Long documents: laya-multilingual reads up to 8,192 tokens. It ships with a 1,024-token limit that cuts long documents off, so pass max_len=8192 for them:

python import laya agent = laya.load("convaiinnovations/laya-multilingual") result = agent.predict(long_document, questions, max_len=8192)

In the table below, 16 to 18 of 20 requests were answered correctly with up to about 4,000 tokens of text before them; beyond that results vary (8 to 17 of 20), so check long-document accuracy on your own data. Short inputs give identical answers with max_len=8192, and speed follows the input's real length, not the limit: short inputs are unchanged, and a 4,000-token input takes about 1.7 s on an Apple GPU.

Quickstart

pip install laya
import laya

agent = laya.load("convaiinnovations/laya-multilingual")
result = agent.predict(
    {"body": "मुझसे इनवॉइस 4411 के लिए दो बार शुल्क लिया गया। कृपया आज ही धनवापसी करें।"},
    {"department": {"type": "choice", "instructions": "Which team should handle `body`?",
                    "criteria": {"billing": "invoices, payments, refunds",
                                 "technical": "bugs and outages", "sales": "pricing"}},
     "refund_requested": {"type": "noul", "instructions": "Does the sender ask for money back?"}},
)
print(result["answers"]["department"]["choice"])      # billing

Let the Router choose

from laya import Router

router = Router()
router.predict({"body": "I was charged twice"}, questions)          # -> laya
router.predict({"body": "二重に請求されました"}, questions)            # -> laya-multilingual

The default Router() keeps both english and this checkpoint resident, so a mixed workload no longer swaps checkpoints on every language change. For a server, load them up front so even the first request of each language is just a forward pass:

router = Router()
router.preload(["english", "multilingual"])      # both resident; no swap at request time

router.attach("multilingual", agent) registers an Agent you already built, so a process that loaded this checkpoint directly can hand it to the router instead of loading it twice.

More text reaches this checkpoint than script alone would send: plain-ASCII Spanish, Italian, Portuguese and French (accents stripped by mail clients and ticket systems), Brazilian Portuguese support text, and any script the router has no range for. If you already run a language-identification model, pass its answer with router.predict(state, questions, lang_guess=code_or_callable).

It also receives CJK requests that contain Latin brand names, romanized Bangla, and Azerbaijani. On 20,000 English texts, at most 5 English sentences move, all quoting long native-script names.

Routing is decided from the script of the input, before the forward pass — because the model's confidence gives no warning when a checkpoint cannot read its input (see below).

If laya.load() hangs: transformers probes for TensorFlow at import, and when TF is installed its abseil runtime can deadlock model construction. Run with USE_TF=0.

Why this checkpoint exists

Measured across all 51 MASSIVE languages, intent classification with 20 options (random = 0.050), both checkpoints answering byte-identical questions:

laya (English) laya-multilingual
macro accuracy 0.227 0.366
macro ECE 0.733 0.387
languages clearing 3x random 23 / 51 45 / 51

The English checkpoint does not degrade gracefully outside English — it collapses, and stays confident while doing so. Khmer: 0.000 accuracy at 0.952 confidence. Hebrew 0.060, Armenian 0.050 (exactly random), Bengali 0.080 — all reported with 0.89–0.96 confidence. Its mean confidence never drops below 0.885 at any accuracy level, so confidence gating cannot catch it.

Per-language, this checkpoint turns near-random into usable: Arabic 0.110 → 0.400, Bengali 0.080 → 0.290, Azerbaijani 0.100 → 0.300, Hindi 0.100 → 0.387, Korean 0.110 → 0.490, Turkish 0.140 → 0.437.

XNLI (15 languages)

laya laya-multilingual
English 0.860 0.843
14 other languages 0.521 0.731

Speed — it is also the faster checkpoint

questions per call laya laya-multilingual
1 39.5 ms 32.8 ms
10 158.6 ms (15.9 ms/q) 72.3 ms (7.2 ms/q)
50 771 ms 337 ms (6.8 ms/q)

103–332 questions/sec batched on one T4, despite a 256k vocabulary — the 768-dim / 22-layer encoder is cheaper per token than 1024-dim / 28-layer, and the gap widens with batch size.

Architecture

  • Backbone mmBERT-base (307M, bidirectional, 22 layers, hidden 768, 256k vocab) + a decision head trained from scratch: 2 transformer layers, an option-marker scorer, and an act/escalate head. 322M total.
  • Option markers every option is scored at its own [MASK] token, then softmaxed over that question's options — so the answer space is defined per request, with no retraining.
  • Budget 1024 tokens per question, of which 256 go to the question and its options.
  • Trained from scratch with RLCD: 15,987 updates, 4 epochs, ~4.97 h.

Limits

  • Ships uncalibrated. temperature = [1.0, 1.0, 1.0] with no per-option-count buckets. It is systematically over-confident (mean confidence 0.75–0.83 against much lower accuracy). Refitting one temperature per (question type, option count) on held-out data moves mean ECE 0.314 → 0.106. Do this on your own data before trusting the probabilities.
  • Weaker on English than the English checkpoint: 0.619 vs 0.684 macro across English suites. Route rather than replace.
  • Near chance on typed-decisions zero-shot — 0.342, against a 0.318 random and 0.461 majority-class baseline. Fine-tune for a specific workflow; that is where the capability comes from.
  • Keep choice questions under ~20 options. Options share the fixed 256-token head budget, so a very large label space leaves only a few tokens per label and accuracy falls off sharply.
  • Low-resource languages are weak, not fixed: Swahili 0.210, Tamil 0.250, Amharic 0.110.
  • Ordinal score questions are the weakest primitive (SST-5 0.282), and this checkpoint has a measured position bias on them: it rarely picks the first-listed level, in any language, including English (0 of 290 in one independent run, #131). For English score questions use the English checkpoint. For other languages, validate score outputs on your own data first.
  • noul can under-report "true" here. On a clearly positive input, one measurement put P(true) at about 0.5 while the negative case was correctly near 0 (#156). If noul answers look weak, the same question as a two-option choice with neutral keys (A / B) and yes/no descriptions is a useful check.

Links

  • Docs https://nandhakishorm.github.io/laya/
  • Hub / family https://huggingface.co/convaiinnovations/laya
  • GitHub https://github.com/NandhaKishorM/laya · full benchmark data on the research branch
  • PyPI https://pypi.org/project/laya/
  • Demo https://huggingface.co/spaces/convaiinnovations/laya-demo

Apache 2.0 · Convai Innovations

Identity and Version

Repository
scottrlamkin/laya-multilingual
Publisher
Scott Lamkin
Task
Text classification
Modality
Text
Library
transformers
Parameters
322M parameters
Languages
en, de, fr, es, pt, it, nl, sv
Revision
c5283e910a9c19f6c9e7126bcc59f6c31721f265
First published
2026-09-26
Last updated
2026-09-26

Files and Weights

7 files, 678.2 MB in total. The weights are 1 file totalling 643.8 MB in safetensors.

Weights1 file · 643.8 MB
Configuration2 files · 2.4 KB
Tokenizer2 files · 34.4 MB
Documentation1 file · 9.3 KB
Repository1 file · 1.6 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights643.8 MB 9d628fd971b7
encoder/config.jsonConfiguration1.9 KB —
rl_agent_config.jsonConfiguration472 B —
README.mdDocumentation9.3 KB —
.gitattributesRepository1.6 KB —
tokenizer/tokenizer.jsonTokenizer34.4 MB 609d8f4c067c
tokenizer/tokenizer_config.jsonTokenizer502 B —

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
643.8 MB
Download from Scott Lamkin

Released by Scott Lamkin through its official repository on Hugging Face. Read the license.

Memory Requirements

PrecisionWeights in memory
As published643.8 MB
16-bit0.6 GB
8-bit0.3 GB
4-bit0.2 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About laya-multilingual

How much GPU memory does laya-multilingual need?

About 0.8 GB at 16-bit and 0.2 GB at 4-bit: the weights (322M parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run laya-multilingual on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use laya-multilingual commercially?

Yes. laya-multilingual is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

Similar Models

Model · Text classification

laya-multilingual

Convai Innovations

Non-autoregressive System 1 decision model covering 100+ languages. Give it a state (text, email, ticket, or JSON) and typed questions; it returns typed answers with probabilities in a single forward pass. No text generation, so nothing to parse and nothing to hallucinate. Part of the Laya family — use this checkpoint for anything that is not English. Since laya 0.3.13 the default Router() keeps both english and this checkpoint resident, so a mixed workload no longer swaps checkpoints on every language change. For a server, load them up front so even the first request of each language is just a forward pass: router.attach("multilingual", agent) registers an Agent you already built, so a…

Open weights apache-2.0 322M parameters transformers

Model · Text classification

laya-coreai

Andrey Babikov

Laya typed decisions on Apple Silicon, running on the Core AI runtime — the successor to Core ML. This is a.aimodel asset exported from via Apple's coreai-torch bridge. It outputs choice / score / noul probabilities (and RL action logits) with zero generated tokens and no PyTorch, Core ML, Transformers, or cloud API at inference time. macOS 27+ (Core AI runtime), Python 3.10+. Validated on M3 Max / macOS 27.2. Validate the download end-to-end (all three specializations, timing, contract checks): Snake demo with the model (terminal game, reuses the laya-coreml UI + safety shield; automatically uses the B3 asset when present for ~2x game throughput): ~3× faster per pass than the fastest Core…

Open weights apache-2.0 322M parameters coreai

Model · Text classification

laya-pt-es-typed

Telepatia

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. The official Laya SDK defines these primitives as follows: - choice: selects one key from a runtime-defined criteria object.…

Open weights apache-2.0 322M parameters laya

Classifies GitHub issues written in any language as bug, feature, question or docs. A fine-tune of Laya multilingual (mmBERT-base) used by the laya-triage GitHub Action for non-English issues, next to the English model laya-triage-en. The same 500 NLBSE'23 validation issues, machine-translated with NLLB-200 into 13 languages. Accuracy (±3 points per language): laya-triage and Jev are within noise of each other across languages; both are far ahead of the untuned base. Translations can flatter a model trained on translations, so we also checked real issues: on 367 non-English issues opened in 2026 (never seen, written by people, not translated) accuracy went from 47.1% to 65.7%. Use it…

Open weights apache-2.0 322M parameters

Model · Text classification

rex

NguyenThanhDat

System 1 calibrated decision model for zero-latency threat triage

Open weights apache-2.0 322M parameters

Model · Text classification

sentinel-laya-multilingual

Sep Lol

Fine-tune of convaiinnovations/laya-multilingual (Apache-2.0) for prompt-injection and jailbreak detection. The base model is mmBERT, vocab 256k. Code: 3p3r/sentinel-laya. The English checkpoint is a different model: 3p3r/sentinel-laya. This revision starts from the inject-label checkpoint and adds a round on 3p3r/short-role-attacks, a synthetic English and German set of short role swaps and short orders, each with a benign twin. The five evaluation sets below were not part of training. Noul temperature is 2.2534, kept from the first revision. Threshold is 0.5. Positive class: jailbreak or prompt injection. Metric: Binary F1. Same prompts as the English card, one RTX 3090, batch size 64.…

Open weights apache-2.0 322M parameters