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 2 | Generation | By engine |
|---|---|---|
| 7B 3-bit | 46.4 t/smedian of 7, context not statedprompt 464.9 t/s (median of 7) | engine not stated |
| 7B 4-bit | 52.6 t/smedian of 6, context not statedprompt 506.2 t/s (median of 6) | engine not stated |
| 7B 2-bit | 49.5 t/smedian of 6, context not statedprompt 470.9 t/s (median of 6) | engine not stated |
| 7B 5-bit | 40.3 t/smedian of 3, context not statedprompt 428.6 t/s (median of 3) | engine not stated |
| 7B 16-bit | 23.2 t/sone report, context not statedprompt 603.1 t/s (one report) | engine not stated |
| 7B 8-bit | 40.4 t/sone report, context not statedprompt 547.3 t/s (one report) | engine not stated |
| 7B 6-bit | 39.0 t/sone report, context not statedprompt 444.3 t/s (one report) | engine not stated |
| 7B 1-bit | 53.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.
| Size | Q8_0 | Q6_K | Q5_K_M | Q4_K_M | Q3_K_M |
|---|---|---|---|---|---|
| 7B | 10.0 GBfits | 8.7 GBfits | 7.8 GBfits | 6.9 GBfits | 6.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.
- 7B · IQ1_S53.0 t/s
- 7B · IQ2_XXS50.5 t/s
- 7B · IQ2_XS48.4 t/s
- 7B · IQ2_S47.3 t/s
- 7B · Q2_K_S62.5 t/s
- 7B · IQ2_M38.4 t/s
- 7B · Q2_K51.6 t/s
- 7B · IQ3_XXS46.4 t/s
- 7B · IQ3_XS47.9 t/s
- 7B · Q3_K_S42.6 t/s
- 7B · IQ3_S47.7 t/s
- 7B · IQ3_M47.7 t/s
- 7B · Q3_K_M44.2 t/s
- 7B · Q3_K_L40.9 t/s
- 7B · IQ4_XS51.9 t/s
- 7B · IQ4_NL53.2 t/s
- 7B · Q4_061.4 t/s
- 7B · Q4_K_S52.0 t/s
- 7B · Q4_K_M49.2 t/s
- 7B · Q4_157.2 t/s
- 7B · Q5_K_S40.3 t/s
- 7B · Q5_K_M39.7 t/s
- 7B · Q5_141.9 t/s
- 7B · Q6_K39.0 t/s
- 7B · Q8_040.4 t/s
- 7B · F1623.2 t/s
- 7B · F3212.6 t/s
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.