Free Intensive Nov 21–22Free 2-day hands-on Vibecoding Intensive on Nov 21–22 at 16:00 MSK (Sat–Sun) · Live Cohort 3 starts Nov 23Join Free →Cohort 3 (Nov 23)
ReleaseAPI / Product · ActionableHabr AI→ original

A 16 GB Mac mini instead of a paid API: Qwen analyzes food photos in 20–40 seconds

The owner of a healthy-lifestyle app stopped paying for a cloud API. Presentations or PDFs processed through Claude and ChatGPT sometimes cost up to $3 per file, so he set up models on an office Mac mini with 16 GB of memory. Qwen recognizes food photos in 20–40 seconds, and the 14-billion-parameter model produces about 11 tokens per second. That is enough for background tasks of the same type, but buying a Mac for this kind of saving is not worth it.

AI-processed from Habr AI; edited by Hamidun News
A 16 GB Mac mini instead of a paid API: Qwen analyzes food photos in 20–40 seconds
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
Key metric #1A 32-billion-parameter model needs about 20 GB and does not fit into 16 GB
Key metric #2A used RTX 3060 runs the same 14B model roughly twice as fast (according to other people's tests)
Key metric #3Over several days, the gateway without a key was probed 277 times, and every request was rejected

Every request to Claude or ChatGPT through the API (paid access to a neural network from code) costs money. A presentation or PDF sometimes costs up to $3 per file, and ten requests come to about a dollar. The owner of a small company and a healthy-lifestyle app decided not to pay and ran the neural networks himself. He took an unneeded office Mac mini with 16 GB of RAM, installed Ollama (a program for running models on your own computer), and the open Qwen model. Now Qwen analyzes a food photo in 20–40 seconds, and the 14-billion-parameter model produces about 11 tokens (roughly syllables) per second. It is free, with caveats described below.

Why a local model at all

The math is simple. For occasional work, $3 per file is pocket change, but for a service with a constant stream of requests it becomes a line item in the budget. A local model removes the per-request fee: you issue the access key to yourself, and the data does not go to third-party servers.

The main working task right now is recognizing food photos for the app. For this, the author uses the vision model (one that understands images) Qwen: the quality is acceptable and the cost is zero. 20–40 seconds per photo is fine for a background scenario where the user does not need an instant response. For real-time chat, it is not.

What the Mac mini actually offers

A discrete graphics card has its own memory: an RTX, for example, has 12 GB, and the model must fit into it. On a Mac with an ARM processor, memory is shared, and almost all of the RAM can be allocated to the model. On the 16 GB version, the GPU can use about 10.7 GB, and the system takes the rest. That is even less than an RTX offers.

The practical numbers follow from this. A 14-billion-parameter model takes about 9 GB and fits entirely. A 32-billion-parameter model requires about 20 GB and does not fit. The author draws an honest conclusion: the advantage of shared memory barely works at 16 GB; it starts with configurations of 32 GB and up.

Speed is modest: about 11 tokens per second on the 14B model. According to other people's tests, a used RTX 3060 runs the same model roughly twice as fast. The Mac's advantages lie elsewhere. Ollama installs with a single command and uses the GPU by itself, so no drivers are needed. The device is small and quiet: about 4 W at idle and up to 65 W under load. It can also serve as a home server for data. In addition, the author got the machine almost for free: a new one would cost on the order of 60–70 thousand rubles.

An agent instead of an admin, and bumps along the way

The author handed the setup to Claude Code. The agent installed the models itself, configured access, and wrote instructions so that the lightweight models would output the required format. The connection is arranged carefully: SSH login only with a key, passwords disabled, and the Mac has no public IP and no open ports. Developers and the app reach it through a tunnel to the author's server.

This protection proved useful. Claude Code collected statistics: over several days, the developer gateway was probed 277 times by requests without a key. The author calls these scanners, which find any new address. All of the requests were rejected.

There were also problems:

  • The llama3.2-vision model stopped recognizing dishes. It does not work in the new version of Ollama, so it was replaced with Qwen.
  • DNS broke: the internet was formally connected, but no site would open. Claude found and explained the cause.
  • After a power outage, the encrypted disk asked for a password at boot. For several days, while the author was away from the office, nobody could reach the machine.

Other models, such as DeepSeek, are currently sitting idle. The team also tried the Mac in a server hardware configurator, but that project is still in development and has only one programmer.

Takeaway for practitioners

A local server pays off where there are many homogeneous requests that do not require top-tier quality: image recognition, template documents, background processing. If there are no high-volume API tasks, there is no point in buying a Mac mini for this. If you already have a computer with a graphics card, it is cheaper to get a used RTX and run Ollama on it. If you are choosing a Mac specifically for large models, get a configuration with 32 GB or more: at 16 GB, the ceiling is models like the 14B.

Before launching, check three things: whether the models still work after an Ollama update, how to regain access to the machine after a power failure (encrypted disk), and whether external access is closed except for key-based login. This is dull engineering, but it is exactly what determines whether the savings are real.

Story

Key Questions Answered

Why a local model at all?

The math is simple. For occasional work, $3 per file is pocket change, but for a service with a constant stream of requests it becomes a line item in the budget. A local model removes the per-request fee: you issue the access key to yourself, and the data does not go to third-party servers. The main working task right now is recognizing food photos for the app. For this, the author uses the vision model (one that understands images) Qwen: the quality is acceptable and the cost is zero.

What the Mac mini actually offers?

A discrete graphics card has its own memory: an RTX, for example, has 12 GB, and the model must fit into it. On a Mac with an ARM processor, memory is shared, and almost all of the RAM can be allocated to the model. On the 16 GB version, the GPU can use about 10.7 GB, and the system takes the rest. That is even less than an RTX offers. The practical numbers follow from this. A 14-billion-parameter model takes about 9 GB and fits entirely. A 32-billion-parameter model requires about 20 GB and does not fit.

What are the key details on An agent instead of an admin, and bumps along the way?

The author handed the setup to Claude Code. The agent installed the models itself, configured access, and wrote instructions so that the lightweight models would output the required format. The connection is arranged carefully: SSH login only with a key, passwords disabled, and the Mac has no public IP and no open ports. Developers and the app reach it through a tunnel to the author's server. This protection proved useful.

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

Test Frontier LLMs & Autonomous Agents in One Workspace

Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.

Try Nomad AI →Launch Nomad Agent
What do you think?
Loading comments…