﻿# oMLX: persistent SSD KV caching on Apple Silicon

oMLX retains reusable prefixes on SSD and batches local requests. Read its persistence claim, restart-validation limits and specific measurement conditions.

Author: Retrivium editorial team
Updated: 2026-11-05
Canonical URL: https://retrivium.ai/journal/omlx-apple-silicon-persistent-ssd-kv-cache/
Language: en

A local AI agent often sends much of the same input repeatedly: system instructions, tool descriptions and the beginning of its conversation history accompany each request. Reprocessing long contexts can take noticeable time. [oMLX](https://github.com/jundot/omlx) offers an Apple Silicon inference server built on MLX that retains intermediate model state on SSD. Its documentation says this state can be loaded for matching request prefixes even after a server restart.

The repository uses the [Apache 2.0 license](https://github.com/jundot/omlx/blob/main/LICENSE). Alongside caching, the developers describe continuous batching, shared processing of concurrent requests, and macOS menu-bar management. Documentation reviewed on November 5, 2026 lists Apple Silicon M1–M5, macOS 15 or later and Python 3.11–3.13. A macOS installer image is available; installation details and individual-model compatibility should be checked against the relevant [repository version](https://github.com/jundot/omlx).

The server provides OpenAI- and Anthropic-compatible APIs and an administrative interface, allowing existing clients to connect to local models and browser-based model management. Compatibility of particular features and tool-call templates depends on the model and client. The [oMLX documentation](https://github.com/jundot/omlx) describes supported interfaces and restrictions.

## What is persisted

Before generating a response, a language model processes input tokens during prefill. This computes attention keys and values, the KV cache. Subsequent generation uses them to avoid recomputing the processed history for each new token. When another request starts with the same prefix, its prepared state can be reused and processing continued from the changed portion.

The [oMLX README](https://github.com/jundot/omlx) describes block-based caching, shared matching prefixes and copy-on-write when requests diverge. Storage has two tiers: hot blocks remain in memory; when that tier fills, blocks are stored on SSD in safetensors format. A later matching request can restore them from disk, including after a restart. The SSD-cache directory and hot-cache size are controlled through `--paged-ssd-cache-dir` and `--hot-cache-max-size`.

This is the project's own implementation description, rather than a restart test conducted for this article. Documentation explicitly claims persistence, but independent validation of recovery tests and cross-version or cross-model cache-compatibility rules was not established in this review. Compatibility boundaries are explained in the [persistent KV-cache invalidation guide](/journal/persistent-kv-cache-invalidation/). Check restoration on the intended release for an important workflow, observing cache logs and settings.

Benefits depend on matching the request beginning. If an agent repeatedly sends the same instructions and history, the earlier portion may be reused while added messages still require processing. If the beginning changes or the blocks are absent, more ordinary computation is needed. Caching primarily reduces repeated prefill and first-token waiting; it does not itself promise faster generation of every subsequent token. Nor does disk become fast unified memory: reading and reconstructing blocks costs time, and the active model and state still need memory.

## Handling concurrent requests

Continuous batching addresses a different problem, discussed in the [shared request-processing guide](/journal/continuous-batching/). Instead of finishing one long response before serving the next request, a server can add incoming requests to active processing and remove completed ones. This can use hardware more efficiently during overlapping requests, although queues, available memory and context lengths still affect each client's latency. The [README](https://github.com/jundot/omlx) connects oMLX's implementation to `mlx-lm`'s `BatchGenerator` and lists `--max-concurrent-requests` with a default of 8. A default configuration limit does not promise that eight large requests fit on every Mac or run faster than one.

The combination is useful, for example, to a local service handling several agents: shared instructions can be reused while overlapping calls execute together. It can also help one user with long, repetitive conversations. For short, unrelated requests, storage and retrieval overhead may not pay off. The result depends on model, context size, SSD, available memory and load.

## What the measurements show

In the [0.7.1rc1 release-candidate notes](https://github.com/jundot/omlx/releases/tag/v0.7.1rc1), the authors give a specific optimization example: on M3 Ultra with Qwen3.8-27B and TurboQuant, an SSD-restored prefix followed by 18.8 thousand new tokens had time to first token reduced from 85.4 to 57.8 seconds, approximately 32%. The baseline is code immediately preceding the relevant change. This is a developer measurement for one optimization and scenario; it does not mean every SSD cache provides that percentage improvement over no caching. The machine's memory capacity and complete measurement protocol are not specified in the accessible description.

A user [reported in a project discussion](https://github.com/jundot/omlx/discussions/2190) that an M3 Ultra with 512 GB, oMLX 0.5.0 plus an additional SSD-prefix-restoration fix, and GLM-5.2-oQ4e-mtp handled a repeated 147 691-token request with SSD cache in 20–42 seconds rather than approximately 23 minutes. This is a user report rather than a measurement verified for this article, and it does not prove recovery after restart. It cannot be transferred to an arbitrary Mac. An independent reproduction specifically testing cache persistence through a restart was not found in the accessible material.

For context, the authors of the separate [vllm-mlx project](https://arxiv.org/abs/2601.19139) studied batching and prefix reuse on an M4 Max with 128 GB unified memory and four-bit models. For Qwen3-4B with a shared 512-token prefix, their experiment measured 245 ms time to first token without caching and 42 ms on a cache hit. This is another server's author result rather than independent verification of oMLX or its disk cache. It illustrates why repeated prefill deserves separate measurement.

To evaluate locally, compare an identical request cold and repeated, then repeat after restarting the server. Record first-token time, subsequent generation speed, memory and SSD-cache use, model, oMLX version and shared-prefix length separately. This establishes whether persistent state helps that application and whether memory limits constrain concurrent requests.

## Sources

- [oMLX repository and documentation](https://github.com/jundot/omlx): developer descriptions of architecture, requirements and settings.
- [Repository Apache 2.0 license](https://github.com/jundot/omlx/blob/main/LICENSE).
- [oMLX 0.7.1rc1 release-candidate notes](https://github.com/jundot/omlx/releases/tag/v0.7.1rc1): developer measurement and conditions.
- [User GLM and SSD-cache report](https://github.com/jundot/omlx/discussions/2190): community participant's observations.
- [vllm-mlx research paper](https://arxiv.org/abs/2601.19139): another Apple Silicon server's author measurements.
