TECHNOLOGY

macMLX 0.10: schema support, model unloading and the pool’s real scope

In this article
THE QUICK TAKE

Schema support and memory lifecycle are separate contracts. Preserve unsupported forms, active-run cleanup, retained cache state and the difference between app and CLI pooling.

macMLX combines a native Swift MLX engine with app, command-line and compatible API interfaces. Its release 0.10.0 addresses two separate integration problems: accepting the structured-output schemas emitted by a client and accounting for memory when models leave residency. Neither improvement establishes universal schema support or an unlimited model pool.

Client compatibility has an explicit schema subset

The release adds nested schemas, references and numeric bounds. The versioned changelog connects these to Foundation Models client types rather than claiming that Apple’s own model runs inside macMLX.

The documented subset still excludes null, unions and pattern constraints, and rejects recursive schemas. Accepting a schema therefore does not establish compatibility with every document generated by an application. A proposed integration should preserve the emitted schema and verify both a permitted case and an expected rejection. Even a conforming result can contain a factually wrong value.

Releasing a model and draining cached allocations are different events

The changelog describes MLX retaining reusable allocations after the engine released a model. Its correction drains the cache after references are released, deferring ordinary active-generation cleanup until the last run ends. It also documents caveats around cancellation and speculative references, rather than promising instantaneous return under every execution path.

In one reported Mellum2 experiment, the cache ended empty with 15 MB still active, largely prompt-cache state, and unloading including the drain took about 50 ms. These are the project’s measurements for that case. They do not establish a universal release size, zero process memory or identical timing on another Mac.

Auxiliary models must fit the same admission story

The app’s reranker and embedder now participate in the pool’s budget instead of remaining uncounted beside chat models. The documented flow reserves capacity and releases victims before loading a replacement, while protecting models in use.

The command-line server has no such pool and loads these models directly, although it has an unload interface. That distinction prevents transferring the app’s admission claim to every surface. Shared engine code does not mean all lifecycle policies are identical.

Read unit tests for what they actually exercise

The release’s unload tests use a weightless container and replace the cache-drain operation with a recorded callback. They examine reference-release ordering and deferred cleanup behavior without executing generation or initializing a real model’s Metal allocations. Such tests are evidence of the intended control contract, not a hardware memory benchmark we ran.

A proposed pilot should record active and cached MLX memory separately from process residency, then observe a model swap and a cancelled request after work settles. Include reload cost and retained prompt state. The schema conformance guide and model loading versus steady-state guide explain adjacent checks. The project site also separates released and planned engine features; planned sharing or admission mechanisms should not be described as already available. We reviewed release material and small source files without installing the app or modifying a running model service.

Sources

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles