메뉴
HN
Hacker News • 24일 전

M4 Pro 맥 미니로 구축한 로컬 LLM 서버

IMP
6/10
핵심 요약

48GB RAM을 갖춘 M4 Pro 맥 미니에서 Qwen3.6-35B와 Gemma-4 모델을 oMLX 추론 서버로 구동하고, Tailscale로 아이폰·맥북을 연결해 에이전트 백엔드로 활용하는 방법을 소개합니다. 클라우드 API의 가격 변동, 데이터 프라이버시, AI 주권 리스크를 피하고 비용 예측성과 지연 감소, 오프라인 사용 등의 실용적 이점을 얻을 수 있다는 것이 핵심입니다. GPT-5나 Claude Opus가 필요한 나머지 20%를 제외한 일상 요청의 80%를 무료로 처리하는 것이 목적입니다.

번역된 본문

저는 RAM 48GB의 M4 Pro 맥 미니에서 로컬 LLM 서버를 운영합니다. Hermes 에이전트 백엔드부터 폰에서 빠른 채팅 질의까지 모든 것을 처리합니다. 전체 설정에는 약 30분이 걸립니다. 사용한 스택은 다음과 같습니다:

Qwen3.6-35B-A3B-OptiQ-4bit: 추론이나 깊이가 필요한 작업을 위한 메인 모델 Gemma-4-E4B-it-OptiQ-4bit: 간단한 채팅, 포맷팅 등 일상 작업을 위한 경량 모델 oMLX: 추론 서버 Tailscale: 맥 미니, 아이폰, 맥북을 연결하는 테일넷

Hermes는 맥 미니에서 에이전트 백엔드로 실행되고, 맥북에서는 데스크톱 클라이언트를, 폰에서는 텔레그램을 사용합니다. Hermes 외 용도로는 iOS에서 빠른 채팅용 Apollo(Claude 같은 느낌이라 일회성 질문에 좋음), 코딩 에이전트 Pi(이 설정은 이미 글을 쓴 적이 있습니다), 맥에서 잡다한 작업용 Raycast AI를 사용합니다.

왜 굳이 로컬로?

로컬을 운영하는 주된 이유는 클라우드 API가 '빌린 땅'이라는 점입니다. 언제든지 가격을 바꾸고, 사용량 한도에 걸리게 하고, 뒤에서 제공되는 모델을 몰래 바꿀 수 있습니다. 저는 월 200달러짜리 구독 두 개를 정기적으로 최대치로 쓰고 있었는데, 시점마다 다른 품질을 받는 느낌이었습니다. 어떤 때는 모델이 괜찮다가, 어떤 때는 통보 없이 성능이 나빠졌습니다.

데이터 프라이버시도 문제입니다. 이 기업들이 데이터를 가진 후 어떻게 하는지 알 수 없습니다. 사용을 제한할 수도, 팔 수도, 노출시킬 수도 있습니다. 어느 쪽이든 운영상 보안 리스크가 됩니다. 민감한 코드, 고객 데이터, 독점 워크플로우를 다룬다면 서드파티 API로 보내는 것은 한 번 하면 되돌릴 수 없는 결정입니다.

그다음은 AI 주권 문제입니다. 저는 미국 정부가 여러 모델의 배포를 제한하는 것을 지켜봐 왔습니다. 이는 어떤 정부가 어떤 이유로든 언제든 일어날 수 있으며, 당신은 통제할 수 없습니다. 클라우드 모델에 의존하는 워크플로우가 제한되면 멈추거나 허둥지둥해야 합니다. 이를 피하는 유일한 방법은 자신의 컴퓨팅을 소유하는 것입니다.

기타 실용적 장점:

비용 예측성. API는 변동적입니다. 사용량이 급증하면 청구서도 따라 올라갑니다. 로컬 하드웨어는 하드웨어 구매비와 전기세가 전부입니다. 고정 비용이죠. 그 이후 모든 추론은 무료입니다.

지연 시간. 네트워크 왕복이 없어 일상 작업에서 더 빠른 응답을 얻습니다. M4 Pro의 미디어 엔진은 대부분의 프롬프트에서 즉각적으로 느껴지는 속도로 추론을 처리합니다.

오프라인 사용. 인터넷이 없어도 작동합니다. 백그라운드에서 돌아가는 에이전트 워크플로우에는 생각보다 중요합니다.

사용량 제한 없음. API 제공자는 사용량 임계값에 도달하면 제한하지만, 내 컴퓨터는 얼마나 돌리든 상관없습니다.

