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.

252 projects

faceid-bench

mazenDDr

A face-unlock benchmark measures detection and recognition pipelines and tests Laya for yes/no decisions

0·GitHub repo

SystemOne

iksnerd

Runs local Laya checkpoints for fast typed judgments over text

0·GitHub repo

decide

stackable-specs

Runs reusable typed decision templates across Jev, Laya, and general-purpose language models

0·GitHub repo

typed-decision-bench

4nt0ineB

Compares Jev, OpenJev, Laya, and other models on zero-shot classification tasks in English and French

0·GitHub repo

jev-chat-jarvis-mac

adra2n

A macOS overlay uses local Laya to classify WeChat message intent and risk

0·GitHub repo

gut-check

rfi-irfos

Uses Laya confidence to route uncertain agent-verification cases to a larger language model

0·GitHub repo

crisis-triage

mazenDDr

Fine-tunes and evaluates Laya for multilingual disaster-message triage with uncertainty routing

0·GitHub repo

laya

joldibaev

Demonstrates Laya classifying Russian customer requests and scoring urgency and churn risk

0·GitHub repo

laya

vk-alto-none

Provides a multilingual non-autoregressive Laya decision engine with checkpoint routing

0·GitHub repo

LayaGUIDemo

SaturnAura

Provides a Gradio interface for asking Laya choice, score, and yes-or-no questions about text

0·GitHub repo

LayaMCP

aydinozturk

Exposes Laya classification, triage, guardrail, and routing tools through an MCP server

0·GitHub repo

AudioLaya

ThanabordeeN

Trains a speech-to-decision prototype that classifies calls using Laya decision heads

0·GitHub repo

laya-triage

AlexLeow99

Provides an offline console for classifying and scoring text with the Laya decision model

0·GitHub repo

laya-node

roryyu

Provides a Node.js SDK for local Laya typed decisions using Transformers.js and ONNX

0·GitHub repo

laya-api

hugomes14

Serves a multilingual ticket classification model through an HTTP API

0·GitHub repo

laya-detector

MaeTor

Scores vocal input for lies and false statements using the Laya model

0·GitHub repo

laya-local

arshadakl

Turns Malayalam and English voice or text commands into safe local actions using Laya

0·GitHub repo

migration-laya

ViniCarvalhoDados

Evaluates Laya for triaging legacy SQL queries before database migration

0·GitHub repo

wireshark-laya

stefanus-ai-tech

Evaluates Laya and rule-based judgments of network traffic features extracted from PCAP files

0·GitHub repo

laya-multimodal

TalalAhmed311

Trains a multimodal typed-decision model that answers image and text questions in one pass

0·GitHub repo

vibe-check

ghobs91

Detects ragebait and spam in real time using Laya ONNX

0·GitHub repo

laya-multilingual-playground

pumpkinfadly

Provides a web playground and API for testing multilingual Laya typed decisions

0·GitHub repo

laya-decision-engine

vampirethoran

Serves local Laya typed decisions over HTTP with multilingual routing and inference metrics

0·GitHub repo

laya-ai-poc

distractdiverge

Prototypes offline Todoist task categorization with a currently stubbed Laya integration

0·GitHub repo

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.

More ways to use Laya