Text classification with Laya

A Laya `choice` question is a zero-shot classifier. You name the labels, optionally describe each one, and get the top label with a probability for every option in one forward pass. Labels are defined at request time, so there is no training step to get started.

787 projects

laya

NandhaKishorM

Runs multilingual typed-decision models and provides routing, serving, and integration options

23.9k·GitHub repo
C

laya

convaiinnovations

A multilingual-ready System 1 model that returns calibrated typed decisions over text in one pass

21.7k·HF model
C

laya-multilingual

convaiinnovations

A multilingual System 1 model that returns calibrated typed decisions over text in one pass

14.2k·HF model
C

laya-demo

convaiinnovations

A Gradio demo for Laya typed decisions, multilingual routing, moderation, and RAG filtering

288·HF Space

openJev-verdict-2.0

Heman10x-NGU

Develops and benchmarks a non-autoregressive typed-decision model against Jev and Laya

286·GitHub repo
C

laya-typed-decisions

convaiinnovations

A Laya model fine-tuned for agent traces, customer service, invoices, and security incidents

4.1k·HF model

laya-opencv

uu889

Combines OpenCV measurements with Laya or Jev decisions in a local visual-inspection workbench

28·GitHub repo

stuntd

bladedevoff

Learns typed decision heads on a frozen Laya encoder and serves them through Jev- and OpenAI-compatible APIs

27·GitHub repo

layaForWeb

vishalmysore

Runs a quantized ONNX version of the Laya decision model entirely in the browser

18·GitHub repo

laya-goish

centillex-labs

Runs Laya GGUF models in a Rust HTTP server for structured text decisions

17·GitHub repo

laya-drift

pythongiant

Monitors opencode sessions for semantic drift using Laya typed-decision probes

15·GitHub repo
T

laya-fa-support

tarfandoon

Routes Persian customer-support messages to the appropriate department using a fine-tuned Laya model

14·HF model

laya-jev-lab

yibie

Compares Jev and Laya decision models and evaluates a local-first inference cascade

10·GitHub repo

WechatVibe

tswawa

Analyzes WeChat conversations for intent, emotion, and participant profiles using Laya models

10·GitHub repo
T

laya-vision-demo

thaitea

Demonstrates calibrated image-based yes/no, choice and rubric decisions with Laya Vision

9·HF Space

opendecider

manjunathshiva

Provides calibrated System 1 decision models and benchmarks them against Laya and other models

9·GitHub repo

laya-security-guardrail

shashvik

Runs local Laya typed decisions as cybersecurity inspection and guardrail checks

8·GitHub repo

gg-friggin-ez

ItisShikhar

Screens Node.js text for profanity and toxicity using Jev and Laya System 1 models

7·GitHub repo

jevbench

dhruvmehra

A reproducible benchmark compares JEV, Laya, and other classifiers across datasets and metrics

7·GitHub repo
A

laya-multilingual-demo

abhishekbhakat

Demonstrates multilingual Laya typed decisions and probabilities through a Gradio interface

7·HF Space
A

laya-typed-decisions-mlx

aac6fef

Runs Laya typed-decision inference natively on Apple silicon with MLX

6·HF model

layaForWorkflows

vishalmysore

Runs browser-based Laya decisions to automate branching workflows

6·GitHub repo
L

laya-jev-benchmark

Luni

Benchmarks Laya against Jev and other models on phishing detection and calibration

5·HF dataset
H

laya-tr

hayriyigit

A Turkish fine-tune of Laya answers typed choice, yes/no, and score questions about text

19·HF model

Example

From the core README:

from laya import Router

router = Router()
questions = {
    "department": {"type": "choice", "instructions": "Which department should handle this?",
                   "criteria": {"billing": "invoices, payments, refunds",
                                "technical": "bugs, outages, system errors",
                                "other": "everything else"}},
}
result = router.predict("La aplicación se cierra cada vez que abro la configuración.", questions)
print(result["answers"]["department"]["choice"])  # technical

Each answer includes probabilities for every label and a confidence value you can gate on.

Label count matters

All options share a token budget (head_max_len: 192 on laya, 256 on the other two checkpoints). The README reports Banking77 (77 labels) at 0.425 for Laya against 0.870 for Jev on 72 labels, because each label gets only 3 to 4 tokens. Keep a question under about 20 options, or raise head_max_len, split into coarse and fine questions, or use predict_shortlist with embeddings.

Accuracy you can expect

  • The core README lists AG News 0.947 and DAIR Emotion 0.573 for the English checkpoint.
  • sysone-bench ran Laya and Jev on byte-identical inputs: AG News 0.940 vs 0.910, emotion 0.540 vs 0.550, and a 12-intent Banking77 subset 0.802 vs 0.906.
  • jevbench (dhruvmehra) compares Jev, Laya, LLMs, fine-tuned DistilBERT and zero-shot NLI on SST-2, AG News and Banking77.

Fine-tune when zero-shot is not enough

The base checkpoints score 0.362 and 0.352 on the README's typed-decisions benchmark. The fine-tuned laya-typed-decisions checkpoint reaches 0.766. The fine-tuning notebook runs on Kaggle's free 2x T4 GPUs.

Projects

ollaya serves Laya alongside zero-shot NLI and GLiClass classifiers behind one API. edgejev reports AG News accuracy for fp32 and INT8 CPU builds.

Caveats

The README warns against boolean-word labels such as yes/no or true/false in choice questions, and it reports failures on negated requests. Use descriptive labels and test on your own data.

Hosted option

layahost serves Laya over a Jev-compatible API, with ready support_intent and sentiment templates on /v1/decide (plus a language template that uses a dedicated detector, not Laya). Its console has test sets: upload your own labelled texts, run Laya and Cloudflare's open Clef models on the same rows, and compare accuracy before you switch production traffic. With no labels, it still returns every answer as a CSV. layahost is run by the makers of laya.tools. For other hosted and self-hosted routes, see Hosted Laya API.

More ways to use Laya