Verba/Rapida

Experiments #148f

Grammar mask on the head tail's kept rows: a constrained greedy step draws from `headTailArgmaxMap` with...

done

What was tested

Grammar mask on the head tail's kept rows: a greedy step draws from `headTailArgmaxMap` with the per-step grammar mask mapped through `latin_head_idx` (it already takes a suppression mask), so the full 262,144-wide row is never built (row 148: that draw is 9 of the 10 points a constrained step costs); a Lesto row branch from the best's tag, a unit test against the full-row masked argmax, then constrained `lesto_r148f` against the unconstrained best on 10 sessions, line: residual cost under 3%

Model and setup

the best (constrained requests)

Expected gain

about +9% decode on constrained requests (measured on the unmasked arm), nothing on the unconstrained ledger measure; prerequisite of 148b

Where the idea came from

row 148

Outcome

done 2026-11-13: line missed; the kept-row is the full row's (0 of 5,120 differ, unconstrained replies 60 of 60 identical) but constrained decode -13.40% [-13.83, -13.12] against the best, worse than the full-row path (-10.1%); the full-row draw added back costs 0.85 point, so the step waits on its CPU side (inferred; row 148g)

Lesson

drawing the constrained token from the kept rows gives the right token (0 of 5,120 differ) but did not speed up a constrained step (-13.4% against the full-row path's -10.1%): the slowdown came from how the step is pipelined, not from what it draws (row 148g), so a faster draw cannot help a step whose CPU work is serialized behind the .

Adopted

no (the pre-registered line is a kill line and the subject missed it; row 148g measures why)

Want to see what these experiments produced? Lesto, the Gemma 4 inference engine for Apple silicon Macs, is on lestoengine.com

Made by Federico Andrioli, @fedeandri on X A research lab's own measurements, generated from its files. Data built