CodeLlama 7B HF on Mac mini M4 Pro 48 GB: VRAM, speed and fit
CodeLlama 7B HF at 8-bit runs on the M4 Pro 48 GB with 16K of context at about 29 tokens a second.
Text generation · Chat · Ollama / LM Studio
Runs comfortably · on M4 Pro 48 GB · 8-bit (Q8_0) · Ollama / LM Studio · Chat
- GPU memory
- 27.1 GB
- of 48.0 GB
- Context
- 16K
- auto
- Speed
- 29 tok/s
- 14 when full
- First reply
- 4.6 s
- 2K prompt
Where the memory goes
- Model
- 6.7 GB
- Context
- 8.0 GB
- Overhead
- 447 MB
- OS
- 12.0 GB
- Free
- 20.9 GB
- Memory
- 27.1 GB of 48.0 GB
- Context
- 16K tokens · auto
- Speed
- 29 tok/s · 14 when full
- First reply
- 4.6 s for a 2K prompt
- Running cost
- $1.84/mo at home · $29/mo on a cloud RTX 2000 Ada
Validation: Validated with conditions
| Check | Target | Result | Status |
|---|---|---|---|
| Fits in GPU memory | 36.0 GB usable | 15.1 GB needed | Pass |
| Headroom | 5% free | 20.9 GB free (58%) | Pass |
| Context for chat | 16K or more | 16K | Pass |
| Writing speed | 15 tok/s or more | 29 tok/s | Pass |
| First reply | under 3 s, 2K prompt | 4.6 s | Check |
Targets: a reply you can read along with, a first reply the use case tolerates, and 5% of memory left free. Calculated from published specs, not benchmarked.
The setup
- Model
- CodeLlama 7B HF
- Parameters
- 6.7B
- Precision
- 8-bit (Q8_0)
- Context
- 16K, auto
- Chats at once
- 1
- Use
- Chat
- Runs in
- Ollama / LM Studio
- Hardware
- M4 Pro 48 GB
- GPU can use
- 36.0 GB of 48.0 GB
Running cost
- At home
- $1.84/mo
- 84 W at the wall
- Renting instead
- $29/mo
- RTX 2000 Ada at $0.24/h
4 h a day, power at $0.18 per kWh, cloud at RunPod on-demand prices as of Nov 22, 2026.
How to run it
- llama.cpp
llama-server -hf TheBloke/CodeLlama-7B-GGUF- vLLM
vllm serve codellama/CodeLlama-7b-hf- MLX (Mac)
mlx_lm.chat --model mlx-community/CodeLlama-7b-hf-4bit-mlx- Model card
- huggingface.co/codellama/CodeLlama-7b-hf
CodeLlama 7B HF on similar machines
- Mac mini M4 16 GBJust misses
- Mac mini M4 24 GBRuns
- Mac mini M4 32 GBRuns
- Mac mini M4 Pro 24 GBRuns
- Mac mini M4 Pro 64 GBRuns
- M4 Max 128 GBRuns
- M5 Max 128 GBRuns
- M3 Ultra 96 GBRuns
All machines: CodeLlama 7B HF VRAM requirements. Everything that runs here: what can the Mac mini M4 Pro 48 GB run?
Other models that run on Mac mini M4 Pro 48 GB
Questions
Can CodeLlama 7B HF run on Mac mini M4 Pro 48 GB?
CodeLlama 7B HF at 8-bit runs on the M4 Pro 48 GB with 16K of context at about 29 tokens a second.
Report VR-0Q5IN70, calculated Nov 22, 2026 from published specs, not benchmarked.