HMDeveloper
All articles
benchmark
benchmarkmodelslocal-ai

Laya, JEV and Clef against my rules: a decision benchmark

Three models that pick a label and return probabilities, tested on two real jobs of mine. The small fine-tune won where it was trained, the 27B won where nobody trained anything, and on PR effort plain rules beat them all.

A decision model (a program that chooses between options) takes context (the information it needs) and a list of options. It picks one and returns probabilities (chances in numbers). I use this for two jobs: finding the intent of a spoken phrase for Home Assistant, and estimating the effort of a PR (a request to review code changes). On October 26 and 27, I measured three candidates and a small baseline against what I already had running.

The candidates:

PR effort: the rules win

I used 67 real cases from the shadow log (a test record where the model does not change the decision). Each case produced two decisions, for 134 in total. Rules without a model got 99.3%.

Accuracy on the effort decision (134 decisions)

Same 67 real cases, two heads each. Deterministic floors are rules with no model.

Show data
Deterministic floors99.3%
Clef (27B, cloud)96.3%
Laya (typed decisions)92.5%
Majority class66.4%
Laya base, no fine-tune15.7%

Clef in the cloud got 96.3%. Its p50 (median time) was 557 ms. Brier at 0.095 and ECE at 0.12 are two measures of probability quality. Laya got 92.5% in 26 ms, but had a Brier of 0.34 and ECE of 0.35. It gets many answers right, but its probabilities do not reflect that certainty well. Its mean maximum probability was 0.58. Base Laya, without the fine-tune, got 15.7%, below even choosing the most common class (66.4%).

p50 latency on the effort decision

Laya local (Ollama, bf16) against Clef in the cloud.

Show data
Laya26 ms
Clef (cloud)557 ms

Laya gave the same numbers on Ollama (bf16, a 16-bit number format, 26 ms) and on Python with MPS (30 ms, 2.8 GB RSS, the memory used by the process, and 21 s to load).

To decide where to place each model in the router, I compared 36 synthetic tasks (made for the test). Clef in the cloud and Clef local both got 83% of effort estimates right. They took 580 ms and 3.3 s. JEV got 69% in 1.5 s. tev1:4b got 47% in 350 ms. My conclusion: JEV does not help with routing. Clef local is not worth it either. It had the same accuracy, took about 6 times longer, and uses 18 GB on a machine already under memory pressure.

Effort accuracy in router placement (36 synthetic tasks)

Clef cloud and local tie at 83%; the difference is latency and memory.

Show data
Clef (cloud)83%
Clef (local)83%
JEV69%
tev1:4b47%

Home intent: the fine-tune wins where it was trained

Here the test used two sets: 44 probe rows (questions written by hand) plus 258 held-out rows (data kept separate for testing). I measured accuracy, wrong actions among those executed at p >= 0.70 (a probability of at least 0.70), and p50.

Home intent accuracy (44-row probe + 258 held-out)

Held-out is Laya's own distribution, so it favors Laya.

Show data
Laya98.0%
JEV81.5%
tev1:4b66.9%

On the 44-row probe, Laya got 41, JEV got 34, and tev1 got 28. The held-out data comes from Laya's own distribution, so it favors Laya. Even so, the gap appears on the hand-written probe.

Ollama's /v1/systemone endpoint limits each choice to 26 candidates. The house has 77 labels (names for the options). So tev1, which uses the same endpoint, needed five calls to compare them. JEV evaluated all 77 in one call. Clef was left out of this test. On October 21, I had already decided to keep it out of the house.

What I decided

Laya stays the only decision model in the home assistant. Clef runs in shadow (it logs suggestions without changing the result) for PR effort estimates. The rules stay in charge because they already decide 99.3% of these cases correctly.

The shadow record has to store which model I requested. The response's model field drops the -cloud suffix. Without the request, you cannot tell cloud from local.

I help teams use AI agents in their everyday software work. If your team is doing that, let's talk.

See consulting