ollama/x/mlxrunner/cache
Jesse Gross 4e96f4dbf2 cache: stop recurrent conv state from pinning the forward buffer
Keeping the recurrent conv state small was handled unevenly: the committed
live state was recopied on every commit — wasted work on single-token
decode, where the window is already tiny — while boundary states captured as
snapshots could still be plain slices of the forward-sized convolution
buffer. A cached slice pins that whole buffer even though the trie's eviction
accounting only counts the slice's bytes, so recurrent cache memory piled up
across requests and eviction could never reclaim it.

Compact each boundary state to its real size once, where it is produced in
the conv wrapper, so live state and snapshots own only their own bytes and
eviction sees the true cost. Single-token decode leaves the already-tiny
window as a slice.

Fixes #16698
2026-07-14 10:32:04 -07:00
..
cache.go mlxrunner: drive MTP speculation through cache snapshots 2026-06-09 00:39:19 -07:00
cache_test.go mlxrunner: decouple models from attention cache storage layout 2026-04-27 20:04:46 -07:00
kvcache.go mlxrunner: drive MTP speculation through cache snapshots 2026-06-09 00:39:19 -07:00
lazy_test.go mlxrunner: drive MTP speculation through cache snapshots 2026-06-09 00:39:19 -07:00
recurrent.go cache: stop recurrent conv state from pinning the forward buffer 2026-07-14 10:32:04 -07:00
recurrent_test.go nn/recurrent: derive conv boundary states from a single conv pass 2026-07-14 10:32:04 -07:00
rotating.go mlxrunner: drive MTP speculation through cache snapshots 2026-06-09 00:39:19 -07:00
rotating_attention_test.go mlxrunner: drive MTP speculation through cache snapshots 2026-06-09 00:39:19 -07:00
rotating_multiturn_test.go mlxrunner: decouple models from attention cache storage layout 2026-04-27 20:04:46 -07:00
snapshot_capture_test.go mlxrunner: drive MTP speculation through cache snapshots 2026-06-09 00:39:19 -07:00