mirror of
https://github.com/ollama/ollama.git
synced 2026-11-12 03:46:14 -06:00
* mlx: compact restored recurrent state after speculative rollback Per-token recurrent captures can leave a restored state pointing into a larger buffer. If a request ends before another model step, the live cache retains that buffer even though it accounts for only the selected state. Track when a restored state may share that backing buffer. At request close, compact marked states in one batch before retaining them in the prefix cache. Clear the marker when a normal model step replaces the state, and cover restoration and buffer detachment in tests. * address comments