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
laya-rlcd-expedition
HambaliMarcel
Runs local Laya decision inference in a web page for work and sales scenarios
laya-code-review-action
Mcbeer
Reviews pull-request diffs against configurable rules using Laya's typed-decision model
jev-laya-classification-bench
bhushankinge
Benchmarks Jev, Laya, and Qwen on classification of federal IT solicitations
laya-coreml-vs-jev-benchmark
sallout
Compares Laya and Jev on zero-shot intent classification benchmarks
laya-fine-tune-bn-eco-voice
nafi-ullah
Fine-tunes multilingual Laya for typed decisions in a Bangla e-commerce voice agent
news-signal
harveybc
Classifies financial news locally with Laya and emits auditable typed results
lx
iheeb1
Prunes shell output using RTK rewrites and Laya classifications
jev-course-demo
clchrf
Evaluates university AI course plans in the browser using quantized Laya ONNX inference
cut
harshpreet931
Uses Laya to label and cut unnecessary lines from posts in a browser or local app
xcrystal
dgu0323
Scores cryptocurrency relevance and market signals in X posts with a local Laya server
laya-idjvsuen
muhfalihr
Fine-tuned Laya models for classification and decisions across Indonesian, Javanese, Sundanese, and English
laya-service
manul-audio
Wraps Laya predictions in a FastAPI service for Paperclip agent decisions
apm-laya-triage
danielmeppiel
Benchmarks local Laya issue classification against labels in the Microsoft APM corpus
jev-laya-openai-comparison
amansahani
Benchmarks Laya and Jev against OpenAI models on financial regulatory decisions
decision-model-bench
SaiNarayana-B
Tests the accuracy and calibration of Laya decision-model confidence scores
reflex-engine
chenshuai9101
A Python toolkit collects, calibrates, and automates routine decisions using local Laya
@johnhenry/aimatey-native-laya
johnhenry
Runs ConvAI's Laya typed-decision model on-device through a TypeScript ONNX Runtime port
cortico-world-simple-trpg-check
dtmosken
A TRPG skill-check tool scores skill success with Laya or Jev and resolves d100 rolls
laya-calibration-lab
BunsDev
Fits and evaluates probability calibration for Laya typed-decision models
laya-burmese-sib200-demo
aungthuhein-dev
Classifies Burmese text into seven topics using a fine-tuned Laya checkpoint
laya-decision-lab
KGFCode
Demonstrates Laya text classification, scoring, and probability analysis with an API and MCP service
laya-demo-0921
2045max
Demonstrates Laya decisions for routing, triage, moderation, RAG filtering, and other tasks
laya-demo
nile1801
Demonstrates typed decisions, calibrated probabilities, and multilingual routing with Laya checkpoints
laya-triage
Mezahir2025
Provides a Laya-based message triage API for Make.com
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