Verba/Rapida

Esperimenti #174

The init error exits leak MLX arrays (a defect in our own engine, error path only)...

done

Il testo degli esperimenti resta in inglese, come l'ha scritto il laboratorio.

Cosa è stato provato

The init error exits leak MLX arrays (a defect in our own engine, error path only): `Generator.initWithOptions` frees the logits only after `firstTokenLogprobs` returns, so a failure there leaks them on the server path (`src/generate.zig` at tag best-2026-11-19-stk2: 2236) and leaks them with the pre-built `next_logits` on the regular path (2291); free both on every error exit of the two branches (errdefer), with a unit test that injects the failure (mlx.zig's test fault hooks) and checks no array is left; lossless by construction, no pair; rides with 159z in the next stack

Modello e configurazione

the best

Guadagno atteso

none on speed: a leak removed on a failed request (**measured** by the test only)

Da dove viene l'idea

row 159z step 1 (Noticed), coordinator 2026-11-19

Esito

done 2026-11-20: adopted via row 173es (ledger lesto_r173e, LESTO row/173es 79ae5615 carries stk3); test r174 passed in diag174fb, stk3's identity count proved the success path; earlier: built 2026-11-19: LESTO `row/174` b7bd589e (errdefers in both tails; test r174 sweeps every checked op of the tails outside the forward, both paths, logprobs on; 5 rounds, the last clean); test passed 2026-11-19 in diag174fb (row/174f's build, which contains it: 14 server-path and 175 regular-path faults, each returned its error with active bytes unchanged); rides in stk3, whose identity count proves the success path

Lezione

an init tail that frees its outputs only after the last checked op leaks them on every earlier error; a fault armed at each checked op in turn, with settled active bytes as the oracle, finds every such exit on both paths (14 server, 175 regular) without a model or a pair.

Adottato

yes (via row 173es: ledger row lesto_r173e, LESTO row/173es 79ae5615 carries stk3, whose identity count proved the success path; coordinator 2026-11-20)

Vuoi vedere cosa hanno prodotto questi esperimenti? Lesto, il motore di inferenza per Gemma 4 sui Mac con Apple silicon, è su lestoengine.com

Creato da Federico Andrioli, @fedeandri su X Le misure di un laboratorio di ricerca, ricavate direttamente dai suoi file. Dati aggiornati al