oMLX: Turn Your Mac into a Local LLM Server with AI Agent Responses 18x Faster

oMLX turns your Mac into a local LLM server, making AI agent responses up to 18x faster.
oMLX is an open-source native Swift tool that transforms any Apple Silicon Mac into a local LLM inference server. Using continuous batching and tiered RAM+SSD KV caching built on Apple's MLX framework, it cuts AI agent response times from ~90 seconds to ~5 seconds. It supports text, vision, OCR, embedding, and reranker models, with OpenAI and Anthropic compatible APIs for seamless integration with tools like Claude Code and Cursor.
When AI Agent Wait Times Drop from 90 Seconds to 5
One of the most frustrating experiences when using AI coding assistants like Claude Code or Cursor is the agonizing wait. Every code completion, every conversation turn can come with delays of tens of seconds, breaking developers' train of thought and disrupting their flow. An open-source tool called oMLX aims to solve this problem at its root — claiming to compress AI agent wait times from roughly 90 seconds down to about 5 seconds, a speedup of nearly 18x.
The core idea behind oMLX is straightforward: turn your Mac into a full-fledged local LLM inference server. It sits in your menu bar and runs without any complex command-line operations. On Product Hunt, the product garnered 71 upvotes and landed on the trending list in the open-source and developer tools categories.
The "MLX" in oMLX comes from the machine learning framework of the same name that Apple open-sourced in late 2023. MLX is purpose-built for Apple Silicon chips, fully leveraging their Unified Memory Architecture — where CPU, GPU, and Neural Engine share the same physical memory pool, eliminating the need to copy data between different processors. This hardware characteristic is critical for large model inference, since the primary bottleneck for LLMs is often not compute speed but memory bandwidth and data movement. MLX tensor operations can seamlessly switch between CPU and GPU, with support for lazy evaluation that defers computation until actually needed. Compared to running PyTorch or TensorFlow on Mac through the MPS backend, MLX's native optimization delivers lower overhead and higher inference efficiency. oMLX is built on top of this framework, engineering it into a ready-to-use product for developers.

