text model · Llama · macOS
Can I run Llama 3.1 8B on Apple M4 (24GB)?
Yes. Llama 3.1 8B runs on Apple M4 (24GB) at Q4_K_M (~6.4 GB of ~16 GB usable).
Runs at Q4_K_M using ~6.4 GB of ~16 GB usable. You have room for Q8_0 for higher quality.
That figure is at a 4k context and moves about ±15% as context length changes. Apple M4 (24GB) leaves ~9.6 GB of headroom, room to step up to Q8_0 for higher quality.
- Q4_K_M needed
- ~6.4 GB
- Usable on device
- ~16 GB
- Device memory
- 24 GB
- Best quant
- Q4_K_M
Which quant fits
Running cost · estimate
- Power draw
- ~65 W
- Electricity / 1M tokens
- ~$0.14
- Pays for itself after
- ~3,608M tok
At ~$0.15/kWh and the estimated ~20 tok/s, a million generated tokens costs about $0.14 in electricity. Versus a hosted API at ~$0.5 per million tokens, the ~$1,299 Apple M4 (24GB) pays for itself after roughly 3,608 million tokens, so local hardware is mostly a fixed cost, not a per-token one. TDP is the peak draw, so this is an upper bound. Assumptions.
Run it
Pick your tool. All 3 load the same Q4_K_M weights.
ollama run llama3.1:8b llama-cli -hf bartowski/Meta-Llama-3.1-8B-Instruct-GGUF:Q4_K_M lms get bartowski/Meta-Llama-3.1-8B-Instruct-GGUF - Parameters
- 8B
- Q4_K_M size
- 4.92 GB
- Q8_0 size
- 8.54 GB
- Context
- 128k
- Ollama tag
- llama3.1:8b
- Memory
- 24 GB unified
- Usable for weights
- ~16 GB
- Power draw
- ~65 W
- Best runtime
- Ollama (MLX backend, preview) / MLX direct
You could also run
Run Llama 3.1 8B on other hardware
FAQ
Can Apple M4 (24GB) run Llama 3.1 8B?
Yes. Llama 3.1 8B runs on Apple M4 (24GB) at Q4_K_M (~6.4 GB of ~16 GB usable).
How much memory does Llama 3.1 8B need?
Apple M4 (24GB) has room to spare. At Q4_K_M the weights are ~4.92 GB; with KV cache and runtime overhead, budget ~6.4 GB at a 4k context.
What is the best tool to run Llama 3.1 8B on macOS?
LM Studio for a simple setup; mlx-lm for the most speed. vLLM is NOT a Mac tool, it is a CUDA/Linux serving engine. Unified memory is not a fixed VRAM slice; ~70% is usable for weights.
Embed this
[](https://localmodel.run/can-i-run/llama-3.1-8b/apple-m4-24gb) Sources
- apple.com
- developer.apple.com
- github.com/ml-explore
- github.com/raullenchai
- gorilla.cs.berkeley.edu
- huggingface.co
- lmarena.ai
- lmstudio.ai
- ollama.com/library/llama3.1
- ollama.com/library/llama3.1/tags
- stencel.io
- support.apple.com/en-us/103253
- support.apple.com/en-us/121555
- support.apple.com/en-us/122209
Weights are measured from GGUF files; KV cache and overhead are computed, so totals can vary ~15% with context and runtime. Any tok/s is a bandwidth estimate. See methodology.