Notes from the work

One email when a tutorial or migration write-up goes live. Nothing else, and an unsubscribe link in every email.

LeanZero

Two people in Romania doing Atlassian migrations, Forge apps and practical AI work for teams that would rather talk to the person doing the job. Most of what we learn ends up on this site.

Services

  • Atlassian migrations
  • Atlassian FastShift
  • Atlassian maintenance
  • Forge app development
  • AI development consultation

Topics

  • Jira
  • Jira Service Management
  • Confluence
  • Bitbucket
  • Atlassian Forge
  • Cloud Migration
  • Local AI
  • AI Coding
  • Certifications
  • Atlassian Team
  • All topics

Company

  • Blog
  • Tutorials
  • Contact

Community

  • Join Discord
  • Support this site

© 2026 LeanZero. All rights reserved.

Privacy policyTerms of service24/7 SupportTrust centerSecurityDPALegal notice
  1. Home
  2. Portfolio
  3. Elzi
  4. Features
  5. Single Mac
Elzi feature guide

Serving a model on one Mac

Elzi checks the memory, mounts the model and keeps long chats inside what fits.

On one Mac, Elzi loads the model into the LeanZero MLX engine and serves it from that Mac's own memory. Before it mounts a model, the app measures the memory macOS can give right now. A mount that won't fit is refused with the reason and, where there is one, an alternative such as a two-Mac split. During long chats a memory guard plans every step, so a request that grows too big gets a clear answer instead of pushing the Mac out of memory.

Mounting a model

The app measures available memory the way Activity Monitor does: free memory plus the file cache and purgeable pages macOS can reclaim. If that check fails, the mount doesn't start. While the model loads, you see each phase (making room, starting, loading, warming up) and how many bytes of weights are in. Stop works during loading too.

The memory guard

The engine plans memory before every prefill chunk, every decode step and every time a request joins a batch. It counts the weights, the KV cache, the allocator cache and the scratch space attention needs. When a step won't fit, it clears the allocator cache, evicts prompt-cache entries, shrinks the chunk or holds the newest request back. It only refuses a request that can't fit on its own, and then it says so with a context-length error.

We built it after a 64 GB MacBook Pro ran out of memory in the middle of a single growing session in October 2026. The guard also yields when macOS reports memory pressure.

Settings you can tune

The Memory tab of the LeanZero MLX settings holds the levers: the Metal memory limit, a free-memory floor (5 % of RAM by default), the prompt-cache size, the prefill step size, the maximum context, the guard's margin and how many requests run at once. Each one maps to an engine flag. The same tab has a button that raises or restores macOS's limit on GPU memory.

How much context fits

PromptFirst tokenDecodePeak memory
455,700 tokens, cold691.5 sabout 27 tok/s105.8 GiB
521,727 tokens, cold656.9 s28.4 tok/s111.5 GiB
653,246 tokens, 131,519 new on a cached prefix317.1 s26.5 tok/s114.2 GiB
Our own 4-bit build of Qwen3.8-Flash-Next (from Qwen's official weights) on the M5 Max Mac Studio, 2 November 2026: Elzi 3.0.148, engine lz.24, the app's default YaRN context extension, three experimental attention switches on, one needle test per row. Time to first token on a cold prompt is the whole prompt read from scratch.

Swap stayed flat through all three, and the model found the needle each time.

How we count context

These are single test runs, not a promise for every prompt. Before we rely on a size in daily work, we also check that a real session growing to it works, because a cold test can pass at a size a real session can't reach.

Before a model goes into use

  1. Right build: every file's checksum, the tokenizer and the chat template match the lab's official release.
  2. Every capability works end to end: images answered correctly, and the MTP and prompt-lookup counters actually moving.
  3. The largest context is measured in a growing session, as above.
  4. Speed levers are proven not to change the output, or they stay off.
  5. Memory settings are set for each Mac it runs on.

Related guides

Memory lockKeep memory for your local model while other apps compete for it.The LeanZero MLX engineThe local model server inside Elzi, built on our fork of Rapid-MLX.Distributed serving across two MacsSplit one model across two Macs over Thunderbolt, to run models too big for one.Speed: measured numbersDecode, prefill and time to first token from our own runs, with model, Mac and date.

Facts on this page were checked against our own test records on 6 November 2026.

Using Elzi

  • What Elzi is
  • Agent sessions
  • Software build sessions
  • Benchmark runs
  • Nodes and strategies
  • Providers

The MLX engine

  • The LeanZero MLX engine
  • Serving a model on one Mac
  • Distributed serving across two Macs
  • N-gram tables and prompt lookup
  • Speed: measured numbers
  • Memory lock

Media and devices

  • Images
  • Voices
  • LeanZero Link

Elzi

  • All feature guides
  • Download and user manual