실제 사용 방법

맥 미니는 항상 켜져 있습니다. 책상에 놓여 있고 필요할 때 외에는 거의 신경 쓰지 않습니다. Hermes 역시 맥 미니에서 같은 머신의 로컬 모델을 사용해 실행됩니다. 폰의 텔레그램과 맥북의 Hermes 데스크톱 앱으로 에이전트에 접근합니다. Hermes 데스크톱 앱은 '셸' 역할을 하며 다른 기기(여기서는 맥 미니)의 Hermes 백엔드에 연결됩니다. 즉, 모든 기기에서 백엔드, 대화 기록, 스킬셋을 공유합니다.

그 외 활용: iOS의 Apollo는 일회성 빠른 채팅용입니다. Claude처럼 읽히지만 API 키나 구독이 필요 없는 것을 원했습니다. Apollo를 http://[mac-mini-tailnet-url]/v1에 연결하면 끝입니다. "이 문단 다시 써줘"나 "이 에러가 무슨 뜻이야" 같은 질문에 좋습니다. 맥의 Raycast는 뭔가 설치하고 싶지 않은 잡다한 작업용입니다. Pi는 코딩용으로, 이 설정도 이미 글을 썼습니다.

요점은 API 기반 모델을 대체하는 것이 아닙니다. GPT-5나 Claude Opus가 필요 없는 요청의 80%를 처리하는 것입니다. 필요할 때 그런 모델은 이미 사용 가능하죠. 로컬은 일상의 더 많은 부분을 무료로 처리해 줄 뿐입니다.

모델 구성

큰 모델을 로컬로 돌리는 것은 결국 한 가지, 실제 메모리에 얼마나 많은 RAM이 필요한가로 귀결됩니다. 대부분의 사람은 파라미터 수를 보고 잘못된 판단을 하는데, 밀집(dense) 모델과 [그 이하의 차이]...

