Skip to content

Build1 publisher2 min readPublished

In layaAgent, a 421M encoder that cannot write chooses tools and arguments by multiple choice

layaAgent's 421M-parameter encoder picks tool arguments from extracted spans and gets 71% right on its author's test split. Unsure steps go to a local 1.5B LLM or the user, and any tool that changes data waits for approval whichever system chose it.

The Engineer · Build desk

Illustration accompanying In layaAgent, a 421M encoder that cannot write chooses tools and arguments by multiple choice

What happened

  • layaAgent, an Apache-2.0 browser agent with no server or API key, lets a small encoder make routine decisions and sends unsure steps to a local LLM or the user.
  • Its System 1 model, Laya, is a 421M-parameter ModernBERT-large with a small head from ConvAI Innovations, exported to ONNX and quantized for the browser.
  • Because Laya cannot write, a no-model extractor pulls candidate spans and each tool argument becomes a multiple-choice question over those spans plus NONE.
  • On the author's test split the extractor offered the right span 91% of the time, and Laya's argument choices were right 71% overall and 90% on fixed lists.
  • Any tool that changes something asks the user for approval first, regardless of which system picked it.

Compiled by The EngineerSomething wrong?How this is made

Why it matters

  • constraint About three argument choices in ten are wrong, so an unattended step is only as safe as the gate's ability to hold the unsure ones for System 2.
  • constraint Raw confidence on this checkpoint cannot separate right picks from wrong ones, so anyone reusing Laya needs a separately built and tested gate signal before trusting AUTO steps.
  • cost With no server, System 2's compute lands on the user's GPU, and on a browser without WebGPU the user answers System 2's questions by hand.
  • decision A team copying the design has to check that its tools take arguments found in text or on a fixed list, since anything else falls through NONE to the LLM.

"NONE carries a lot of the design," the author wrote [7]. Laya can pick a wrong span, but it can only choose from the spans the extractor pulled out [5]. For "How tall is that iron tower in Paris?", the right argument is "Eiffel Tower", and that string appears nowhere in the goal [6]. Laya's only honest pick is NONE. The step then waits for System 2, which the author describes as "the only component allowed to write a new value" [6].

The weak spot is the span-picking itself. Fixed-list arguments score 90%, above the 71% overall. So the other arguments, the ones picked from extracted spans, must score below 71% [11].

The gate decides which of those picks run unattended. A step runs automatically only if Laya is sure [13]. The obvious signal is the model's own confidence, 1 minus normalized entropy. The author found it badly compressed on this checkpoint: a 12-option question reads 0.1 to 0.3 even when Laya is right [13]. A threshold on that range cannot separate correct picks from wrong ones. The available text ends partway through that section. It stops before describing the replacement signal, and before the task-suite comparison behind the title's claim that the 421M encoder beat a 1.5B LLM at running the agent [18].

The approval guard does not rely on that gate. The author's complaint about the usual big-model loop is that nothing in its structure stops it from turning a request to delete the user's notes into an action [17]. In layaAgent, System 1 also asks once whether the goal changes something [15]. A miscalibrated confidence score cannot turn that check off.

Auditability is the claim I find best supported. Every Laya decision is a probability for each option, produced in one deterministic forward pass [3]. Its input is bounded too: the goal, the last four steps at one line each, and the last observation, all under a fixed token budget [19]. In the live run of "What's 18% of 2,450?", Laya picked the calculator at p 0.99, took the span from the goal and stopped, with no generative model involved [16]. The worked example is arithmetic, the one task where I would have skipped the LLM anyway.

What to watch

  • The task-suite comparison behind the title: which tasks it covered and how the 421M encoder scored against Qwen2.5-1.5B running the whole loop.
  • The confidence signal that replaces 1 minus normalized entropy in the gate, and what share of steps it sends to HOLD.
  • Argument accuracy on tools outside the post's examples, especially ones whose arguments are IDs or free-form queries.
Loading claim ledger
Loading source directory links
Loading share composer
Loading topic controls
Loading related stories