Tokrix

Local LLM GPU & VRAM Calculator

Calculate Weights + KV Cache VRAM, check GPU fit, estimate tok/s, and compare buying vs cloud rental.

Local Model Configuration

Quantization
Q4_K_M (~4.6 bit) · Best speed/VRAM balance
Context Window
Total Required VRAM
22.3 GB
Weights: 18.6GB
KV Cache: 2.0GB
Overhead: 1.7GB

GPU Fit, Speed & Buy vs Cloud

4h/day (120h/mo)
GPUStatusEst. tok/sCloud/moBuy ROI
RTX 3060 12GB
12GB · $280
OOM-$1716.7m
RTX 3090 24GB
24GB · $750
Tight33 t/s$2926.0m
RTX 4090 24GB
24GB · $1,850
Tight35 t/s$4739.5m
RTX 5090 32GB
32GB · $2,400
Fits63 t/s$9525.3m
Mac Studio M2/M4 Max 64GB
48GB · $2,600
Fits19 t/s$7833.3m
Mac Studio Ultra 128GB
96GB · $4,200
Fits28 t/s$13231.8m
NVIDIA A100 80GB
80GB · $14,500
Fits71 t/s$15593.7m
NVIDIA H100 80GB
80GB · $28,000
Fits117 t/s$28797.6m

Local LLM Hardware Sizing Rules

VRAM Breakdown

  • Model Weights = Params (B) x Bytes/Param (Q4_K_M ~0.58GB/B, Q8_0 ~1.06GB/B, FP16 ~2.0GB/B).
  • KV Cache grows with context length (4K to 128K) and concurrent batch size.
  • Keep total usage under 88% of GPU VRAM to avoid CUDA out-of-memory crashes.

Token Speed & Cloud vs Buy

  • Single-user generation speed (tok/s) is bottlenecked by GPU memory bandwidth.
  • MoE models (like 109B/17B active) need VRAM for all weights but run at 17B speed.
  • Renting cloud GPUs wins below ~4-6 hours/day; buying pays back faster for 24/7 workloads.

GPU VRAM FAQ

Can an RTX 4090 24GB run a 32B model?

Yes at Q4_K_M (~18.6GB weights) with 4K to 8K context. Pushing context to 32K+ or Q6_K will exceed 24GB.

Why is Mac Studio popular for 70B+ local LLMs?

Unified memory (64GB to 128GB) lets you fit 70B Q4/Q8 models on a single machine at lower cost than dual A100s, though at lower tok/s.

What does 'Tight' status mean?

Required VRAM sits between 88% and 100% of total GPU memory. It may load but can OOM if OS desktop apps consume VRAM.

How is estimated tok/s calculated?

Estimated tok/s = (GPU Memory Bandwidth x 0.65 efficiency) / Active Model Weight Size in GB.