Skip to content

v0.20.1

Choose a tag to compare

@ohdearquant ohdearquant released this 03 Dec 06:39
· 6 commits to main since this release
ee8cc90

lattice v0.20.1

Date: 2026-12-02
Previous: v0.20.0

Upgrading from 0.20.0

No public item is removed or changed in signature. One change gives different numbers on some inputs: the scalar
decode attention softmax described under Changed outputs.

Changelog

Changed outputs

  • Scalar decode attention softmax. decode_attention, on targets where it does not take the NEON path, gives a
    -inf score weight exactly 0.0 and leaves it out of the running maximum and sum. A row whose first score was
    -inf had a NaN sum before, and every weight in that row was set to zero. (#3075)

Performance

  • f16 prompt prefill in lattice-model-qwen35. The prompt steps of the f16 CPU forward pass no longer compute
    the vocabulary logits, which only the last step needs, and matmul_bt_f16 on macOS converts each weight tile from
    f16 in bulk. On an Apple M4 with Qwen3.5-0.8B, the decoder prefill and pooling of a 448x448 image embedding fell
    from 84.9 s to 9.5 s (median of 5 calls), and the whole CPU embedding from 118.5 s to 43.2 s, with the embedding
    unchanged (cosine 1.000000). Greedy text generation of 20 tokens from a 49-token prompt fell from 29.1 s to 4.8 s
    with the same token ids.
    (#3115)
  • Q8_0 matrix-vector product on x86_64. matmul_q8_neon and matmul_q8_neon_into use an AVX2 kernel when the
    CPU reports AVX2 at run time, and the scalar kernel otherwise.
    (#3113)

Added

  • External rows for EmbeddingGemma 2. EmbeddingGemma2Model::encode_rows_at_widths and, on macOS with
    metal-gpu, encode_rows_at_widths_metal encode token ids in which listed positions carry rows computed outside
    the model, such as the soft tokens of another modality, and return one embedding per requested width.
    (#2844)