Meta · 8.0B · Q4_K_M · 4.58 GiB

Llama 3.1 8B Instruct at Q4_K_M needs about 6.39 GiB at 8K context, and the smallest listed machine that fits it is GeForce RTX 3060 Ti.

8B dense instruct model and the usual baseline for a gaming PC.

ollama run llama3.1:8b

Weights: Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf. Architecture: config source. Hugging Face repo created 2024-07-18. License field: llama3.1.

Quants with a measured file size

QuantFileSize
Q4_K_M · recommendedMeta-Llama-3.1-8B-Instruct-Q4_K_M.gguf4.58 GiB
Q5_K_MMeta-Llama-3.1-8B-Instruct-Q5_K_M.gguf5.34 GiB
Q6_KMeta-Llama-3.1-8B-Instruct-Q6_K.gguf6.14 GiB
Q8_0Meta-Llama-3.1-8B-Instruct-Q8_0.gguf7.95 GiB

Machines

Same quant and 8,192 tokens on every row.
MachineMemoryTotalVerdictSpeed
Apple M1, 8 GB8 GB unified6.39 GiBNo—
Apple M2, 8 GB8 GB unified6.39 GiBNo—
Apple M3, 8 GB8 GB unified6.39 GiBNo—
GeForce RTX 3060 Ti8 GB GDDR6.39 GiBFits41–73 tok/s
GeForce RTX 30708 GB GDDR6.39 GiBFits41–73 tok/s
GeForce RTX 40608 GB GDDR6.39 GiBFits25–44 tok/s
GeForce RTX 4060 Ti 8GB8 GB GDDR6.39 GiBFits26–47 tok/s
GeForce RTX 50608 GB GDDR6.39 GiBFits41–73 tok/s
GeForce RTX 5060 Ti 8GB8 GB GDDR6.39 GiBFits41–73 tok/s
Radeon RX 66008 GB GDDR66.39 GiBFits21–36 tok/s
Radeon RX 76008 GB GDDR66.39 GiBFits26–47 tok/s
GeForce RTX 3080 10GB10 GB GDDR6.39 GiBFits70–124 tok/s
GeForce RTX 3060 12GB12 GB GDDR6.39 GiBFits33–59 tok/s
GeForce RTX 407012 GB GDDR6.39 GiBFits46–82 tok/s
GeForce RTX 4070 Super12 GB GDDR6.39 GiBFits46–82 tok/s
GeForce RTX 4070 Ti12 GB GDDR6.39 GiBFits46–82 tok/s
GeForce RTX 507012 GB GDDR6.39 GiBFits62–109 tok/s
Intel Arc B58012 GB GDDR66.39 GiBFits42–74 tok/s
Radeon RX 6700 XT12 GB GDDR66.39 GiBFits35–62 tok/s
Radeon RX 7700 XT12 GB GDDR66.39 GiBFits40–70 tok/s
Apple M1 Pro, 16 GB16 GB unified6.39 GiBFits18–33 tok/s
Apple M1, 16 GB16 GB unified6.39 GiBFits6–11 tok/s
Apple M2 Pro, 16 GB16 GB unified6.39 GiBFits18–33 tok/s
Apple M2, 16 GB16 GB unified6.39 GiBFits9–16 tok/s
Apple M3, 16 GB16 GB unified6.39 GiBFits9–16 tok/s
Apple M4, 16 GB16 GB unified6.39 GiBFits11–20 tok/s
GeForce RTX 4060 Ti 16GB16 GB GDDR6.39 GiBFits26–47 tok/s
GeForce RTX 4070 Ti Super16 GB GDDR6.39 GiBFits62–109 tok/s
GeForce RTX 408016 GB GDDR6.39 GiBFits66–117 tok/s
GeForce RTX 4080 Super16 GB GDDR6.39 GiBFits68–120 tok/s
GeForce RTX 5060 Ti 16GB16 GB GDDR6.39 GiBFits41–73 tok/s
GeForce RTX 5070 Ti16 GB GDDR6.39 GiBFits82–146 tok/s
GeForce RTX 508016 GB GDDR6.39 GiBFits88–156 tok/s
Intel Arc A770 16GB16 GB GDDR66.39 GiBFits47–83 tok/s
Legion Go16 GB LPDDR5X-75006.39 GiBFits11–20 tok/s
Radeon RX 6800 XT16 GB GDDR66.39 GiBFits47–83 tok/s
Radeon RX 7800 XT16 GB GDDR66.39 GiBFits57–101 tok/s
Radeon RX 9060 XT 16GB16 GB GDDR66.39 GiBFits29–52 tok/s
Radeon RX 9070 XT16 GB GDDR66.39 GiBFits59–104 tok/s
ROG Ally16 GB LPDDR5-64006.39 GiBFits9–17 tok/s
Steam Deck LCD16 GB LPDDR5-55006.39 GiBFits8–14 tok/s
Steam Deck OLED16 GB LPDDR5-64006.39 GiBFits9–17 tok/s
Apple M3 Pro, 18 GB18 GB unified6.39 GiBFits14–24 tok/s
Radeon RX 7900 XT20 GB GDDR66.39 GiBFits73–130 tok/s
Apple M2, 24 GB24 GB unified6.39 GiBFits9–16 tok/s
Apple M3, 24 GB24 GB unified6.39 GiBFits9–16 tok/s
Apple M4 Pro, 24 GB24 GB unified6.39 GiBFits25–44 tok/s
Apple M4, 24 GB24 GB unified6.39 GiBFits11–20 tok/s
GeForce RTX 309024 GB GDDR6.39 GiBFits86–152 tok/s
GeForce RTX 409024 GB GDDR6.39 GiBFits92–164 tok/s
Radeon RX 7900 XTX24 GB GDDR66.39 GiBFits88–156 tok/s
ROG Ally X24 GB LPDDR5X-75006.39 GiBFits11–20 tok/s
Apple M1 Max, 32 GB32 GB unified6.39 GiBFits37–65 tok/s
Apple M1 Pro, 32 GB32 GB unified6.39 GiBFits18–33 tok/s
Apple M2 Max, 32 GB32 GB unified6.39 GiBFits37–65 tok/s
Apple M2 Pro, 32 GB32 GB unified6.39 GiBFits18–33 tok/s
Apple M4, 32 GB32 GB unified6.39 GiBFits11–20 tok/s
GeForce RTX 509032 GB GDDR6.39 GiBFits164–291 tok/s
Apple M3 Pro, 36 GB36 GB unified6.39 GiBFits14–24 tok/s
Apple M4 Max 14-core, 36 GB36 GB unified6.39 GiBFits38–67 tok/s
Apple M3 Max 16-core, 48 GB48 GB unified6.39 GiBFits37–65 tok/s
Apple M4 Max 16-core, 48 GB48 GB unified6.39 GiBFits50–89 tok/s
Apple M4 Pro, 48 GB48 GB unified6.39 GiBFits25–44 tok/s
Apple M1 Max, 64 GB64 GB unified6.39 GiBFits37–65 tok/s
Apple M2 Max, 64 GB64 GB unified6.39 GiBFits37–65 tok/s
Apple M3 Max 16-core, 64 GB64 GB unified6.39 GiBFits37–65 tok/s
Apple M4 Max 16-core, 64 GB64 GB unified6.39 GiBFits50–89 tok/s
Apple M4 Pro, 64 GB64 GB unified6.39 GiBFits25–44 tok/s
Apple M2 Max, 96 GB96 GB unified6.39 GiBFits37–65 tok/s
Apple M3 Max 16-core, 128 GB128 GB unified6.39 GiBFits37–65 tok/s
Apple M4 Max 16-core, 128 GB128 GB unified6.39 GiBFits50–89 tok/s

Exact answers

GeForce RTX 3060 12GBfitsGeForce RTX 4060fitsGeForce RTX 4070fitsGeForce RTX 5070fitsIntel Arc B580fitsSteam Deck OLEDfitsApple M4, 16 GBfits

FAQ

Why Q4_K_M?

Q4_K_M is the quant this page recommends. The file is Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf at 4.58 GiB. Other single-file quants are in the table when a real size was available.

Where do the architecture numbers come from?

GGUF metadata. head_dim is embedding_length / head_count (4096 / 32). Meta's config.json is access-gated. Source: https://huggingface.co/bartowski/Meta-Llama-3.1-8B-Instruct-GGUF/blob/main/Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf

Does this include a long context?

The fit uses 8,192 tokens, or less when that is all the fast memory can hold. The model file allows up to 131,072 tokens, and KV cache grows as you use more of that.

What is the Ollama command?

ollama run llama3.1:8b. The library tag is Q4-class or the vendor quant. Compare it with the GGUF linked on this page before you treat the sizes as identical.