[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"readme:laya":3},"\u003Cp align=\"center\">\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fraw.githubusercontent.com\u002FNandhaKishorM\u002Flaya\u002Fmain\u002Fassets\u002Flogo-lockup-dark.png\">\u003C\u002Fsource>\n    \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002FNandhaKishorM\u002Flaya\u002Fmain\u002Fassets\u002Flogo-lockup.png\" alt=\"Laya\" width=\"330\" \u002F>\n  \u003C\u002Fpicture>\n\u003C\u002Fp>\u003Cp>\u003Cstrong>Multilingual, non-autoregressive System 1 decision engine.\u003C\u002Fstrong> Typed decisions over 100+ languages in a single forward pass — 33 ms — trained with reinforcement learning against strictly proper scoring rules (RLCD), with a router that picks the right checkpoint per request.\u003C\u002Fp>\n\u003Cdiv align=\"center\">\u003Cp>\u003Ca href=\"https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F15d4Yv__KHeHjshVb-6PRTfqVllxih2S3?usp=sharing\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\" alt=\"Open In Colab\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Flaya\u002F\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Flaya.svg\" alt=\"PyPI version\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fnandhakishorm.github.io\u002Flaya\u002F\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdocs-online-2ea44f\" alt=\"Docs\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fconvaiinnovations\u002Flaya\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Model-convaiinnovations%2Flaya-blue\" alt=\"Hugging Face Model\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fconvaiinnovations\u002Flaya-multilingual\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Model-laya--multilingual-blue\" alt=\"Multilingual\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fconvaiinnovations\u002Flaya-demo\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Space-laya--demo-orange\" alt=\"Hugging Face Space\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fdev.to\u002Fnandakishor_m_6cc0adfde9f\u002Fi-built-non-autoregressive-decision-models-a-year-ago-then-a-frontier-lab-called-it-a-18me\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdev.to-Read%20Article-0A0A0A?logo=devdotto&amp;logoColor=white\" alt=\"Dev.to Article\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fwww.buymeacoffee.com\u002Fnandakishorm\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FBuy%20Me%20A%20Coffee-nandakishorm-FFDD00?logo=buy-me-a-coffee&amp;logoColor=black\" alt=\"Buy Me A Coffee\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fopensource.org\u002Flicenses\u002FApache-2.0\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-Apache%202.0-green.svg\" alt=\"License\" \u002F>\u003C\u002Fa>\u003C\u002Fp>\n\u003C\u002Fdiv>\u003Ch2>Installation\u003C\u002Fh2>\n\u003Cpre>\u003Ccode class=\"language-bash\">python -m pip install laya\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>With \u003Ca href=\"https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002F\" rel=\"nofollow ugc noopener\">uv\u003C\u002Fa>, run \u003Ccode>uv add laya\u003C\u002Fcode> in a uv project or \u003Ccode>uv pip install laya\u003C\u002Fcode> in a virtual environment.\u003C\u002Fp>\n\u003Cp>Python 3.10 or newer. Optional extras: \u003Ccode>laya[serve]\u003C\u002Fcode> (HTTP server), \u003Ccode>laya[mcp]\u003C\u002Fcode> (MCP server), \u003Ccode>laya[langchain]\u003C\u002Fcode> (LangChain and LangGraph), \u003Ccode>laya[llamaindex]\u003C\u002Fcode> (LlamaIndex selectors), \u003Ccode>laya[crewai]\u003C\u002Fcode> (CrewAI routing), \u003Ccode>laya[onnx]\u003C\u002Fcode> (ONNX Runtime), \u003Ccode>laya[fast]\u003C\u002Fcode> (TileLang GPU fast path). Step-by-step setup for each platform, CPU-only or GPU PyTorch builds, and troubleshooting are in \u003Ca href=\"#installation-details\" rel=\"nofollow ugc noopener\">Installation details\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cp>For TypeScript \u002F Node.js \u002F browser, see \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FNandhaKishorM\u002Flaya\u002Fblob\u002FHEAD\u002Flaya-ts\u002F\" rel=\"nofollow ugc noopener\">\u003Ccode>laya-ts\u002F\u003C\u002Fcode>\u003C\u002Fa>. npm releases (\u003Ccode>npm install laya-ts\u003C\u002Fcode>) are published from this repository's \u003Ccode>laya-ts-v*\u003C\u002Fcode> release tags.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Long documents.\u003C\u002Fstrong> \u003Ccode>laya-multilingual\u003C\u002Fcode> reads up to 8,192 tokens with \u003Ccode>max_len=8192\u003C\u002Fcode>. Measured accuracy and time by document length, reproducible with \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FNandhaKishorM\u002Flaya\u002Fblob\u002Fmain\u002Fresearch\u002Fscripts\u002Fbench_long_context.py\" rel=\"nofollow ugc noopener\">\u003Ccode>research\u002Fscripts\u002Fbench_long_context.py\u003C\u002Fcode>\u003C\u002Fa>:\u003C\u002Fp>\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002FNandhaKishorM\u002Flaya\u002Fmain\u002Fassets\u002Flong_context_8192.png\" alt=\"laya-multilingual with max_len=8192: 16 to 18 of 20 requests correct with up to about 4,000 tokens of text before them, more variable beyond\" width=\"100%\" \u002F>\n\u003C\u002Fp>\u003Ch2>Quickstart\u003C\u002Fh2>\n\u003Cblockquote>\n\u003Cp>\u003Cstrong>Long documents: \u003Ccode>laya-multilingual\u003C\u002Fcode> reads up to 8,192 tokens.\u003C\u002Fstrong> It ships with a 1,024-token limit that cuts long documents off, so pass \u003Ccode>max_len=8192\u003C\u002Fcode> for them:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-python\">result = router.predict(long_document, questions, model=\"multilingual\", max_len=8192)\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>In the table above, 16 to 18 of 20 requests were answered correctly with up to about 4,000 tokens of text before them; beyond that results vary (8 to 17 of 20), so check long-document accuracy on your own data. Short inputs give identical answers with \u003Ccode>max_len=8192\u003C\u002Fcode>, and speed follows the input's real length, not the limit: short inputs are unchanged, and a 4,000-token input takes about 1.\u003C\u002Fp>\n\u003C\u002Fblockquote>\n",1790887801867]