Local AI hardware

Qwen2.5 7B, 14B and 32B VRAM budgets at 8K and 32K

For a single Qwen2.5 sequence at 8,192 tokens with a 16-bit KV cache, the idealized cache alone is about 0.44 GiB for 7B, 1.50 GiB for 14B and 2.00 GiB for 32B. Add your exact weight file and budget for compute buffers, runtime overhead and other GPU use. The final test is whether the runtime keeps the workload on the GPU at your chosen context length. [1] [2] [3] [4] [5]

What competes for the same available memory
  1. WeightsExact model and quantizationRead file size in bytes
  2. KV cacheModel architecture and contextEstimate and compare
  3. RuntimeBuffers, display and other tasksMeasure what remains
Calculated FP16 KV cache only, one sequence and 128 dimensions per head
Qwen2.5 InstructLayers × KV heads8,192 tokens32,768 tokens
7B28 × 40.44 GiB1.75 GiB
14B48 × 81.50 GiB6.00 GiB
32B64 × 82.00 GiB8.00 GiB

Reproduce the estimate for one sequence

Use two tensors, one for keys and one for values. Multiply 2 × layers × KV heads × head dimension × bytes per element × cached tokens. FP16 costs two bytes per element. These three configurations imply 128 dimensions per head from hidden size divided by attention heads. Divide bytes by 1,073,741,824 for GiB. Padding, runtime details and caching choices can change the actual allocation. [1] [2] [3]

Worked example: why the same 7B model can change behavior

Ollama lists a Qwen2.5 7B Q4_K_M artifact at approximately 4.7 GB, or about 4.38 GiB if interpreted as decimal GB. Adding the idealized FP16 cache gives roughly 4.82 GiB at 8,192 tokens or 6.13 GiB at 32,768, before buffers and other GPU use. Capture exact bytes from your own artifact for a purchase worksheet. Different quantizations change the weights. KV cache precision is a separate control, and its quality impact is workload-dependent. [6] [4]

Measure the boundary before buying a larger card

Run the same model and task at 8K and your intended longer context with one request at a time. Record the context and PROCESSOR columns from ollama ps after each load. Capture free GPU memory and generated-token rate with the same background apps. If the short case stays on GPU and the long case splits between CPU and GPU, choose whether the longer context or a different quantization solves a real task before using the result as a purchase requirement. [5] [4]

Put it into practice

Related guides

Sources

Source review . Research and writing prepared with AI assistance.

  1. Qwen2.5-7B-Instruct model configuration
  2. Qwen2.5-14B-Instruct model configuration
  3. Qwen2.5-32B-Instruct model configuration
  4. Ollama FAQ: device placement, concurrency and KV cache
  5. Ollama context length and placement
  6. Ollama Qwen2.5 7B Q4_K_M tag

Choose a part

Make it yours

Your hardware studio.

Saved in this browser. Your parts stay the same.