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

ai-second-brain-lab

dante01yoon

Combines an Obsidian knowledge workflow, coding-assistant hooks, local Laya classification, and a 3D Markdown viewer

0·GitHub repo

decision-model-arena

sathik11

Compares Jev, Laya, and Microsoft Foundry for typed decisions in enterprise incident triage

0·GitHub repo

stf-sim

JonRoosevelt

Simulates Brazilian Supreme Court cases using local Laya decisions, retrieval and bias probes

0·GitHub repo

zhiyan

liuqing0224

Provides macOS chat assistance with local Laya analysis and generated reply suggestions

0·GitHub repo

d3code-calibration

gkastanis

Compares Jev and open-weights Laya probability calibration against human ratings

0·GitHub repo

laya

airen3339

A Python package and model router for multilingual typed decisions in a single forward pass

0·GitHub repo

laya

wenli03

Provides multilingual typed-decision checkpoints and a router for single-pass inference

0·GitHub repo

Laya

jersonboydmilan

Provides a multilingual typed-decision engine with checkpoint routing and Python interfaces

0·GitHub repo

laya

Shawny-W

Provides multilingual typed-decision scripts using Laya checkpoints and automatic language routing

0·GitHub repo

LayaVoiceCommand

stefanus-ai-tech

Recognizes Indonesian voice commands by transcribing audio and classifying commands with Laya

0·GitHub repo

classifier-laya

josecruset

A local browser interface for testing Laya-MLX typed-decision models on Apple Silicon

0·GitHub repo

jev-vs-laya

Cognition-Forge

Compares Jev and Laya variants across typed-decision tasks

0·GitHub repo

laya_demo

bigcoke1

Demonstrates Laya typed decisions in an inbox triage workflow

0·GitHub repo

LAYA_DEMO

davidL-zhan

Matches exam questions to knowledge points with local Laya yes-or-no predictions

0·GitHub repo

Laya-Firehose

AdityaRawat00189

Ingests incoming data, classifies it with Laya, and routes items by urgency

0·GitHub repo

laya-testing

hypen-code

Demonstrates CPU-based Laya classification in an interactive terminal program

0·GitHub repo

Laya-Finetune

zamax14

Fine-tunes and evaluates multilingual Laya for support-ticket classification

0·GitHub repo

laya-top

bsisduck

Monitors local processes with explainable tags and optional Laya inference

0·GitHub repo

laya-finetuning

sothi-em

Fine-tunes Laya for key-value match detection using the KVP-10K dataset

0·GitHub repo

laya_bio

maris205

Adapts the Laya encoder into a shared candidate-scoring model for biological sequence tasks

0·GitHub repo

zabbix-laya

j3udiel

A local web lab evaluates fictional Zabbix alerts with Laya and lets users download test results

0·GitHub repo

laya_demo

itsvrushabh

Demonstrates and benchmarks Laya’s typed decision engine across interactive use cases

0·GitHub repo

laya-lk-bench

mithilyr

Stress-tests Laya decision-model performance on Sinhala and Tamil offensive-language data

0·GitHub repo

reflex-guard

NISH1001

Implements multi-label guardrails that score context against categories using Laya decision models

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