llamaperf

Llama 3.1 8B

on M4 16GB · llama.cpp

Apple hardware
Oct 12, 2026
Throughput
21.0 t/s gen · 229.2 tokens/s prompt processing (prefill)Prompt processing is how fast the input is read, not how long you wait for the first word. How to measure time to first token.
Quant
Q4_K_M (GGUF)
System RAM
16 GB

Summary

User reports Llama 3.1 8B at 21 t/s generation and 229.2 t/s prompt processing on an M4 16GB Mac mini. Setup is llama.cpp 0.4.0 with Q4_K_M and Metal, all layers on GPU; context, KV precision and Flash Attention are unknown. The figures come from separate llama-bench tests, pp512 at 229.23 ±0.08 t/s and tg128 at 20.95 ±0.02 t/s over three runs, not a combined 512-input/128-output completion, with 10.29 GiB RAM already in use.

Download this model

Llama 3.1 8B on Hugging Face in the quant this report ran, Q4_K_M. The report doesn't say whose upload it used, so these are the most downloaded ones.

Compare this run

Medians of plain runs: one device, one request, no speculative decoding, the whole model in the device's memory. The report above is one setup, so read it beside them and not as one of them.

Llama 3.1 8B at 4-bit by hardware

Bars are medians on one scale, 0 to 1.5 tokens/s. Press ▶ to watch text arrive at a row's speed.

Models most run on the M4 16GB

Bars are medians on one scale, 0 to 64.0 tokens/s. Each dot is one run and opens its report. Press ▶ to watch text arrive at a row's speed.

Everything reported on the M4 16GB →Every Llama 3.1 report →Estimate Llama 3.1 on this card →