How a local LLM uses the Mac mini
This page was written on 2026-11-13 for the hotel concierge AI on the Mac mini (Apple M4, 32 GB). It explains which part of the machine each step uses, so a test result can be traced to the right cause and the right fix. The model results are in the Hotel concierge LLM benchmark. The shared setup is in wall-e on the Mac mini.
Numbers are marked: (measured) on this Mac, (Apple spec) from Apple's published figures, (estimate) not measured.
1. The short version¶
- RAM is capacity, not speed. It decides what fits. More RAM does not make a reply faster.
- Speed comes from the chip: GPU cores (reading the prompt) and memory bandwidth (writing the answer).
- Accuracy comes from software: the model build, the prompt and the hotel facts given to the model (RAG).
- Today's slowness is neither. It is waiting: the hotel shares one slot with another job. That is a software setting.
2. Hardware: the parts of the chip¶
| Part | What it is | Role for the LLM | This Mac (M4) |
|---|---|---|---|
| GPU cores | Many small processors doing the same calculation in parallel | Do almost all the model's maths | 10 |
| Memory bandwidth | GB per second that can move between RAM and the processors | Limits how fast the model's weights can be read for each token | About 120 GB/s (Apple spec) |
| CPU cores | A few flexible processors: fast "performance" and slower "efficiency" cores | Run the server, gateway, embedding model, text to speech. Not the main model | 4 fast + 6 slow |
| Unified memory (RAM) | One pool shared by CPU and GPU | Holds the model, the context of every slot, the VM and all other programs | 32 GB |
| Neural Engine | Apple's low-power processor for small AI models | Not used by llama.cpp or MLX. Could run part of Whisper through Core ML (not tested here) | Unused |
CPU cores and GPU cores are separate processors. What they share is the memory: the model is loaded once and the GPU reads it directly. On a PC, the model must fit inside the graphics card's own memory.
Where the memory goes on this Mac (measured)¶
| User | About |
|---|---|
| LLM (model weights + working context) | 16.3 GB |
| UTM Linux VM | Up to 8 GB |
| Embedding model, Whisper, TTS, gateway, callbot agent | 1 to 2 GB |
| macOS and the rest | The remainder; 1.4 GB of swap in use |
If memory runs out, macOS moves data to disk (swap) and everything touching it becomes very slow. Enough RAM gives normal speed; more than enough adds nothing.
Same RAM, different chip: what speed to expect (prices checked 2026-11-13)¶
Apple replaced the M4 and M4 Pro Mac mini in August 2026. The models Apple sells now are the M6 and the M5 Pro. The M4 Pro is the one most people bought for local LLMs until then; it is now only at resellers or second-hand.
| M4 (this Mac) | M4 Pro (replaced) | M6 (current) | M5 Pro (current) | |
|---|---|---|---|---|
| GPU cores | 10 | 16 or 20 | 12 | 16 or 20 |
| CPU cores | 10 | 12 or 14 | 12 | 15 or 18 |
| Memory bandwidth | 120 GB/s | 273 GB/s | 153 GB/s with 16 GB; 170 GB/s with 24 or 32 GB | 307 GB/s |
| RAM options | up to 32 GB | 24, 48, 64 GB | 16 to 32 GB | 24 to 64 GB |
| Answer writing, this model | about 30 tokens/s (measured) | about 70 tokens/s (estimate) | about 42 tokens/s (estimate) | about 77 tokens/s (estimate) |
| Speed-up over this Mac | 1x | about 2.3x | about 1.4x | about 2.6x |
| Prompt reading | 250 to 400 tokens/s (measured) | faster: 1.6 to 2 times the GPU cores | Apple claims "up to 4.8x faster than M4" | Apple claims "up to 4x faster than M4 Pro" |
| Starting price, Thailand | no longer sold by Apple | no longer sold by Apple | 32,900 baht (16 GB / 256 GB) | 61,900 baht (24 GB / 512 GB) |
| Starting price, US | was $599 at launch | $1,399 at launch, raised to $1,599 in June 2026 | $899 (16 GB / 256 GB) | $1,699 (24 GB / 512 GB) |
How to read it:
- The answer-writing estimates are simply this Mac's measured 30 tokens/s multiplied by the bandwidth ratio. Real results depend on the model and the server software; nothing here was measured on those machines.
- Apple's prompt-reading figures are marketing claims ("up to", in LM Studio). Treat them as the best case.
- For the same 32 GB, a chip change alone gives: M6 about 1.4 times the writing speed for a little over the starting price; M5 Pro about 2.6 times, but it is sold with 24 GB at the starting price and costs more with 48 or 64 GB.
- Prices for the larger memory options were not confirmed. One source lists the M6 with 32 GB and 1 TB at $1,799. Baht prices for the 32 GB M6 and the 48 / 64 GB M5 Pro were not found; check apple.com/th before budgeting.
- A second Mac is also a capacity answer: whatever the chip, a second machine gives the hotel its own model and removes the shared slot.
Bandwidth is fixed by the chip's design (number of memory channels and RAM speed). No setting changes it.
Sources for specifications and prices:
Compared with an NVIDIA graphics card at a similar price (prices checked 2026-11-13)¶
An NVIDIA card is a separate GPU with its own memory (VRAM). The model must fit inside that VRAM; the PC's ordinary RAM does not count. Graphics card prices are far above list price in late 2026, and sources disagree widely, so the prices below are ranges.
| Topic | Mac mini M6, 32 GB | Mac mini M5 Pro, 24 to 64 GB | Used RTX 3090 (24 GB) | RTX 5080 (16 GB) | RTX 5090 (32 GB) |
|---|---|---|---|---|---|
| Price | from 32,900 baht / $899 (16 GB); about $1,799 with 32 GB (one source) | from 61,900 baht / $1,699 (24 GB) | card only $1,200 to $1,650 | card only $1,600 to $2,000 | card only $3,300 to $9,000 |
| Needs a PC around it | No | No | Yes: add roughly $600 to $1,000 (estimate) | Yes | Yes |
| Memory the model can use | up to about 24 GB of the 32 | up to about 48 GB of 64 | 24 GB | 16 GB | 32 GB |
| Fits this model (14.4 GB file, 16 to 20 GB running) | Yes | Yes | Yes, tight with many slots | No: part of the model falls back to the CPU and it becomes slow | Yes, with room |
| Memory bandwidth | 170 GB/s | 307 GB/s | about 936 GB/s | about 960 GB/s | about 1,790 GB/s |
| Answer writing, 30B-class dense model at 4-bit | no figure found | about 20 to 30 tokens/s reported for M4 Pro | about 35 to 40 tokens/s (reported) | not applicable (does not fit) | about 60 tokens/s (reported) |
| Answer writing, mixture-of-experts model like ours | about 42 tokens/s (estimate) | about 77 tokens/s (estimate) | much faster than dense; not found for this model | not applicable | about 234 tokens/s at short context reported for a 30B MoE |
| Many guests at once | Weak | Better, same weakness | Strong: built for parallel requests | Strong | Strongest |
| Power under load | tens of watts | tens of watts, up to about 150 W | card alone about 350 W | card alone about 360 W | card alone about 575 W |
| Noise, size, upkeep | Silent, tiny, nothing to maintain | Same | A tower PC with fans; drivers and Linux to maintain | Same | Same, plus a large power supply |
What matches what:
- At the M6's price there is no NVIDIA option that fits this model. The cards at or below that price have 16 GB or less.
- At the M5 Pro's price the match is a used RTX 3090 in a PC, which ends up costing somewhat more than the Mac once the PC is included. It is faster and much better with many guests at once, but it is second-hand, louder and uses several times the power.
- The RTX 5090 is the clear step up in speed and capacity, at two to five times the price of the M5 Pro for the card alone.
- The callbot guide on this Mac mentions an RTX 3090 that already runs this same model ("3090 reference: mock-call reply 3 to 4 s"). Running the hotel test set on that machine would give a real comparison instead of these estimates.
The speeds marked "reported" come from public benchmarks of other models on those cards; none was measured with our model.
Sources for the card speeds and prices:
- RTX 3090 vs 5090 for local AI
- RTX 5090 local AI benchmarks
- What to buy for local LLMs (April 2026)
- Local LLM hardware guide
- RTX 50 price rise, November 2026
- RTX 3090 prices
- GPU market prices
3. RAM in detail: what it holds and how it relates to everything else¶
RAM does not compute anything. It is the space where everything the chip works on must sit. For the LLM, four things take that space:
| What sits in RAM | What decides its size | On this Mac |
|---|---|---|
| Model weights | Number of weights x bits per weight (the compression level) | 14.4 GB file for the QAT 4-bit build; 16.9 GB for the regular 4-bit build (measured) |
| Context memory (KV cache) | Context size x its precision. With the shared pool, all slots draw from one pool | Pool of 16,384 tokens at 8-bit precision. Going from 4k to 64k tokens added only about 2 GB in the capacity test (measured) |
| Prompt cache | A fixed limit set at start | 1 GB (--cache-ram 1024) |
| Working buffers | Batch size and the server itself | Under 1 GB (estimate) |
Together: 16.3 GB for the LLM process now, with 4 slots and a 16K pool. In the earlier benchmark, with 6 slots and a 32K pool, the same model peaked at about 20.5 GB (measured). So the file size understates what the model needs when running.
How RAM relates to each other topic¶
| Topic | Relation to RAM |
|---|---|
| Model quality | A less compressed or larger model is usually more accurate and needs more RAM. This is the main trade: the regular build scored 0.96 against 0.93 for QAT, but as a GGUF file on llama.cpp it took 2.5 GB more and swapped next to the VM (measured) |
| Context length | Longer conversations and more retrieved facts need a bigger pool. The RAM cost is small; the real cost is time, because a longer prompt takes longer to read (GPU cores) |
| Number of slots | With the shared pool, an extra slot costs almost no RAM by itself. But more busy slots must fit in the same pool, so the pool usually has to grow with them |
| Prompt cache | RAM spent here buys speed: text already read is not read again. Too small a cache and the hotel's system prompt is thrown away between requests |
| Speed | No direct effect. Indirectly: when RAM runs out, macOS swaps to disk and every step slows sharply. In the benchmark the 22 GB build made about 750,000 swap-outs in 12 minutes (measured) |
| Other programs | Everything shares the one pool. The VM (up to 8 GB), Whisper, the embedding model and macOS all reduce what the LLM can have |
| GPU | The GPU reads the model straight from RAM, with no copy. macOS limits how much of the RAM the GPU may hold, by default about two thirds to three quarters; a 16 GB model is inside that |
| Fine-tuning (LoRA) | Training needs far more RAM than serving. It may need the VM stopped or another machine (not tested) |
How to tell RAM is the problem¶
Do not judge by "free %" alone: it includes cache and rises when macOS pushes memory to disk. Watch these instead:
vm_stat | grep Swapouts # rising during a run = something does not fit
sysctl vm.swapusage # swap in use
A few thousand swap-outs in a run is minor. Hundreds of thousands means the setup does not fit next to everything else.
What more RAM would and would not give¶
| With 48 or 64 GB | Result |
|---|---|
| The regular (higher-scoring) model build without swapping | Better accuracy |
| A second model loaded at once | Hotel and callbot each get their own, so no shared slot and no shared adapter |
| Larger context pool and more slots | More conversations held ready |
| Faster replies for one request | No. Speed is set by GPU cores and memory bandwidth |
| More guests answered at once at the same speed | No. Requests still share the same GPU |
A rule of thumb for sizing: RAM needed = model file + about 2 to 6 GB for context, cache and buffers + what the other programs use + a margin of a few GB so macOS never swaps.
4. The flow of one guest request¶
| # | Step | What happens | Hardware it leans on | Test number it affects |
|---|---|---|---|---|
| 1 | Speech to text | Whisper turns voice into text | GPU cores (shared with the LLM) | ASR latency |
| 2 | Intent and rules | The back-end decides what the sentence means | CPU on the back-end machine | Intent latency |
| 3 | Retrieval (the R in RAG) | The embedding model finds the matching hotel facts in the knowledge base | CPU cores on this Mac | Retrieval latency; accuracy |
| 4 | Waiting for a slot | The request queues until its slot is free | None: pure waiting | p90 latency, timeouts, overflow |
| 5 | Reading the prompt | The LLM takes in system prompt, hotel facts and question | GPU cores. Skipped for text already in the prompt cache | Time to first token |
| 6 | Writing the answer | The LLM produces the reply token by token | Memory bandwidth | Tokens per second, total time |
| 7 | Text to speech | The reply becomes audio | CPU cores | TTS latency |
Measured on this Mac: prompt reading about 250 to 400 tokens/s; answer writing about 30 tokens/s; a short hotel request with the slot free 0.39 s median.
Two things often confused¶
| Retrieval (RAG) | Prompt cache | |
|---|---|---|
| Stores | The hotel's facts | The model's work on text it already read |
| Purpose | Give the model the right information | Skip re-reading the unchanged start of a prompt |
| Improves | Accuracy | Speed |
| Lives in | The knowledge base (back-end side) | The LLM server, per slot |
5. Software: the layers on top, and what each one controls¶
| Layer | Choices | What it changes |
|---|---|---|
| Model | Which model; mixture-of-experts or dense | Accuracy and speed. This model (Gemma 4 26B-A4B) uses about 4B of its 26B weights per token, so it is faster than its size suggests |
| Compression (quantisation) | 4-bit, QAT 4-bit, 3-bit ... | Fewer bits = less RAM and faster reading, with some loss of accuracy. Earlier benchmark: regular build 0.96, QAT 0.93 (measured) |
| Adapter (LoRA) | Callbot adapter applied to every request today | Changes the model's behaviour. Not tested for hotel use |
| Server settings | Slots, context size, prompt cache size, KV precision | Slots = requests at once. All slots share one context pool of 16,384 tokens. More slots share the same GPU |
| Thinking mode | On or off | On = slower (10 to 35 s in the earlier benchmark), sometimes better answers |
| Gateway | Which client goes to which slot; priority rules | Decides who waits (step 4) |
| Retrieval (RAG) | Search method, chunk size, how many chunks | Accuracy, and prompt length (step 5) |
| Prompt | Length of system prompt, number of tools, reply length limit | Tokens in (step 5) and tokens out (step 6) |
| Application rules | Confirm before ordering, room from the session, price must be in the data | Safety and correctness without relying on the model |
6. Optimising: what to change for each symptom¶
| Symptom in a test | Step | Cause | Fix | Needs hardware? |
|---|---|---|---|---|
| Long wait before anything, timeouts | 4 | Another job on the same slot | Own slot for the hotel, or move the other job | No |
| Slow first token on every request | 5 | Prompt cache lost, or prompt too long | Keep the cache (own slot); shorter system prompt; fewer chunks and tools | No |
| Fast first token, slow total | 6 | Long answer, or several requests writing at once | Cap reply length; limit requests at once | No, until the ceiling |
| Much slower at 2x and 3x load | 5, 6 | GPU and bandwidth shared across requests | Overflow to the public LLM above the measured limit; or a stronger chip | Yes, for a higher ceiling |
| Swap grows, free memory falls | RAM | Model + context + VM too big | Smaller build, smaller context, fewer slots; or more RAM | Yes, for a bigger model |
| Voice commands slow when the LLM is busy | 1 | Whisper and the LLM share the GPU | Whisper on the Neural Engine via Core ML (not tested) | No |
| Wrong facts | 3 | Retrieval missed or outdated data | Better search, cleaner knowledge base | No |
| Wrong action, wrong language | Model, prompt | Model build, adapter, prompt, too many tools | Router with small prompts; right build; rules in code | No |
Order to work in¶
- Remove the waiting (gateway, slots). Free, and the largest effect today.
- Keep and use the prompt cache. Comes with step 1.
- Shorten prompts and replies. Also serves the tokens-per-command target.
- Choose the model build by measurement on the test set.
- Measure the limit with 1x / 2x / 3x load and set the overflow threshold there.
- Only then consider hardware: more RAM for a second or bigger model; a higher chip tier for more speed and more guests at once.
7. Where this Mac stands today (measured 2026-11-13 and 2026-11-18)¶
| Hotel requests, 2026-11-11 to 2026-11-13 | Requests | Timeouts | Median reply | 90th percentile |
|---|---|---|---|---|
| Slot free | 632 | 2 | 0.39 s | 0.67 s |
| Sharing the slot with another job | 1,641 | 347 | 6.58 s | 45.07 s |
- The model is fast enough for short hotel requests when it is not waiting.
- 15.1% of hotel requests timed out, almost all while sharing the slot.
- Memory has room (29% free), so a fifth slot would fit; the context pool would likely need to grow, about 1 to 2 GB more (estimate).
- A separate slot removes the queue but not the sharing of the GPU: expect 1 to 3 s while the other job runs (estimate), 0.4 s when it does not.
Source: runs/2026-11-13_gateway-baseline/summary.md.
Is this M4 enough if the callbot is not on it?¶
Yes for a pilot with a few guests talking at the same time; no for many at once. What the measurements say:
| Situation | Reply time | Source |
|---|---|---|
| Short hotel request, slot to itself (today's real traffic) | 0.39 s median, 0.67 s for 90% | gateway log, 2026-11-11 to 2026-11-13 |
| One guest, full question with hotel data (about 1,000 tokens in) | 3.7 s for 95% | capacity test, 2026-11-02 (no callbot, VM running) |
| 2 guests at once | 4.5 s | same |
| 4 guests at once | 17.7 s (llama.cpp); 9.6 s (Locals server) | same |
| 6 guests at once | 32.4 s (llama.cpp); 18.6 s (Locals server) | same |
- Against the client target of an answer shown within 3 s for 90% of requests: short requests pass easily; a full knowledge-base question from one guest is borderline; four or more model requests at once do not pass.
- Much of the real concierge flow is rules, not the model (bookings, requests, taxi, TV control). Only the steps that use the model (reading an order, hotel-guide answers) queue on the GPU, so real concurrency is lower than the number of guests talking.
- So without the callbot the M4 is acceptable up to about 2 model requests at the same moment, with overflow to the public LLM above that. The number to settle is the hotel's real peak; it has not been given.
- Removing the callbot also frees its adapter and slots: the hotel could then use the higher-scoring model build and the faster Locals server, both of which were held back by sharing.
Measured on 2026-11-18: one slot against four (model alone, QAT, no callbot job running)¶
Each request carried a full test prompt (about 2,000 tokens in, about 50 out) and went straight to the LLM, one slot or all four. One run per level, so treat small differences as noise. Figures are median / 90th percentile in seconds.
| Load | 1 slot | 4 slots |
|---|---|---|
| 1 at once | 2.7 / 5.6 | 2.9 / 6.1 |
| 2 at once | 3.3 / 4.2 | 3.3 / (a stall on the hotel's slot, see below) |
| 3 at once | 4.6 / 9.0 | 4.0 / 5.3 |
| 4 at once | 6.3 / 16.9 | 5.7 / 7.2 |
| 20 per minute, steady | 2.4 / 5.3 | 2.6 / 4.3 |
| 30 per minute, steady | 10.6 / 19.3 | 5.6 / 8.6 |
| 45 per minute, steady | 23.9 / 41.1 | 22.7 / 31.8 |
- One request takes about 2 to 2.7 s with this prompt, mostly writing the answer (about 28 tokens per second). That is why short hotel requests (0.2 to 0.4 s) and full questions (2 to 3 s) are different problems.
- More slots did not raise the ceiling. At 45 per minute both setups are overloaded (median about 23 s), and four requests at once take nearly as long as four in a row. This is the memory-bandwidth limit of section 2 showing up in a measurement.
- More slots did cut the long waits. The slowest requests were two to three times faster on four slots, because one slow request no longer blocks the rest.
- A comfortable level is about 20 model requests per minute (median near 2.5 s), on either setup. If a guest who is chatting sends a model request every 15 to 30 s (an assumption, not measured), that is roughly 5 to 10 guests talking at the same moment. The hotel's real peak has not been given. Most concierge requests are rules, not model calls, so real capacity in guests should be higher.
- The client target of 3 s for 90% of requests is not met by a full-prompt request even at low load (occasional 5 to 6 s requests). It is met by the short requests the hotel mostly sends today.
- The hotel's slot has its own problem. A request from the hotel back-end every 4 minutes held slot 3 for about 60 s and blocked everything behind it (the gateway then answered 504). Slots 0 to 2 were unaffected. Until that request is understood, the gateway's single slot is slower than the hardware allows. Source:
runs/2026-11-18_slot3-baseline-qat-load/summary.md.
Sources: runs/2026-11-18_direct-1slot-qat-load/, runs/2026-11-18_direct-4slots-qat-load/, runs/2026-11-18_direct-4slots-bursts34-qat-load/.
8. Why a Mac mini for LLMs, and where it stops¶
Good for: memory the GPU can use is cheap (a PC graphics card stops at about 24 GB); low power, small, quiet, runs around the clock; fine for one or a few users at once.
Weak at: many users at once. In the earlier capacity test, the 95th percentile reply went from 3.7 s with 1 guest to 17.7 s with 4 and 32.4 s with 6 on llama.cpp (measured, prompts of about 1,000 tokens). That ceiling is the chip, and it is why the plan includes overflow to a public LLM above the measured peak.