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
laya-local-lab
torresnicolas0
Reproduces local evaluations of three Laya variants across support, guardrails, RAG, and model selection
laya-multilingual-dml
minicom365
Runs and benchmarks Laya Multilingual on AMD hardware using DirectML
laya-tri-commentaires
APRESIA
A local Python script sorts YouTube comments into categories using the Laya model
laya-powered-interviewer
BhavyaFattania
Evaluates technical interview answers with similarity metrics, decision-engine scoring and structured feedback
maayaa
ToufiqQureshi
Implements a Laya-derived decision engine with order-stability abstention
laya-fit-check
JhouCode
A Python kit reproduces Laya's published benchmark and compares it with free baselines on custom data
laya-escalation-classifier
Sathish-30
Detects support-chat escalation with Laya and provides batch evaluation and a web demo
Helpdesk-Laya-Router
stefanus-ai-tech
Classifies helpdesk tickets with Laya and produces Excel routing and evaluation reports
laya-post-flagger
MishraAnkit10
Classifies LinkedIn posts with a local Laya server and Chrome extension
gmail-laya-classifier
stefanus-ai-tech
Classifies Gmail messages with Laya
laya-sponsor-skip
Samuel-Ku
Skips YouTube sponsor reads using a local typed-decision model and a Chrome extension
obsidian-classify
adra2n
Classifies Obsidian notes and assesses their long-term value with a local Laya model
ruby_llm-providers-laya
codenamev
A RubyLLM provider uses local ONNX Laya checkpoints to answer judge questions
SEO-Agent-using-LAYA
07anishu12
Audits websites and uses Laya MLX inference to classify and prioritize SEO issues
decision-guard
ashp15205
Adds input scanning, thresholding, and confidence calibration for Jev and Laya decision models
Smart-Support-Ticket-Classifier-Using-Laya
affanhyder-diggit
Routes support tickets with Laya and benchmarks the results against a Gemini-only pipeline
jev-equivalent-research
hjl1045
Evaluates Jev, Laya, and a GPT-5.6 Luna baseline on synthetic auto-claims classification
Autonomous-Decision-Intelligence-Platform-ADIP-
Ayyankhan101
Blueprints a local Laya-based decision platform using the laya-mlx runtime
MacJev-322M-4K-Laya-GGUF
lawrence3699
Runs a quantized Laya-derived decision model through llama.cpp and a Python decision head
Intelligent-Email-Routing-at-Local-Speed-Using-Laya
hasif154
Uses Laya to route emails with typed decisions and a checkpoint-selecting router
jev-deliberation-judge
SammySN-car
Plans a multi-agent deliberation judge using Laya jurors and vote, weight, or veto aggregation
poi-governance
g31322543-crypto
Uses Laya for content moderation and DeepSeek or rules for POI deduplication
usejev
ali-master
Serves Laya through native ONNX inference on Bun with a TypeSafe-compatible API and bilingual playground
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