Local Laya vs Hosted Jev: Why My Agents Make Typed Decisions on My Mac
From As The Geek Learns · 13:12
Show by The Geek
You ask a chat model a yes-or-no question and get back three paragraphs. Then your code has to parse the paragraphs, guess what it meant, and hope the JSON is valid this time. I got tired of that for the small, bounded choices my agents make all day. Here's the model I picked, the one I didn't, and the replay numbers behind the decision.This is my account of one deployment. Whether Laya beats Jev in general is a different question, and I didn't test it.The setupA coding agent makes dozens of small decisions that aren't really language tasks. Which specialist should take this job? Does this alert need a human right now? Which local model can handle this request without blowing the memory budget? Prose is the wrong output type for a bounded question.TypeSafe's Jev is built for exactly this. You hand it a state and a set of predefined questions, and it returns typed answers. A choice picks among named options. A score rates on an ordered scale. A noul returns a probability for a yes-or-no statement. No paragraph to interpret. I liked it immediately.But I had a requirement Jev couldn't meet. I wanted routine decisions running on my Mac Studio, with local data staying local. I also wanted to control the exact model, the permitted options, and what happens when the model is unsure or down. Jev is an early-access hosted service. Laya is an open-weight model with the same kind of typed-decision interface, published with downloadable weights and an Apache 2.0 runtime. For this system, that settled it.What's actually going onBoth models solve the same narrow problem: turn a compact state and a few questions into structured decisions. Neither writes code or reasons through a long investigation. It's a specialist. Your main model keeps its job.Jev's managed API is a good deal on paper. TypeSafe lists $0.042 per million input tokens with no output-token charge and says Jev handles choices with up to 255 options. Hosted also means nobody babysits model files, accelerator compatibility, startup time, or process supervision. That's real work I chose to own.As The Geek Learns is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.Laya's trade-offs run the other way. I downloaded a pinned checkpoint once and serve it over a loopback-only API. Routine decision requests never leave the machine. There's no per-token bill, though the workstation, electricity, storage, and my time still cost money. I didn't calculate a break-even. Privacy and control were the decisive reasons. Cost was a side effect. I have no savings number to give you.The checkpoint, convaiinnovations/laya-typed-decisions, has about 421 million parameters, a ModernBERT-large encoder, and a 1,024-token limit. Its publisher trained it on four synthetic workflows: agent observability, customer service, invoice processing, and security incidents. Model routing isn't one of those, which is a reason to test rather than assume.Here's what makes it different from asking a chat model for JSON. The Laya runtime renders the question, each option, and the state into one token sequence, with a marker before each option. A bidirectional encoder reads the whole thing, a small decision head scores the marker positions, and a softmax turns those scores into a distribution over options. Several questions against one state batch into a single call. There's no autoregressive text output, so there's nothing to parse. The published runtime shows the sequence construction and the head.For a choice, my code gets an option key and a probability for every allowed key. For a score, a distribution over ordered levels plus the expected level. For a noul, the probability of true. The runtime also reports a confidence derived from the distribution's normalized entropy. That confidence is not the probability the downstream task will succeed. I picked thresholds on a separate development set, and I'd want fresh evidence before reusing them on a different model roster.Laya's authors trained with rewards based on proper scoring rules, meant to encourage honest probabilities. The model card still warns it's overconfident and needs domain-specific calibration. A typed answer can be structurally perfect and factually wrong. I treat Laya as a recommender inside a program, never as a source of permission or truth.The fixMy host is a Mac Studio with an M3 Ultra and 256 GB of unified memory. That hardware is part of the result. A smaller machine needs its own memory and latency tests.The original implementation brief got two things wrong. It assumed plain transformers.AutoModel could load Laya's decision model, and that the typed checkpoint lived only in a subfolder of the base model. Neither held. The typed checkpoint is its own repository and AutoModel loads only the encoder shape. The published laya runtime reconstructs the custom decision head, so the loader uses that instead of mistaking a bare encoder for a working decision…
More episodes of As The Geek Learns
More episodes
- StudyDeck vs. Gemini Notebook: learning with local control
- The Uninstall Is Part of the Evaluation
- Can a Subscription Fund a Coding-Model Study? 648 Episodes, $0 API
- Much to Learn, There Always Is
- I Had Files Scattered Across 4 Clouds. So I Built an App with AI to Fix It
- How I Built JDex with Claude AI—A Systems Engineer's Honest Take
- Database Schema Design Mistake That Broke My App
- I Got Tired of Paying for Substack Notes Schedulers, So I Built My Own
- The Ironclad Workflow That Prevents Technical Debt
- Cortex: An Event-Sourced Memory Architecture for AI Coding Assistants
PodSearch is a free, independent podcast search engine. Read about PodSearch, the privacy policy or contact us.