{"slug": "laya-a-decision-making-system-one-model", "title": "Laya a decision making system one model.", "summary": "A developer built an order risk detector on Laya, an open-source non-autoregressive decision model based on ModernBERT, to test whether a small specialized model can replace large generative LLMs for e-commerce fraud detection. The developer found that asking the model directly for an APPROVE/REVIEW/HOLD business decision caused it to hold all orders, so the pipeline was changed to have Laya output a fraud risk score that the application maps to actions (under 30 approve, 30-70 review, over 70 hold). Raw field names such as \"failed_payment_attempts: 0\" triggered semantic bias toward risk, while natural-language phrasing improved results; latency was about 5 seconds on a laptop, under a second on a T4 GPU, and roughly 4 seconds per request on a 2 vCore, 4 GB VPS.", "body_md": "JEV is the new hot topic in the tech community from last week. So I decided to spend the weekend testing Laya (open-source alternative to JEV) for E-Commerce Fraud Detection. Here’s what I learned... (Laya can be run locally on your device)\n\nMost AI projects nowadays use generative LLM models like GPT or Claude for almost every task. Which can be a huge overhead and costly for simpler and quick tasks.\n\nFor simple decision-making tasks like fraud detection, support systems, validation we don't always need a huge LLM. We need something fast and consistent for decisions.\n\nThat’s where Jev/Laya comes in.\n\nJev/Laya is a decision model built on ModernBERT. JEV/Laya is a non-autoregressive System One decision model. Instead of generating text like a chatbot, it takes structured information and gives answers as scores, choices or nouls.\n\nTo understand and test it, I built a small Order Risk Detector.\n\nHere are the takeaways after doing this small project\n\nAt first, I asked Laya:\n\n\"Should we APPROVE/REVIEW/HOLD this order?\"\n\nIt wanted to HOLD all orders even when the orders looked completely normal.\n\nThe problem was that \"Approve/Review/Hold\" is a business decision. Every e-commerce company can have its own rules for this. Like a company selling very expensive items can be more cautious. Whereas a small company can ignore some indicators and approve orders easily.\n\nSo I changed the approach:\n\nThe model estimates the fraud risk and our application decides what to do.\n\nFor example:\n\nif Risk < 30 → Approve\n\nRisk 30–70 → Review\n\nRisk > 70 → Hold\n\nI also found something interesting. When we gave the model raw data like `failed_payment_attempts: 0`\n\nthe model focused on the word \"failed\" and treated it as a risk signal. It's a classic semantic bias issue also on LLM's.\n\nSo I changed it to a more natural one\n\n\"Customer has a clean payment history with 0 failed attempts.\"\n\nor you can also use \"all_payment_attempts: successful\"\n\nThis gave much better results.\n\nWe also tested how fast Laya runs on different hardware.\n\nOn my potato laptop, one request took around 5+ seconds.\n\nOn a T4 GPU(Used from Colab), the response dropped to less than a second. This is the actual power of these kinds of models.\n\nAfter testing, I moved the Laya-serve backend to my own VPS server, so the model is now running on my own server with 2 vCore and 4 GB Ram. Each request takes 4s on average.\n\nThe experts are also predicting that the industry is shifting towards specialized models and task specific tools.\n\nCheck out the project here:\n\nGithub: [https://github.com/Shariful-Islam-Sourav/order-risk-management-laya](https://github.com/Shariful-Islam-Sourav/order-risk-management-laya)\n\nSite: [https://order-risk.netlify.app/](https://order-risk.netlify.app/)", "url": "https://wpnews.pro/news/laya-a-decision-making-system-one-model", "canonical_source": "https://dev.to/sharifulislamsourav/laya-a-decision-making-system-one-model-41fb", "published_at": "2026-09-26 20:11:44+00:00", "updated_at": "2026-09-26 21:01:04.935051+00:00", "lang": "en", "topics": ["machine-learning", "ai-tools", "natural-language-processing", "ai-products"], "entities": ["Laya", "ModernBERT", "JEV", "GitHub", "Google Colab", "Shariful-Islam-Sourav"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/laya-a-decision-making-system-one-model", "markdown": "https://wpnews.pro/news/laya-a-decision-making-system-one-model.md", "text": "https://wpnews.pro/news/laya-a-decision-making-system-one-model.txt", "jsonld": "https://wpnews.pro/news/laya-a-decision-making-system-one-model.jsonld"}}