# nandhakishorm/laya

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/nandhakishorm-laya).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

35,180 stars · 3,148 forks · Python · Apache-2.0

## Links

- GitHub: https://github.com/NandhaKishorM/laya
- Homepage: https://huggingface.co/convaiinnovations/laya
- awesome-repositories: https://awesome-repositories.com/repository/nandhakishorm-laya.md

## Topics

`calibration` `classification` `decision-model` `huggingface` `jev` `modernbert` `multilingual` `nlp` `python` `pytorch` `routing` `typed-decisions` `zero-shot`

## Description

Laya, also referred to in its docs as Decision Router, is a text decision engine that answers typed choice, score, and yes/no questions about text in a single forward pass rather than generating tokens. Each answer comes back with probabilities and a confidence value. It reads text in more than one hundred languages without translating first, and it routes each request to a matching model checkpoint based on detected script, language, and workflow. Checkpoints load lazily and the least recently used one is evicted.

Several capabilities set it apart. Answers can be shaped by a JSON schema or typed data model, so enums, booleans, and bounded integers come back as typed values with per-field confidence. Low-confidence answers can be flagged for review through opt-in abstention thresholds. Large option sets are handled with shortlist narrowing and tournament selection, and long text is scanned in overlapping windows. Lifecycle hooks let callers observe, redact, rewrite, or cache around each decision. Integrations cover LangChain graph edges, guardrails and triage, plus tools exposed over MCP for editors and assistants.

Beyond the core engine, the project includes a self-hosted HTTP server with single and batch prediction endpoints, bearer-key authentication, a browser playground, and health reporting. It supports NVIDIA GPU deployment and offline container builds with baked-in checkpoints. Lightweight Python and JavaScript clients and a command-line interface call it remotely or locally. Other areas include selectable inference backends, ONNX export, and ready-made question sets for moderation and email or ticket triage. Training tools cover fine-tuning and head fitting on labelled data. Evaluation tools cover calibration metrics, benchmarking, and baseline and per-slice quality gates that fail on regressions. Images, audio, and video can pass through the same decision interface.

## Tags

### Artificial Intelligence & ML

