Two macOS pitfalls in local AI deployment
A Juejin AI article describes two local deployment failures encountered by the author: Hugging Face’s HF_HOME pointed to an incomplete 163 MB external-drive cache instead of a complete 2.9 GB cache, causing faster-whisper-large-v3 to report an inability to open model.bin. It also reports a macOS per-process file-descriptor soft limit of 256, which caused “Too many open files” errors in an Ollama, Open WebUI, and ChromaDB stack, and recommends raising the limit through launchd configuration and ulimit.
The article gives local AI developers concrete diagnostic and remediation steps for two configuration issues that can resemble model corruption, network failures, or service outages.
本地部署大模型,真正的坑常不在模型本身,而在两处系统默认值:① 模型权重缓存目录指向错了——HF_HOME 指向外接盘一份 163 MB 下载中断的半成品,本机 2.9 GB 完整包不看,model.bin 于是 Unable to open file;② macOS 默认每进程文件描述符软上限只有 256,本地 AI 栈跑着跑着 Too many open files,服务连不上。两个坑我都实打实翻过车。
1. 坑一:模型权重缓存指向错了(HF_HOME / 外接盘)
路线 B(CPU 上的 faster-whisper-large-v3)第一次执行直接崩:RuntimeError: Unable to open file 'model.bin'。第一反应别急着"重新下载",先问程序到底在哪个目录找文件。
两份缓存,程序只看其中一份:
| 缓存位置 | 大小 | 状态 |
|---|---|---|
本机默认 ~/.cache/huggingface/hub | 2.9 GB | 完整,model.bin 在 |
HF_HOME 指向的外接盘缓存 | 163 MB | 残骸,只剩 *.incomplete |
#faster-whisper-large-v3#Hugging Face#Ollama#Open WebUI#ChromaDB#macOS