Can an RTX 3070 run Llama 3.1 8B Instruct?

Yes

Yes. At Q5_K_M it needs 7.17 GB of the 7.2 GB available and generates around 58.1 tokens per second at an 8k context window.

The numbers

Llama 3.1 8B Instruct has 8.03 billion parameters across 32 layers. The GeForce RTX 3070 has 8 GB of VRAM at 448 GB/s, of which about 7.2 GB is left for a model once the operating system has taken its share.

QuantisationTotal neededFitsSpeed
Q8_0 9.8 GB no
Q6_K 7.98 GB no
Q5_K_M 7.17 GB yes 58.1 t/s
Q4_K_M 6.37 GB yes 66.6 t/s
IQ4_XS 5.82 GB yes 73.9 t/s
Q3_K_M 5.51 GB yes 78.9 t/s
IQ3_XXS degraded 4.71 GB yes 95.2 t/s
Q2_K degraded 4.98 GB yes 88.9 t/s
IQ2_XXS degraded 3.78 GB yes 125.6 t/s

7 of the 9 levels fit. Levels marked degraded are listed for completeness, not as advice.

How long a conversation it holds

At Q5_K_M, memory rises with the length of the conversation because the attention cache keeps a key and value for every token. The longest window that still fits on this device is 8k tokens.

ContextCacheTotalFits
4k 0.5 GB 6.55 GB yes
8k 1 GB 7.17 GB yes
16k 2 GB 8.42 GB no
32k 4 GB 10.92 GB no
64k 8 GB 15.92 GB no
128k 16 GB 25.92 GB no

See how fast it feels

GeForce RTX 3070 running Llama 3.1 8B Instruct at Q5_K_M

Wait for the first word267 ms
Then writes at58.1 tok/s
Whole answer3.2 s

YouWhy does my model use more memory when the conversation gets longer?

Model

Because of the KV cache. Every token you send leaves behind a key and a value vector in each layer of the model, and those stay in memory for as long as the conversation lasts.

The weights are a fixed cost: load a 4-bit 8B model and that is about 4.8 GB, whether you write one word or ten thousand. The cache is the part that grows, and it grows in a straight line with the number of tokens in the window.

How steeply depends on the model's attention design. With grouped-query attention, several query heads share one key-value pair, which cuts the cache by that ratio. Without it, every head keeps its own, and a long context can cost more memory than the weights themselves.

If you are short on memory, the first thing to try is lowering the context window in your runtime, not the quantisation.

Simulated from our estimate at a 512-token question, not a recording. Assumes nothing else is competing for the GPU. The same answer on RTX 4090 at Q8_0 would take about 1.9 s.

Keep going

Everything the GeForce RTX 3070 runs, the full breakdown for Llama 3.1 8B Instruct, or check a different pairing in the calculator.