원문 보기
원문 보기 (영어)
I run a local LLM server on my M4 Pro Mac mini with 48 GB of RAM. It handles everything from my Hermes agent backend to quick chat queries on my phone. The whole thing takes about 30 minutes to set up. Here is the stack: Qwen3.6-35B-A3B-OptiQ-4bit : my main model for anything that needs reasoning or depth Gemma-4-E4B-it-OptiQ-4bit : lightweight model for simple chats, formatting, and other routine tasks oMLX : the inference server Tailscale : tailnet connecting the Mac mini, my iPhone, and my MacBook Hermes runs as the agent backend on the Mac mini, with my MacBook running the desktop client and my phone running Telegram. For non-Hermes usage I use Apollo on iOS for quick chats (reads like Claude, good for throwaway questions), Pi as my coding agent ( I already wrote about that setup ), and Raycast AI on my Mac for random things. Why bother? The main reason to run local: cloud APIs are rented land. They can change their pricing, hit your usage limits, or swap the model being served behind the scenes whenever they feel like it. I was regularly maxing out two $200/month subscriptions and it felt like I was getting different things from them at different points. Sometimes a model was fine, sometimes it degraded with no notice. Data privacy is another issue. You do not know what these companies do with your data once they have it. They might limit how it gets used, they might sell it, they might expose it. Either way, it creates an operational security risk. If you work with sensitive code, client data, or proprietary workflows, sending it to a third-party API is a decision you make once and cannot undo. Then there is AI sovereignty. I have been watching how the US government has limited the rollout of various models. That can happen at any point from any government, for any reason, and you have no control over it. If your workflow depends on a cloud model that gets restricted, you have to stop or scramble. The only way to avoid that is to own your compute. Other practical advantages: Cost predictability. APIs are variable. Your usage spikes and your bill follows. With local hardware, the cost is the hardware purchase plus electricity. Flat. After that, every inference is free. Latency. No network roundtrip means faster responses for everyday tasks. The M4 Pro’s media engine handles inference at speeds that feel instant for most prompts. Offline capability. No internet, still works. For agent workflows that run in the background, this matters more than it sounds. No rate limits. API providers throttle you when you hit usage thresholds. Your own machine does not care how much you run. How I actually use it The Mac mini is always on. It sits on my desk and I barely notice it except when I need it. Hermes runs on the Mac mini as well, using a local model on the same machine. I access my agent through Telegram (on my phone) and the Hermes desktop app on my MacBook. The Hermes desktop app acts as a ‘shell’ and connects to a Hermes backend on another device (in this case the Mac mini). This means I share a backend, conversation history, and skillset across all my devices. Then there is everything else: Apollo on iOS for quick throwaway chats. I want something that reads like Claude but does not require an API key or a subscription. Connect Apollo to http://[mac-mini-tailnet-url]/v1 and you are done. Good for “rewrite this paragraph” or “what does this error mean” type questions. Raycast also on my Mac for random things I don’t want to install anything for. Pi for coding. Already wrote about that setup . The point is not to replace API-based models. It is to handle the 80% of requests that do not need GPT-5 or Claude Opus. And when I do need those, they are already available. Local just covers more of my day-to-day for free. The model breakdown Running a large model locally comes down to one thing: how much RAM it actually needs in memory. Most people look at the parameter count and get the wrong idea, because the difference between dense and mixture-of-experts (MoE) models matters a lot on consumer hardware. Here is how to read the identifier: Qwen3.6-35B-A3B-OptiQ-4bit Qwen3.6 : model family and version 35B : total parameters across all experts A3B : active parameters per token (3 billion, not 35) OptiQ-4bit : mixed-precision quantization (4-bit mostly, 8-bit on sensitive layers) gemma-4-e4b-it-4bit gemma-4 : Google’s Gemma 4 family e4b : encoding size, roughly 4 billion parameters total it : instruction-tuned 4bit : uniform 4-bit quantization The key difference is the A3B part. A dense 27B model has 27 billion parameters loaded in RAM at all times, for every single token. An MoE model like the Qwen3.6-35B-A3B has 35 billion total parameters spread across 256 experts, but only about 3 billion are actually activated per token. The other 32 billion sit in RAM doing nothing. On my 48GB Mac mini, the Qwen3.6-35B-A3B in 4-bit takes about 20GB of RAM. That leaves 28GB for context windows, the operating system, and everything else running on the machine. The Gemma-4-E4B is roughly 2.4GB. Small enough to keep around for simple tasks where using the full 20GB model is overkill. My friend’s MacBook Air had 16GB total. A dense 27B in 4-bit needs roughly 14GB. That is literally everything the machine has, minus room for the OS. So it works for a moment, and then when it does not, it swaps to SSD and becomes painful. MoE changes this. The 35B model in my identifier would fit on the same MacBook because only 3B of weights are actually active per token, which means the GPU/Media Memory footprint is more like what a 6B dense model would need. The 35 billion total parameter weights all sit in unified memory. How to check if a model will work on your hardware: Look at the quantized file size first. A 4-bit model is roughly the number of parameters in gigabytes (35B params ≈ 17-20GB depending on the quantization method). Subtract your OS overhead. macOS takes about 6-8GB on Apple Silicon. Leave room for context windows. Every few thousand tokens adds megabytes to the KV cache. Plan for 8-16GB overhead if you expect long conversations. For MoE models, the total parameter count is misleading. Look for the “active parameters” figure to understand actual inference memory. If your model plus context still fits within your available unified memory with a 10-15% buffer, you are good. Anything closer to full will swap to SSD. Swapping models is easy This is the part nobody talks about. You can swap out your local models every few weeks as new ones drop. It is literally a download and a restart. The workflow: Download the new model into ~/models/ oMLX auto-discovers it from the model directory Pick it in the oMLX app or restart the server Done The oMLX admin dashboard has a built-in HuggingFace model browser. Find a model, click download. Change the model in Hermes, Pi, Raycast, and Apollo, and I am all done. A lot of this can be done via CLI too, so I can SSH into the Mac mini from any of my devices. Why this matters: the gap between local models and API models is closing fast. What was “meh” quality a year ago is competitive for most real-world tasks now. Coding, reasoning, tool use are where it matters. And the 4-bit quantization from OptiQ keeps quality surprisingly high. The 35B-A3B at 4-bit only loses about 1-2 points on most benchmarks compared to BF16 (16-bit floating point, the uncompressed baseline). That is an acceptable tradeoff for 48GB of memory usage instead of 70. The network Tailscale creates a mesh between all my devices. Mac mini, iPhone, MacBook, all on the same private network. Nothing exposed to the public internet. The oMLX server listens on port 8000. Any device on the tailnet can connect. Raycast, Apollo iOS, Hermes desktop on my MacBook, they all hit the same endpoint. No configuration drift between devices. oMLX’s KV cache persistence also matters on the tailnet setup. Coding agents repeatedly circle back through earlier context in a session. oMLX caches eac