Transparent unified-memory fit estimates for local AI models
Project description
๐ฉบ Mac AI Doctor
Will this AI model fit in your Apple Silicon Mac's unified memory?
maid reads small metadata filesโnever model weightsโand estimates weight, KV-cache, and runtime
memory as a range, then gives a plain verdict.
$ maid check ibm-granite/granite-switch-4.1-3b-preview --memory-gb 16
ibm-granite/granite-switch-4.1-3b-preview
โโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโ
โ Weights โ 8.80 GB โ
โ KV cache โ 0.34 GB โ
โ Runtime โ 1.31 GB โ
โ Peak range โ 11.49โ13.06 GB โ
โ Available โ 16.0 GB โ
โโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโ
โญโโโโโโโโโโโโโโโโโโโโโ TIGHT ยท high confidence โโโโโโโโโโโโโโโโโโโโโโโฎ
โ May fit, but close memory-heavy apps or reduce context/concurrency. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Install
Requires uv.
uv tool install mac-ai-doctor
Use
maid tui # interactive terminal UI
maid system # your chip and memory
maid check meta-llama/Llama-3.1-8B-Instruct # a Hugging Face model
maid check ~/Models/model-q4.gguf --context 8192 # a local GGUF
maid compare org/model-a org/model-b --concurrency 2 # side by side
maid recommend --memory-gb 16 --task coding # a starting point
maid check MODEL --json # machine-readable
Accepts a Hugging Face ID, a local .gguf file, or a local/MLX directory with config.json.
Options: --memory-gb N (required off macOS), --context, --concurrency,
--kv-dtype (fp32/fp16/bf16/int8/q8), --json. Tasks: coding, chat, vision.
Verdicts
| Verdict | Meaning |
|---|---|
| COMFORTABLE | High estimate โค 80% of memory. |
| TIGHT | Fits, but leaves < 20% headroom. |
| UNLIKELY | Exceeds memory. |
| UNKNOWN | Weight size unavailable. |
Confidence reflects metadata completeness, not prediction accuracy.
What it reads
Only bounded metadata: config.json, the safetensors index, and the model API's file-size
listingโor the 24-byte header of a local GGUF. Weight contents are never downloaded. No
credentials are collected.
How it estimates
Decimal GB. This is screening, not a benchmarkโverify with your actual runtime. No tokens/second prediction is made.
weights = stored_weight_bytes ร 1.06
KV = 2 ร layers ร KV_heads ร head_dim ร context ร concurrency ร dtype_bytes
runtime = max(1 GB, weights ร 12%) + 0.25 GB ร concurrency
range = subtotal ร 1.10 .. subtotal ร 1.25
Unified memory is shared with macOS, apps, and the GPU. Memory mapping can help; multimodal image encoders may add memory not shown in text config metadata.
Troubleshooting
- Can't detect memory โ pass
--memory-gb N(auto-detection needs macOS). - 401/403 or gated โ authenticate, or point at a downloaded
config.json. - No weight size โ use a repo with a safetensors index/API sizes, or a local GGUF (v2/v3).
Develop
git clone https://github.com/barvhaim/mac-ai-doctor.git && cd mac-ai-doctor
uv sync --group dev
uv run ruff check . && uv run mypy src && uv run pytest
See CONTRIBUTING.md. MIT licensed.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mac_ai_doctor-0.1.3.tar.gz.
File metadata
- Download URL: mac_ai_doctor-0.1.3.tar.gz
- Upload date:
- Size: 51.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1195b8c8b6dde948778b2119e54bc1dc00277e4d5ee0d64e374ac2fc147501ac
|
|
| MD5 |
00c8b67e76626b01471b14e035b85ce3
|
|
| BLAKE2b-256 |
1fece7a8937aedcf775f32eb72d8a4a62c6677f9414f690247a676d804651bef
|
File details
Details for the file mac_ai_doctor-0.1.3-py3-none-any.whl.
File metadata
- Download URL: mac_ai_doctor-0.1.3-py3-none-any.whl
- Upload date:
- Size: 13.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ea0823d83e1bdd2c16b066add63ac0787f6aefbc106740d6bd25bbc522cecc1
|
|
| MD5 |
48a1d72096c10c758bc1d7c6aac42fcf
|
|
| BLAKE2b-256 |
620e9a01533598ece9f695b71bd6d44ceffa61c7bb46fde699dc36e14ff194c4
|