- [Non-Autoregressive Decision Engines](https://awesome-repositories.com/f/artificial-intelligence-ml/non-autoregressive-decision-engines.md) — Answers typed choice, score, and yes/no questions about text in one forward pass, returning probabilities and confidence instead of generated tokens.
- [Typed-Question Text Classification](https://awesome-repositories.com/f/artificial-intelligence-ml/typed-question-text-classification.md) — Answers typed choice, score and yes/no questions about text in a single forward pass, returning probabilities and a confidence value per answer. ([source](https://github.com/NandhaKishorM/laya/blob/main/sdk/python/README.md))
- [Decision Confidence Reporting](https://awesome-repositories.com/f/artificial-intelligence-ml/decision-confidence-reporting.md) — Returns per-field answers with probability distributions, confidence scores, raw answers, token usage and routing details so callers can judge reliability and flag uncertain cases. ([source](https://github.com/NandhaKishorM/laya/blob/main/docs/structured.md))
- [Non-Autoregressive Decoders](https://awesome-repositories.com/f/artificial-intelligence-ml/decoder-architectures/non-autoregressive-decoders.md) — Answers typed choice, score, and yes/no questions in one forward pass instead of generating tokens, returning probabilities and confidence.
- [Agent Routing Components](https://awesome-repositories.com/f/artificial-intelligence-ml/langchain-guardrail-integrations/agent-routing-components.md) — Routes LangChain graph edges, screens prompts, and triages tickets quickly, with tools exposed over MCP, instead of waiting on a generative model.
- [Model Checkpoint Routers](https://awesome-repositories.com/f/artificial-intelligence-ml/model-checkpoint-routers.md) — Detects script, language, and workflow per request, picks a matching checkpoint through ordered rules, and attaches the routing reason to each result.
- [Checkpoint Routers](https://awesome-repositories.com/f/artificial-intelligence-ml/model-checkpoints/checkpoint-routers.md) — Detects script, language, and workflow per request, picks the matching checkpoint, loads it lazily, and evicts the least recently used.
- [Checkpoint Routing Rules](https://awesome-repositories.com/f/artificial-intelligence-ml/model-checkpoints/checkpoint-routing-rules.md) — Chooses a checkpoint per request using ordered rules over model, task, language, and detection, and explains the choice in routing metadata. ([source](https://nandhakishorm.github.io/laya/routing/))
- [Multilingual Text Decisions](https://awesome-repositories.com/f/artificial-intelligence-ml/multilingual-text-decisions.md) — Reads and reasons over text in more than one hundred languages in one decision pipeline without translating first. ([source](https://nandhakishorm.github.io/laya/))
- [Option and Label Selection](https://awesome-repositories.com/f/artificial-intelligence-ml/option-and-label-selection.md) — Selects the best answer from a closed set of described options in one forward pass, returning the winner and the full probability distribution. ([source](https://nandhakishorm.github.io/laya/))
- [Text Classification](https://awesome-repositories.com/f/artificial-intelligence-ml/text-classification.md) — Sorts messages, tickets, and emails into labels, urgency levels, or yes/no verdicts in a single quick pass without token generation.
- [Typed Structured Decisions](https://awesome-repositories.com/f/artificial-intelligence-ml/typed-structured-decisions.md) — Turns a schema of enums, booleans, and bounded numbers into schema-shaped answers with per-field confidence so code never parses generated text.
- [Agentic Workflow Graphs](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-workflow-graphs.md) — Chooses the next step in an agent graph or routes prompts to small or large models using fast classification instead of generated reasoning.
- [Edge Routers](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-workflow-graphs/edge-routers.md) — Picks the next node in an agent workflow by classifying state against named criteria in one pass, with low-confidence cases sent to a fallback branch. ([source](https://github.com/NandhaKishorM/laya/blob/main/docs/langchain.md))
- [Email Triage](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-assistants/email-triage.md) — Applies ready-made question sets to flag phishing, spam, urgency, intent, refund requests and churn risk in emails and support tickets in one pass. ([source](https://github.com/NandhaKishorM/laya/blob/main/examples/README.md))
- [Batch Prediction Processing](https://awesome-repositories.com/f/artificial-intelligence-ml/batch-prediction-processing.md) — Scores many independent inputs against one shared question set in a single request, returning ordered per-item results with combined token usage. ([source](https://github.com/NandhaKishorM/laya/blob/main/docs/typescript-sdk.md))
- [Calibrated Decision Servers](https://awesome-repositories.com/f/artificial-intelligence-ml/calibrated-decision-servers.md) — Serves single and batch prediction endpoints over HTTP with calibrated confidence, abstention on uncertain answers, and bearer-key authentication.
- [Decision Calibration](https://awesome-repositories.com/f/artificial-intelligence-ml/decision-calibration.md) — Reports calibration error, Brier score, risk-coverage area, and selective accuracy at fixed coverage points to show whether confidence separates right from wrong. ([source](https://github.com/NandhaKishorM/laya/blob/main/docs/evals.md))
- [Document Language Detection](https://awesome-repositories.com/f/artificial-intelligence-ml/document-language-detection.md) — Detects the script and language of text, dict, and list values in under a millisecond to choose a checkpoint, with a configurable default fallback. ([source](https://nandhakishorm.github.io/laya/routing/))
- [Domain Decision Fine-Tuning](https://awesome-repositories.com/f/artificial-intelligence-ml/domain-decision-fine-tuning.md) — Fine-tunes a checkpoint on domain labelled decisions with proper-scoring-rule rewards and calibration temperatures, far exceeding zero-shot accuracy. ([source](https://github.com/nandhakishorm/laya#readme))
- [GPU-Accelerated Inference](https://awesome-repositories.com/f/artificial-intelligence-ml/gpu-accelerated-inference.md) — Speeds up predictions with fused GPU kernels, half-precision weights and captured execution graphs, falling back to the standard path on unsupported devices. ([source](https://github.com/NandhaKishorM/laya/blob/main/BENCHMARKS.md))
- [Head Fitting on Labelled Data](https://awesome-repositories.com/f/artificial-intelligence-ml/head-fitting-on-labelled-data.md) — Trains a small head per question over frozen features from a labelled CSV in seconds, then refits temperature and thresholds. ([source](https://github.com/nandhakishorm/laya#readme))
- [LangChain Guardrail Integrations](https://awesome-repositories.com/f/artificial-intelligence-ml/langchain-guardrail-integrations.md) — Ships ready-made LangChain chain and graph components for routing, guardrails, triage, and evaluation that run batches and accept hooks and routing hints. ([source](https://github.com/nandhakishorm/laya#readme))
- [Context Window Management](https://awesome-repositories.com/f/artificial-intelligence-ml/long-form-text-generation/context-window-management.md) — Splits text longer than the context limit into overlapping windows, scores them together, and aggregates answers per question while reporting the producing window. ([source](https://github.com/nandhakishorm/laya#readme))
- [Low-Confidence Abstention](https://awesome-repositories.com/f/artificial-intelligence-ml/low-confidence-abstention.md) — Flags answers below an opt-in confidence threshold, as a single value or per-bucket values, and reports abstention details while metrics stay on raw predictions. ([source](https://github.com/NandhaKishorM/laya/blob/main/docs/typescript-sdk.md))
- [Model Loading](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-training-and-tuning/data-and-checkpointing/model-loading.md) — Loads checkpoints lazily or on demand, keeps a limited number resident, evicts the least recently used, and supports preloading and explicit unloading. ([source](https://nandhakishorm.github.io/laya/routing/))
- [Multi-Question Single Pass](https://awesome-repositories.com/f/artificial-intelligence-ml/multi-question-single-pass.md) — Combines choice, score and yes/no questions about the same text into one forward pass instead of running separate calls for each. ([source](https://github.com/NandhaKishorM/laya/blob/main/examples/README.md))
- [Probability Calibrations](https://awesome-repositories.com/f/artificial-intelligence-ml/probability-calibrations.md) — Produces a calibrated probability that a statement about a text is true so callers can set their own threshold. ([source](https://github.com/NandhaKishorM/laya/blob/main/examples/README.md))
- [Question Set Presets](https://awesome-repositories.com/f/artificial-intelligence-ml/question-set-presets.md) — Provides ready-made question sets for triage, email sorting, guardrails, moderation and routing, applied to text with customizable email categories. ([source](https://github.com/NandhaKishorM/laya/blob/main/sdk/typescript/README.md))
- [Schema-to-Question Converters](https://awesome-repositories.com/f/artificial-intelligence-ml/schema-to-question-converters.md) — Converts JSON schemas or typed models into fixed-option choice, score, and yes/no questions so answers come back in the schema's own typed shape.
- [Typed Custom Questions](https://awesome-repositories.com/f/artificial-intelligence-ml/typed-custom-questions.md) — Lets users declare choice, score and yes/no questions with instructions and criteria, inferring question IDs and label types for strongly typed answers. ([source](https://github.com/NandhaKishorM/laya/blob/main/sdk/typescript/README.md))
- [Window Scanning and Shortlist Strategies](https://awesome-repositories.com/f/artificial-intelligence-ml/window-scanning-and-shortlist-strategies.md) — Splits oversized text into overlapping windows and narrows large option sets through shortlist or tournament rounds before making the final decision.

### DevOps & Infrastructure

- [Self-Hosted Inference Servers](https://awesome-repositories.com/f/devops-infrastructure/self-hosted-server-platforms/self-hosted-inference-servers.md) — Runs decision inference on private GPU or CPU machines behind an authenticated HTTP server with routing, batching, preloading, and health monitoring. ([source](https://nandhakishorm.github.io/laya/docker/))

### Development Tools & Productivity

- [Tool and Resource Exposures](https://awesome-repositories.com/f/development-tools-productivity/ai-assistant-integrations/mcp-server-integrations/tool-and-resource-exposures.md) — Exposes routing, prediction, batch, shortlist, tournament, and long-text scanning as MCP tools that editors and AI assistants can call. ([source](https://github.com/NandhaKishorM/laya/blob/main/docs/cli-mcp.md))

### Security & Cryptography

- [Content Moderation Question Sets](https://awesome-repositories.com/f/security-cryptography/content-moderation-question-sets.md) — Ships ready-made question sets that detect toxicity, harassment, threats, jailbreaks, prompt injection and sensitive-data leaks in text. ([source](https://github.com/NandhaKishorM/laya/blob/main/examples/README.md))
- [Multilingual and Multimodal Variants](https://awesome-repositories.com/f/security-cryptography/content-moderation/multilingual-and-multimodal-variants.md) — Screens text in many languages for toxicity, prompt injection, jailbreaks, and leaked sensitive data before it reaches costly models or people.
- [Prompt Screening](https://awesome-repositories.com/f/security-cryptography/violation-categorization/prompt-screening.md) — Screens incoming prompts for injections, jailbreaks, policy violations and sensitive data, then raises an error, returns a canned rejection or annotates the state. ([source](https://nandhakishorm.github.io/laya/langchain/))

### Software Engineering & Architecture

- [Decision Lifecycle Hooks](https://awesome-repositories.com/f/software-engineering-architecture/decision-lifecycle-hooks.md) — Runs user callbacks before and after each decision and on routing, model load, eviction, and errors without changing the engine. ([source](https://github.com/NandhaKishorM/laya/blob/main/docs/hooks/index.md))
- [Middleware Lifecycle Hooks](https://awesome-repositories.com/f/software-engineering-architecture/middleware-lifecycle-hooks.md) — Runs user callbacks before, after, and on error around each decision, plus on routing and model load or eviction, with a shared mutable context.
