|
Download README.md from Slothwolf/laya-demo: direct link, hf CLI and curl.
- Browser
- Download file 2.71 kB
-
https://huggingface.co/spaces/Slothwolf/laya-demo/resolve/main/README.md
- Command line
-
hf download hf://spaces/Slothwolf/laya-demo/README.md
-
curl -L -o README.md https://huggingface.co/spaces/Slothwolf/laya-demo/resolve/main/README.md
2.71 kB
| title: Laya Demo | |
| emoji: 🎯 | |
| colorFrom: indigo | |
| colorTo: blue | |
| sdk: gradio | |
| app_file: app.py | |
| pinned: false | |
| license: apache-2.0 | |
| short_description: Fast System 1 decisions with calibrated probabilities | |
| # Laya Demo | |
| Laya is a fast System 1 decision engine: send a **state** and **typed questions**, get typed answers with probabilities and a | |
| confidence score. It never generates text, so there is nothing to parse and nothing to hallucinate. | |
| | type | question | answer | | |
| |---|---|---| | |
| | `choice` | which of these options? | the option, a probability per option, confidence | | |
| | `score` | where on this rubric? | a position along your levels, probabilities, confidence | | |
| | `noul` | is this true? | the probability that it is | | |
| The tabs are the patterns people use most: support triage, email and phishing, LLM guardrails, RAG passage filtering, | |
| moderation, model routing, and a free-form playground. Every tab asks all of its questions in one pass and then decides | |
| what to do with plain code: the thresholds live in the app, not in the model. | |
| ## Multilingual routing | |
| The **Multilingual routing** tab runs `laya.Router`: the script of the incoming text decides | |
| which checkpoint answers, *before* the forward pass. | |
| | checkpoint | best at | | |
| |---|---| | |
| | [`laya`](https://huggingface.co/convaiinnovations/laya) | English | | |
| | [`laya-multilingual`](https://huggingface.co/convaiinnovations/laya-multilingual) | 100+ languages, ~2x faster | | |
| | [`laya-typed-decisions`](https://huggingface.co/convaiinnovations/laya-typed-decisions) | the typed-decisions workflows | | |
| Routing is decided up front because the model's own confidence gives no warning when it cannot | |
| read the input. Across 51 languages on MASSIVE intent (20 options, random = 0.050) the English | |
| checkpoint macro-averages **0.227** and clears 3x random on **23 of 51** languages, while | |
| reporting 0.89-0.99 confidence throughout — on Khmer it scores **0.000 accuracy at 0.952 | |
| confidence**. The multilingual checkpoint reaches **0.366** and clears 3x random on **45 of 51**. | |
| ```python | |
| from laya import Router | |
| router = Router() | |
| router.predict({"body": "I was charged twice"}, questions) # -> laya | |
| router.predict({"body": "मुझसे दो बार शुल्क लिया गया"}, questions) # -> laya-multilingual | |
| ``` | |
| **This is a preview checkpoint** (421M parameters, trained with pure reinforcement learning against proper scoring rules on | |
| public datasets). It is strong on routing, classification, moderation and guardrails, weaker on rubric scores, and it saw | |
| no email data, so treat the email tab as generalisation rather than a trained skill. | |
| Built by [Convai Innovations](https://huggingface.co/convaiinnovations). | |