← CanIRunLocal · All hardware · All models

Can a M1 8GB run Code Llama 7B?

Yes. Code Llama 7B fits in fast memory on M1 8GB at Q4_K_M (5 GB needed, 5.4 GB usable), about 13 tok/s (estimate).

Hardware: M1 8GB · Model: Code Llama 7B

M1 8GB has 8 GB of unified memory and 68 GB/s of memory bandwidth. The checker leaves macOS a share of unified memory, so Ollama can use 5.4 GB. Code Llama 7B (6.74B, Meta) at Q4_K_M is a 4.1 GB download and needs 5 GB with headroom for about 8k tokens.

Best quantQ4_K_M
Download size4.1 GB
Memory needed5 GB
Usable fast memory5.4 GB
Fitfits in fast memory
Estimated speed~13 tok/s (estimate)
Commandollama run codellama:7b-instruct-q4_K_M
Open M1 8GB in the checker

Estimates, not benchmarks. Model sizes are ollama.com download sizes; memory needed adds headroom for ~8k tokens of context; speeds are rough figures from memory bandwidth. Data updated 2026-10-23.

A project by OnDevice Labs · llms.txt