Experiments #161
The reserved-token suppression in `applySuppressMask` (`src/generate.zig:574` at best-2026-11-12-r147)...
done
What was tested
The reserved-token suppression in `applySuppressMask` (`src/generate.zig:574` at best-2026-11-12-r147) masks with a float32 `-inf` 0-d array, so `where` widens the A 16-bit number format for model weights; the full-quality baseline here. `[.., 262144]` logits row to float32 before the argmax; its sibling `verifyArgmax` (`generate.zig:622`) already casts through `scalarLike`. Fix: the same `scalarLike` swap; lossless (bf16 to float32 is exact and the argmax reads the same order, so a bit-identity check of the The unit of text a model reads and writes: roughly a short word or a piece of a longer one. decides)
Model and setup
the best
Expected gain
sized from bytes, inferred: about 0.5 MB written and 0.5 MB read extra per row, about 4 us at 273 GB/s, under 0.1% of a 10.5 ms step; reached on batched The writing phase: the model produces the reply one token at a time. Read more (`sampleRowsLazy`, 2 or more users), on draws the head tail does not take and with penalties or logprobs; not on the 1-user greedy step, which takes `headTailTakeToken` first (`generate.zig:2496`)
Where the idea came from
coordinator's float32 sibling check of row 153d step 2b, 2026-11-13 (`2026-11-13-mac-lesto-drafter/README.md` ยง Row 153d step 2b result)
Outcome
done 2026-11-27: landed through the stack, never scored alone; LESTO dd56693 (2026-11-13) builds the suppress mask's -inf in the logits' own dtype where an argmax follows (`applySuppressMaskFor`, `src/generate.zig:702-712` at d1158e56, on by default, `MLX_SERVE_SUPPRESS_MASK_NATIVE_DTYPE_OFF=1` turns it off), in every best tag since best-2026-11-19-r172; sampling, probs and residual callers keep the float32 row (An independent check of the work by a different AI model, to catch mistakes the main one might share with itself. on 3a437610); closed by the coordinator (read-rows)