llamaperf

Llama 2 on the M1 Max 64GB

On the M1 Max 64GB, Llama 2 7B at 3-bit generates a median 46.4 tokens per second, from 7 plain runs (context not stated).

Speed by size and quant on the M1 Max 64GB

Plain runs only: one card, one request, no speculative decoding, the whole model in memory. Each row is one model size at one bit class. Context length and build still differ between runs, and each row shows its own.

Llama 2GenerationBy engine
7B 3-bit46.4 t/smedian of 7, context not statedprompt 464.9 t/s (median of 7)engine not stated
7B 4-bit52.6 t/smedian of 6, context not statedprompt 506.2 t/s (median of 6)engine not stated
7B 2-bit49.5 t/smedian of 6, context not statedprompt 470.9 t/s (median of 6)engine not stated
7B 5-bit40.3 t/smedian of 3, context not statedprompt 428.6 t/s (median of 3)engine not stated
7B 16-bit23.2 t/sone report, context not statedprompt 603.1 t/s (one report)engine not stated
7B 8-bit40.4 t/sone report, context not statedprompt 547.3 t/s (one report)engine not stated
7B 6-bit39.0 t/sone report, context not statedprompt 444.3 t/s (one report)engine not stated
7B 1-bit53.0 t/sone report, context not statedprompt 499.1 t/s (one report)engine not stated

Memory Llama 2 needs on the M1 Max 64GB

The M1 Max 64GB gives a model 48 GB. Each figure is the memory a size reported on this card needs at one quant with an 8k context, cache and buffers included, from the VRAM calculator. It is for one card holding the whole model. Llama 2 memory on every card.

SizeQ8_0Q6_KQ5_K_MQ4_K_MQ3_K_M
7B10.0 GBfits8.7 GBfits7.8 GBfits6.9 GBfits6.0 GBfits

27 reports of Llama 2 on the M1 Max 64GB

Newest first. A run on several cards, with speculative decoding, with part of the model in system RAM or with batched requests says so, since each describes a different setup. 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.

Filter these reports on the homepage

Frequently asked

How fast is Llama 2 on the M1 Max 64GB?

On the M1 Max 64GB, Llama 2 7B at 3-bit generates a median 46.4 tokens per second, from 7 plain runs (context not stated).

Does Llama 2 fit on the M1 Max 64GB?

The M1 Max 64GB gives a model 48 GB. With an 8k context, the 7B model fits at Q8_0 (about 10.0 GB). The figures are the VRAM calculator's, for one card with the whole model in its memory.