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

jev-laya-explore

NachiketKandari

Evaluates the local Laya decision model alongside TypeSafe's hosted Jev

0·GitHub repo

laya-local-lab

torresnicolas0

Reproduces local evaluations of three Laya variants across support, guardrails, RAG, and model selection

0·GitHub repo

laya-multilingual-dml

minicom365

Runs and benchmarks Laya Multilingual on AMD hardware using DirectML

0·GitHub repo

laya-tri-commentaires

APRESIA

A local Python script sorts YouTube comments into categories using the Laya model

0·GitHub repo

laya-powered-interviewer

BhavyaFattania

Evaluates technical interview answers with similarity metrics, decision-engine scoring and structured feedback

0·GitHub repo

maayaa

ToufiqQureshi

Implements a Laya-derived decision engine with order-stability abstention

0·GitHub repo

laya-fit-check

JhouCode

A Python kit reproduces Laya's published benchmark and compares it with free baselines on custom data

0·GitHub repo

laya-escalation-classifier

Sathish-30

Detects support-chat escalation with Laya and provides batch evaluation and a web demo

0·GitHub repo

Helpdesk-Laya-Router

stefanus-ai-tech

Classifies helpdesk tickets with Laya and produces Excel routing and evaluation reports

0·GitHub repo

laya-post-flagger

MishraAnkit10

Classifies LinkedIn posts with a local Laya server and Chrome extension

0·GitHub repo

gmail-laya-classifier

stefanus-ai-tech

Classifies Gmail messages with Laya

0·GitHub repo

laya-sponsor-skip

Samuel-Ku

Skips YouTube sponsor reads using a local typed-decision model and a Chrome extension

0·GitHub repo

obsidian-classify

adra2n

Classifies Obsidian notes and assesses their long-term value with a local Laya model

0·GitHub repo

ruby_llm-providers-laya

codenamev

A RubyLLM provider uses local ONNX Laya checkpoints to answer judge questions

0·GitHub repo

SEO-Agent-using-LAYA

07anishu12

Audits websites and uses Laya MLX inference to classify and prioritize SEO issues

0·GitHub repo

decision-guard

ashp15205

Adds input scanning, thresholding, and confidence calibration for Jev and Laya decision models

0·GitHub repo

Smart-Support-Ticket-Classifier-Using-Laya

affanhyder-diggit

Routes support tickets with Laya and benchmarks the results against a Gemini-only pipeline

0·GitHub repo

jev-equivalent-research

hjl1045

Evaluates Jev, Laya, and a GPT-5.6 Luna baseline on synthetic auto-claims classification

0·GitHub repo

Autonomous-Decision-Intelligence-Platform-ADIP-

Ayyankhan101

Blueprints a local Laya-based decision platform using the laya-mlx runtime

0·GitHub repo

MacJev-322M-4K-Laya-GGUF

lawrence3699

Runs a quantized Laya-derived decision model through llama.cpp and a Python decision head

0·GitHub repo

Intelligent-Email-Routing-at-Local-Speed-Using-Laya

hasif154

Uses Laya to route emails with typed decisions and a checkpoint-selecting router

0·GitHub repo

jev-deliberation-judge

SammySN-car

Plans a multi-agent deliberation judge using Laya jurors and vote, weight, or veto aggregation

0·GitHub repo

poi-governance

g31322543-crypto

Uses Laya for content moderation and DeepSeek or rules for POI deduplication

0·GitHub repo

usejev

ali-master

Serves Laya through native ONNX inference on Bun with a TypeSafe-compatible API and bilingual playground

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