Free tools / LLM memory calculator / Llama 3.2 3B

Llama 3.2 3B VRAM and RAM requirements

Llama 3.2 3B needs about 3.4 GB of VRAM in Q4_K_M, the quantization Ollama downloads by default, at a 4K context, and about 18 GB at its full 128K context. The weights take about 1.9 GB and the rest is the context cache plus about 1 GB for the GPU runtime. On a CPU server without a GPU it needs about 3.9 GB of RAM at 4K.

Llama 3.2 3B is Meta's small instruct model, built to run on modest hardware.

Open Llama 3.2 3B in the calculator

Llama 3.2 3B memory by quantization and context

Memory Llama 3.2 3B needs for each quantization at 4K, 32K, 128K tokens of context. VRAM total adds about 1 GB for the GPU runtime, RAM total about 1.5 GB for the system and Ollama on a CPU server.

QuantizationContextWeightsKV cacheVRAM totalRAM total (CPU)
Q4_K_M4K1.9 GB0.5 GB3.4 GB3.9 GB
32K1.9 GB3.8 GB6.7 GB7.2 GB
128K1.9 GB15 GB18 GB18 GB
Q5_K_M4K2.3 GB0.5 GB3.8 GB4.3 GB
32K2.3 GB3.8 GB7.0 GB7.5 GB
128K2.3 GB15 GB18 GB19 GB
Q6_K4K2.6 GB0.5 GB4.1 GB4.6 GB
32K2.6 GB3.8 GB7.4 GB7.9 GB
128K2.6 GB15 GB19 GB19 GB
Q8_04K3.4 GB0.5 GB4.9 GB5.4 GB
32K3.4 GB3.8 GB8.2 GB8.7 GB
128K3.4 GB15 GB19 GB20 GB
FP164K6.4 GB0.5 GB7.9 GB8.4 GB
32K6.4 GB3.8 GB11 GB12 GB
128K6.4 GB15 GB22 GB23 GB

Weights are the parameter count times the bits per weight of each quantization, the KV cache comes from the layer and attention head counts in the model config at FP16, as Ollama stores it by default. The sizes match Ollama downloads within a few percent.

GPUs that fit Llama 3.2 3B

In Q4_K_M at 4K, the cheapest GPU server that holds Llama 3.2 3B is the A16 (16 GB) at about $0.658 an hour, generating about 87 tokens per second. A 24 GB card such as the L4 or A10 holds it in Q4_K_M even at the full 128K context. Unquantized FP16 needs about 7.9 GB, which starts at the A16 (16 GB).

Llama 3.2 3B setupVRAM neededCheapest GPU servers that fit
Q4_K_M at 4K3.4 GB
  • A16 16 GB, $0.658/hr, about 87 tok/s
  • RTX 4000 Ada 20 GB, $0.726/hr, about 157 tok/s
  • L4 24 GB, $1.16/hr, about 131 tok/s
Q4_K_M at 128K18 GB
  • RTX 4000 Ada 20 GB, $0.726/hr, about 157 tok/s
  • L4 24 GB, $1.16/hr, about 131 tok/s
  • A10 24 GB, $1.17/hr, about 214 tok/s
Q8_0 at 4K4.9 GB
  • A16 16 GB, $0.658/hr, about 50 tok/s
  • RTX 4000 Ada 20 GB, $0.726/hr, about 90 tok/s
  • L4 24 GB, $1.16/hr, about 75 tok/s
FP16 at 4K7.9 GB
  • A16 16 GB, $0.658/hr, about 26 tok/s
  • RTX 4000 Ada 20 GB, $0.726/hr, about 48 tok/s
  • L4 24 GB, $1.16/hr, about 40 tok/s

Prices are for the cheapest city of each card, billed by the hour. Speed is generation with Ollama, estimated from memory bandwidth and our runs on the LLM speed benchmark. All cards are on the GPU servers page.

Running Llama 3.2 3B on a CPU server

Yes, a CPU-only server with 4 GB of RAM holds Llama 3.2 3B in Q4_K_M at 4K, since it needs about 3.9 GB. On 2 dedicated vCPU expect about 10 tokens per second, close to reading speed, fine for chat. On 2 shared vCPU it makes about 4.5 tokens per second. At the full 128K context the RAM need grows to about 18 GB.

CPU serverRAMTokens/s in Q4_K_MPrice
2 shared vCPUHetzner4 GBabout 4.5$10/mo$0.014/hr
2 dedicated vCPUOVHcloud16 GBabout 10$83/mo$0.114/hr

Llama 3.2 3B in Ollama

ollama run llama3.2:3b downloads the Q4_K_M build. Every quantization in the table has its own tag, listed next to its row.

  • Q4_K_Mollama run llama3.2:3b
  • Q5_K_Mollama run llama3.2:3b-instruct-q5_K_M
  • Q6_Kollama run llama3.2:3b-instruct-q6_K
  • Q8_0ollama run llama3.2:3b-instruct-q8_0
  • FP16ollama run llama3.2:3b-instruct-fp16

What to know about Llama 3.2 3B

  • At 128K the context cache (about 15 GB) outgrows the Q4_K_M weights (about 1.9 GB). Raise num_ctx only as far as your prompts need.

Frequently asked questions

How much VRAM does Llama 3.2 3B need?

About 3.4 GB in Q4_K_M at a 4K context, about 4.9 GB in Q8_0 and about 7.9 GB in FP16. The cheapest GPU that holds it in Q4_K_M is the A16 (16 GB). A longer context adds more: about 18 GB in Q4_K_M at 128K.

Can Llama 3.2 3B run on a CPU without a GPU?

Yes, a CPU-only server with 4 GB of RAM holds Llama 3.2 3B in Q4_K_M at 4K, since it needs about 3.9 GB. On 2 dedicated vCPU expect about 10 tokens per second, close to reading speed, fine for chat. On 2 shared vCPU it makes about 4.5 tokens per second. At the full 128K context the RAM need grows to about 18 GB.

How much memory does Llama 3.2 3B need for a 128K context?

About 18 GB of VRAM or 18 GB of RAM in Q4_K_M. The context cache alone takes about 15 GB at 128K tokens, next to about 1.9 GB of weights. Ollama uses a 4K context unless you raise num_ctx, so the cache stays small by default.

Similar models

Further reading

VRAM and RAM for other models

Another model, quantization or context? Use the LLM VRAM and RAM calculator