← 返回总览

NandhaKishorM/laya

Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.

★ 22,955Fork: 1,972语言: Python协议: Apache-2.0GitHub ↗

Star 增长趋势(本站收录历史)

06K11K17K23K09-2409-25NandhaKishorM/laya 2026-09-24: 20KNandhaKishorM/laya 2026-09-25: 23K
NandhaKishorM/laya

深度介绍

它是什么

Laya 是一个非自回归的「System 1」决策引擎。它不做生成,而是对任意文本做类型化判断:多选、打分、是/否,一次前向传播出结果。

核心亮点

  • 单次前向:不逐 token 解码,延迟远低于生成式方案
  • 类型化决策:choice / score / yes-no 三类输出,直接可编程消费
  • 100+ 语言:基于 ModernBERT 的多语言底座
  • 智能路由:按请求自动挑选最合适的 checkpoint,无需手动切换

为什么火

LLM 做分类既慢又贵,还容易被 prompt 格式带偏。Laya 把「决策」从生成任务里拆出来,用非自回归架构换回速度与稳定性,同时保留零样本能力。对需要高吞吐判断的工程场景,这是更务实的抽象。

适合谁用

内容审核、意图路由、RAG 重排、标注预筛、Agent 的快速分支判断——任何「用自然语言问一个是非题」的流水线。

快速上手

pip install laya
from laya import decide
decide("这条评论是否含攻击性?", text, type="yes_no")

Apache-2.0,可直接商用。

NandhaKishorM/laya - AI 第一线