Beyond Text: Full Multimodal Local Inference
oMLX isn't limited to text generation alone. It supports a full suite of model types covering the key components of modern AI application workflows:
- Text Models: Handle standard conversational and generation tasks
- Vision Models: Support image understanding
- OCR Models: Text recognition
- Embedding Models: Provide vectorization capabilities for RAG retrieval
- Reranker Models: Optimize relevance ranking of retrieval results
Among these, embedding models and reranker models are two functionally distinct but complementary components in Retrieval-Augmented Generation (RAG) pipelines. Embedding models convert text into high-dimensional vectors, placing semantically similar texts closer together in vector space, enabling fast candidate document recall through Approximate Nearest Neighbor (ANN) search. However, embedding models use a bi-encoder architecture (query and document are encoded independently), which limits their precision. Reranker models use a cross-encoder architecture, concatenating the query with each candidate document for joint encoding, capturing more fine-grained semantic matching relationships — but at higher computational cost. Therefore, rerankers are typically applied only to re-rank the top-k results recalled by the embedding model. This "coarse recall + fine re-ranking" two-stage architecture has become the standard paradigm for production-grade RAG systems.
This full multimodal coverage means developers can build a complete AI application pipeline locally — from document OCR, vector embedding, and semantic retrieval to re-ranking, and finally text or vision generation — all on their own Mac, with no data ever leaving the machine. This is particularly valuable for scenarios requiring data privacy, offline operation, or reduced API costs.
Two Key Technologies Behind oMLX's Performance Gains
oMLX achieves its remarkable response acceleration through two core engineering optimizations.
Continuous Batching
Continuous batching is a core technique in modern high-performance inference engines like vLLM. In traditional static batching, the inference engine groups multiple requests into fixed-size batches, and all requests must wait until the longest sequence in the batch finishes generating before the entire batch is considered complete. This means requests generating shorter responses are forced to wait for longer ones, creating severe "tail latency" problems.
Continuous batching (also called dynamic batching or iteration-level batching) re-evaluates batch composition at every decoding step: completed requests immediately release resources and return results, while new requests from the waiting queue can join the batch at the next iteration step. The vLLM project popularized this paradigm in 2023 through PagedAttention technology, which analogizes KV cache management to an operating system's virtual memory paging, achieving near-zero-waste memory utilization.
oMLX transplants a similar approach to Apple Silicon's unified memory environment, enabling efficient resource scheduling even when handling multiple concurrent AI agent requests on a single Mac. This maximizes hardware utilization and significantly improves throughput and response speed.
Tiered KV Cache (RAM + SSD Tiered Caching)
The other key design is tiered management of the KV (Key-Value) cache. In autoregressive inference with the Transformer architecture, the KV cache stores the previously computed Key and Value matrices from the attention mechanism. When generating each new token, the model needs to compute attention relationships between the current token and all preceding tokens. Without caching, generating each token would require recomputing across the entire context, with computational cost growing quadratically with sequence length. The KV cache preserves previously computed Key-Value pairs so that each step only needs to compute the KV for the new token and append it to the cache, reducing incremental computational complexity to linear.
However, KV cache memory consumption is substantial — for a 7B parameter model, for example, a 4K context length KV cache can occupy hundreds of MB or even several GB of memory. oMLX employs a RAM + SSD two-tier cache architecture: active KV entries are kept in high-speed RAM, while less active portions are offloaded to SSD. Thanks to the high-speed NVMe SSD read performance on Apple Silicon platforms (typically exceeding 5GB/s), even loading cache from SSD maintains acceptable access latency. Moreover, this cache survives restarts.
This means that when AI agents repeatedly process the same or similar contexts (such as multi-turn conversations about the same codebase), there's no need to recompute from scratch — the cache can be reused directly. This is the core reason behind compressing 90-second cold-start waits down to 5 seconds — massive amounts of redundant context computation are eliminated by the caching mechanism.
OpenAI and Anthropic API Compatible, Seamless Integration with Existing Toolchains
For developers, whether a new tool can smoothly integrate into existing workflows is crucial. oMLX takes a pragmatic approach here: it provides OpenAI and Anthropic compatible APIs.
This means you can redirect requests originally pointed at the cloud to your local oMLX server with virtually no code changes. Tools like Claude Code and Cursor simply need their API endpoints pointed to localhost to work. This "plug-and-play" compatibility dramatically lowers migration costs and is one of the decisive factors in whether a local inference tool achieves widespread adoption.
Built with Native Swift, No Electron
It's worth noting that oMLX emphasizes it is a native Swift application, not built on Electron. This technology choice directly reflects its commitment to performance and resource efficiency.
Electron is a cross-platform desktop application framework developed by GitHub, based on the Chromium browser engine and Node.js runtime. Well-known applications like VS Code, Slack, and Discord are all built on Electron. Its advantage lies in allowing developers to write desktop applications using web technologies, significantly reducing cross-platform development costs. But the trade-off is clear: each Electron application essentially embeds a complete Chromium browser instance, typically consuming 150-300MB of memory at idle, with JavaScript's garbage collection and V8 engine's JIT compilation introducing unpredictable performance fluctuations.
For a tool that needs to permanently reside in the menu bar and preserve as many system resources as possible for large model inference, native Swift is undoubtedly the more sensible choice. Swift compiles to native machine code, handles memory management through ARC (Automatic Reference Counting) with deterministic deallocation, and can directly call system frameworks like Metal API and Core ML — offering orders-of-magnitude advantages in resource efficiency. It better leverages Apple Silicon's hardware capabilities (such as the Unified Memory Architecture and Neural Engine), forming a natural synergy with the MLX framework.
Fully Open Source Under the Apache 2.0 License
oMLX is released under the Apache 2.0 open-source license, with code hosted on GitHub. Apache 2.0 is one of the most commercially friendly mainstream open-source licenses, belonging to the permissive license family alongside MIT and BSD licenses. It allows users to freely use, modify, and distribute the code — including integrating it into closed-source commercial products. The only major requirements are preserving the original copyright notice and license text, and clearly indicating any modifications made to the original code. Compared to the "copyleft" nature of GPL-family licenses (which require derivative works to also be open-sourced), Apache 2.0 additionally provides explicit patent grant provisions — contributors automatically grant users free rights to use their patents, eliminating patent litigation risks for commercial adoption.
This open strategy means developers can freely inspect implementation details, build upon the project, or even integrate it into commercial products. Heavyweight projects like Kubernetes, TensorFlow, and Apache Spark all use the Apache 2.0 license, a choice proven to effectively foster enterprise-grade ecosystem development. In the rapidly evolving field of local LLM inference, open source not only helps build community trust but also accelerates feature iteration and ecosystem integration.
Conclusion: A Pragmatic Model for Local AI Inference
oMLX demonstrates a clear product philosophy: solving real developer pain points through solid engineering optimization. Rather than pursuing flashy feature bloat, it focuses on the specific goal of "making AI agents run faster on Mac," achieving significant performance improvements through a series of pragmatic technical decisions — continuous batching, tiered persistent caching, native implementation, and standard API compatibility.
For developers who rely on Claude Code or Cursor for daily development and own an Apple Silicon Mac, oMLX offers a local alternative worth trying — delivering smoother response experiences while maintaining data privacy and cost control. As Apple Silicon performance continues to improve, local inference tools like this are likely to become standard components in an increasing number of developer workflows.
Related articles

Apple Watch ECG Detects Atrial Fibrillation, Saves Triathlete's Life: A Real-World Story
Triathlete Connor's heart rate spiked to 219 bpm during a race. His Apple Watch ECG detected AFib, leading to open-heart surgery that fixed a hidden heart condition.

Norcross Maine Forest Fire Maps: A Century-Old Cartographic Legacy and Data Visualization Pioneer
Explore Archie G. Norcross's 1918–1922 Maine forest fire maps—a hand-drawn cartographic masterpiece that pioneered early data visualization and remains valuable for climate research, historical GIS, and AI fire monitoring.

Apogee: A Privacy-First Browser Summarization Extension Rebuilt with Local AI After Mozilla Killed Orbit
After Mozilla killed Orbit, an indie developer rebuilt a fully local AI browser summarization extension called Apogee using Ollama, WebGPU, and Transformers.js—no user data ever leaves your device.