vLLM gains sleep mode on Apple Silicon: idle model servers now return KV cache memory

abhijithneil · x · 2026-10-21

Abhigith Neil Abraham contributed a sleep mode feature to vLLM's Apple Metal backend, with his walkthrough now featured on the official vLLM Metal site.

The problem: a small model server kept running all day on a Mac holds its KV cache pool even when idle. Under Apple Silicon's unified memory, this competes with other apps and causes swapping.

The fix: launch with --enable-sleep-mode, then call sleep() to return KV cache memory to the system and wakeup() to reclaim it in a fraction of a second. The post explains vLLM's block-based KV pool, why idle engines hold useless prefix cache, and how weights are retained while cache is released.

Original post →

More from coding & agent

coding & agent channel →