mx.set_wired_limit — returns the previous limit. Models close to the
working-set ceiling decode ~4x slower without this (Metal evicts and
re-faults weight buffers every token; mlx-lm's wired_limit context
is the reference behavior). MUST be scoped (set → generate →
synchronize → restore), never process-permanent: a permanent limit
pins buffers across idle periods and OOM-kills multi-model processes
(the test suite) via uncatchable async GPU errors.
mx.set_wired_limit — returns the previous limit. Models close to the working-set ceiling decode ~4x slower without this (Metal evicts and re-faults weight buffers every token; mlx-lm's wired_limit context is the reference behavior). MUST be scoped (set → generate → synchronize → restore), never process-permanent: a permanent limit pins buffers across idle periods and OOM-kills multi-model processes (the test suite) via uncatchable async GPU errors.