Files
ollama/x
Jesse Gross b68b112bd8 mlxrunner: release the buffers weight loading leaves in the MLX pool
Loading a model can transform tensors after reading them: qwen3.5 models
pack their linear-attention projections into one layout, and MoE models
fuse the gate and up expert stacks. The buffers those transforms consume
go back to MLX's allocator pool rather than to the system, and nothing
releases the pool until the first request finishes. On qwen3.8:27b-mlx
that is 2.15 GiB held idle on top of 16.9 GiB of weights, counted in the
runner's reported memory the whole time.

Clear the pool once the weights are evaluated. Models whose tensors load
unchanged, such as gemma4, leave nothing in the pool and are unaffected.
2026-09-10 17:25:34 -07:00
..
2026-07-03 18:30:45 -07:00
2026-07-03 18:30:45 -07:00