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
- 28k
- Category
- AI agents and LLM tools
- Language
- Python
- License
- Apache-2.0
- Forked
- 2026-09-22
- Sync status
- In syncLast synced 2026-09-29
More in AI agents and LLM tools
A free desktop app where children in non-English-speaking countries practice English speaking and listening by talking with an AI companion. It can run locally and offline.
Forked 2026-09-28Last synced 2026-09-29License: MITAI agents and LLM toolsGitHub
An agent skill for Chinese patents. It helps find patentable points, write disclosure documents, explain patents in plain language, follow policy changes and assist with examination replies.
Forked 2026-09-28Last synced 2026-09-29License: MITAI agents and LLM toolsGitHub
A minimal Python library from Hugging Face for building AI agents that write and run code to solve tasks. It lets you set up capable agents in a few lines.
Forked 2026-09-28Last synced 2026-09-29License: Apache-2.0AI agents and LLM toolsGitHub
An open-source benchmark that measures how well AI agents handle realistic legal work. It provides tasks and evaluation for improving legal agents.
Forked 2026-09-28Last synced 2026-09-29License: MITAI agents and LLM toolsGitHub