laya
A multilingual decision model library that makes choice, score and yes/no decisions over text in a single fast pass. It also includes a router that picks the right model per request, for classification and routing tasks.
Share on XLicense: Apache-2.0
Overview
Laya is a Python library for making typed decisions over text in a single forward pass, without generating tokens. It answers choice, score and yes/no questions in more than 100 languages, and the README quotes about 33 ms per request. A router picks the right checkpoint for each request, such as English or multilingual. You pass a piece of text and a set of questions, and get answers with probabilities. It installs with pip and has optional extras for an HTTP server, MCP, LangChain, LlamaIndex, CrewAI and ONNX.
Key features
- Choice, score and yes/no decisions in one forward pass
- Works across 100+ languages
- Router selects the checkpoint per request
- Optional extras: HTTP server, MCP, LangChain, LlamaIndex, CrewAI
- TypeScript version in laya-ts
Best for
Developers building classification or routing steps, such as sending a support message to a department. Long documents need max_len set to 8192, and the README advises checking accuracy on your own data.
- Upstream
- NandhaKishorM/laya
- Fork on GitHub
- Guo-astro/laya
- Upstream stars
- 31k
- Category
- AI agents and LLM tools
- Language
- Python
- License
- Apache-2.0
- Forked
- 2026-09-22
- Sync status
- In syncLast synced 2026-10-10
More in AI agents and LLM tools
An open-source curriculum for learning AI engineering by implementing model internals, retrieval pipelines, and agent runtimes. Study through lessons, interactive labs, or staged coding projects, and inspect the code and evaluation results.
Forked 2026-10-09Last synced 2026-10-10License: MITAI agents and LLM toolsGitHub
A small, hackable character-level language model that learns patterns from line-based text files and generates similar items, such as name ideas.
Forked 2026-10-09Last synced 2026-10-10License: MITAI agents and LLM toolsGitHub
uzu is an inference engine for running AI models in apps, helping developers keep inference on-device instead of relying on remote services. Use it to download a model and build chat features.
Forked 2026-10-09Last synced 2026-10-10License: MITAI agents and LLM toolsGitHub
Anti Slop gives AI coding agents rules to avoid generic UI, filler text, and AI-shaped code. Use it as a filter alongside your own design direction.
Forked 2026-10-08Last synced 2026-10-10License: MITAI agents and LLM toolsGitHub