agentleFS
quochuydevquochuydev/kit/skills/mac-llm-fit/SKILL.md

mac-llm-fit

Skill0 starsChanged 8 months agoMITView on GitHub

Estimate the minimum Mac (mini or MacBook) needed to run a local LLM. Use when the user shares a Hugging Face model URL, asks "can my Mac run this model", or wants to size unified memory for a specific quantization.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the user gives a URL, fetch it with WebFetch and extract: parameter count, architecture, available quantizations, and file sizes.

    line 13
  2. Distinctive:

    If only a parameter count is known, estimate sizes from the table below.

    line 14
  3. Distinctive:

    If the model is too large for any reasonable Mac (e.g.

    line 72
  4. Distinctive:

    Don't fabricate prices. Give a rough USD range or omit if uncertain.

    line 74

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Mac LLM Fit

Given a model (Hugging Face URL, model card, or "{N}B parameters"), report the minimum Apple-Silicon Mac configuration that can run it locally at each quantization level.

Process

  1. If the user gives a URL, fetch it with WebFetch and extract: parameter count, architecture, available quantizations, and file sizes.
  2. If only a parameter count is known, estimate sizes from the table below.
  3. Apply the memory math (see Rules) and pick the cheapest Mac that fits each quant.
  4. Produce the output below. Keep it terse — this is a quick-check skill.

Output Format

**Model:** {name} — {N}B params, {architecture}

**Memory needs by quant:**

| Quant     | Weights size | Min unified memory | Notes               |
|-----------|--------------|--------------------|--------------------|
| Q4_K_M    | ~{x} GB      | {16/24/32/48/64} GB | {context budget}   |
| Q8_0      | ~{x} GB      | ...                 | ...                |
| BF16/FP16 | ~{x} GB      | ...                 | ...                |

**Cheapest viable Mac per quant:**
- Q4: {Mac model + RAM} — ~${price}
- Q8: {Mac model + RAM} — ~${price}
- BF16: {Mac model + RAM} — ~${price}

**Recommendation:** {one-line pick — which Mac for which use case}

**Tools to run it:** {LM Studio / Ollama / llama.cpp / MLX — pick what fits}

Rules

Memory math

  • Weights size ≈ params × bytes-per-param. Bytes-per-param: BF16/FP16 = 2, FP8/Q8 = 1, Q5 ≈ 0.7, Q4 ≈ 0.55, Q3 ≈ 0.45.
  • macOS reserves system memory; only ~67–75% of unified RAM is GPU-accessible by default. Add 6–8 GB headroom above weights for KV cache, context, and OS.
  • Practical minimum unified memory ≈ weights_size × 1.5 (rounds up to next Mac SKU: 16 / 24 / 32 / 36 / 48 / 64 / 96 / 128 GB).
  • For long context (>8k tokens) or batch inference, add another 4–8 GB.

Parameter-count quick table (Q4_K_M / Q8_0 / BF16 weights)

ParamsQ4Q8BF16
3B~2 GB~3 GB~6 GB
7B~4 GB~7.5 GB~14 GB
8B~5 GB~8.5 GB~16 GB
9B~5.5 GB~9.5 GB~18 GB
13B~8 GB~14 GB~26 GB
22B~13 GB~23 GB~44 GB
32B~19 GB~34 GB~64 GB
70B~40 GB~75 GB~140 GB

Mac SKU reference (current Apple Silicon lineup)

  • Mac mini M4: 16 / 24 / 32 GB
  • Mac mini M4 Pro: 24 / 48 / 64 GB
  • MacBook Air M4: 16 / 24 / 32 GB
  • MacBook Pro M4 Pro: 24 / 48 GB
  • MacBook Pro M4 Max: 36 / 48 / 64 / 128 GB
  • Mac Studio M4 Max / Ultra: up to 192 GB
  • Pick the cheapest tier that meets the practical minimum. Prefer Mac mini for desk use, MacBook Pro if portability matters.

Style

  • Be terse — the user wants a fast answer, not a teardown.
  • If the model is too large for any reasonable Mac (e.g. 70B BF16 needs 192 GB), say so plainly and suggest a smaller quant.
  • Mention Apple Silicon-native runtimes (MLX, llama.cpp Metal, LM Studio, Ollama) — don't recommend CUDA-only tools.
  • Don't fabricate prices. Give a rough USD range or omit if uncertain.

Example

**Model:** Llama-3.1-8B-Instruct — 8B params, Llama 3 architecture

**Memory needs by quant:**

| Quant     | Weights size | Min unified memory | Notes                         |
|-----------|--------------|--------------------|-------------------------------|
| Q4_K_M    | ~5 GB        | 16 GB              | Fine for 4–8k context         |
| Q8_0      | ~8.5 GB      | 24 GB              | Comfortable headroom          |
| BF16      | ~16 GB       | 32 GB              | Needs M4 Pro tier+            |

**Cheapest viable Mac per quant:**
- Q4: Mac mini M4 16 GB — ~$599
- Q8: Mac mini M4 24 GB — ~$799
- BF16: Mac mini M4 Pro 48 GB — ~$1,999

**Recommendation:** Mac mini M4 24 GB is the sweet spot — runs Q8 with room for context.

**Tools to run it:** LM Studio or Ollama (both auto-pick Metal-accelerated builds).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.