Cloudek.Request a service session

AI operations

LLM Hardware Sizing: GPUs, VRAM and Quantization for 7B, 32B and 70B

Estimate offline LLM GPU memory from parameter count, weight precision, KV cache and runtime headroom; use assumptions as a planning example, not a guarantee.

Size the workload, not the parameter label

LLM hardware sizing begins with available GPU VRAM, model weights, context cache and the other local inference hardware constraints on the actual target host.

“7B,” “32B” and “70B” describe approximate parameter counts. They do not tell you how much GPU memory your deployed workflow will use. Weight precision and quantization matter, but so do the model architecture, context window, KV cache, batch size, runtime workspace, parallel requests and the graphics stack. A useful estimate makes those assumptions explicit and is then replaced by a measured result from the exact host.

This guide is one spoke in the offline LLM automation hub. It pairs with the three-runtime comparison and the n8n plus Ollama workflow guide. Use the cost worksheet to include hardware operations, not only the model file.

Begin with a lower-bound calculation

For a first estimate, multiply the parameter count by bytes per parameter. Nominal storage assumptions are roughly 0.5 bytes per parameter for 4-bit weights, 1 byte for 8-bit, and 2 bytes for 16-bit. These are arithmetic approximations, not exact sizes: quantization formats include metadata, and model files may have different parameter counts or mixed precision.

Approximate model sizeNominal 4-bit weight bytesNominal 8-bit weight bytesNominal 16-bit weight bytes
7 billion parameters3.5 GB7 GB14 GB
32 billion parameters16 GB32 GB64 GB
70 billion parameters35 GB70 GB140 GB

This table counts only nominal weights using decimal GB. It does not say what a specific runtime will allocate, whether an exact model is offered in that format, or whether the application can use it efficiently. It leaves out KV cache, temporary buffers, CUDA or other backend workspace, driver allocations, display use and co-located services. Think of it as the start of a budget, never the purchase specification.

An explicit planning example

To show how assumptions change a plan, the next table adds two deliberately simple reserves: runtime workspace equal to 20% of nominal weight bytes, and an 8 GB KV-cache allowance. The 8 GB value is only a scenario placeholder; it is not a claim that every model needs, or can use, that amount. Cache demand depends on the architecture, context length, precision and number of simultaneous sequences. Substitute a measured value from your own target workload.

ModelWeights+20% runtime reserve+8 GB illustrative cacheApproximate planning budget
7B, 4-bit3.5 GB0.7 GB8 GB12.2 GB
7B, 8-bit7 GB1.4 GB8 GB16.4 GB
7B, 16-bit14 GB2.8 GB8 GB24.8 GB
32B, 4-bit16 GB3.2 GB8 GB27.2 GB
32B, 8-bit32 GB6.4 GB8 GB46.4 GB
32B, 16-bit64 GB12.8 GB8 GB84.8 GB
70B, 4-bit35 GB7 GB8 GB50 GB
70B, 8-bit70 GB14 GB8 GB92 GB
70B, 16-bit140 GB28 GB8 GB176 GB

The formula is nominal weights × 1.20 + assumed cache. It excludes display memory, filesystem cache, other GPU processes, and any safety margin beyond the chosen 20%. It can overstate cache for a short single request or understate it for longer context and concurrent jobs. The table is an example for planning a measurement, not a minimum GPU specification or vendor benchmark.

Why the context window changes the answer

The key/value cache grows with the tokens held in the active context and the number of sequences being processed. A short classification prompt can use much less cache than a long transcript or document summary. Parallel requests can multiply concurrent cache requirements. Runtime policies may also reserve memory before all of it is used. Record prompt size, context setting, generated tokens, concurrent jobs and any batching when capturing a peak.

Do not size from the configured maximum context alone or from an average request alone. Test one short case, a typical case, and the largest allowed case. Then run the expected parallel workload. If users can attach long documents or the workflow aggregates history, put an enforced input limit in place so a single request cannot unexpectedly push the model over budget.

Quantization is a quality and capacity trade-off

Quantization stores weights in fewer bits to lower the weight-memory requirement. A 4-bit model may fit a device that cannot hold the same model in 8-bit or 16-bit form, but the output may change. The effect depends on the model, quantization method and task. Do not assume “4-bit” means identical file size or identical quality across different model families.

Use a fixed evaluation set that reflects the actual job. For an IT ticket classifier, include normal examples, unclear requests, typos, prompt injection and out-of-scope content. Score exact categories, missing fields, invalid values and human correction time. A model that fits but creates more review work may not be the better option. Keep a known-good model file and a way to roll back the runtime or quantization after a change.

CPU, one GPU, or multiple devices

If the model fits only in system memory, CPU inference may still be useful for a low-volume batch or a proof of concept. It can also be too slow for an interactive workflow. Measure before promising response times. GPU offload and multi-device placement depend on the framework, hardware compatibility, model format and runtime version; test the exact combination.

For a single-GPU host, leave capacity for driver and operating-system use if the GPU also drives a display. On a dedicated server, include other serving processes and monitoring agents. With multiple GPUs, account for per-device placement and interconnect behaviour; total VRAM summed across devices is not always equivalent to one contiguous memory pool. Verify the model distribution and inspect the actual device allocation.

A repeatable sizing test

  1. Record the exact model name, revision, checksum and quantization file.
  2. Pin the inference runtime and driver version for the test.
  3. Fix context, input limit, output limit and concurrency.
  4. Warm the model, then record both idle and peak GPU memory over repeated runs.
  5. Include OCR, retrieval or workflow services if they share the host.
  6. Record latency and output-quality checks alongside memory.
  7. Repeat with the longest approved prompt and expected simultaneous requests.
  8. Test restart, model unload, queue overload and a host with less available memory.

If using Ollama, its local FAQ describes ollama ps output for checking whether a model is running on CPU or GPU. The same FAQ notes that concurrency and context affect memory needs. Treat these as runtime observations, not a substitute for a controlled load test. The runtime comparison helps select what to test.

Turn the estimate into a purchase request

Write a short requirement rather than asking for “a GPU that runs 70B.” Include model and quantization, maximum context, expected concurrency, measured peak memory, latency target, supported driver stack, power and cooling, warranty, storage and a fallback. Ask suppliers for a current written quote and verify that the quoted device can be installed in the target server. Prices and stock change; this article does not provide hardware pricing.

For a local proof of concept, you may find that a smaller model and a narrow task are enough. The prompt debugger can help refine an instruction using non-sensitive samples. Keep the evaluation data synthetic or approved; never upload confidential prompt examples to a tool without checking its data handling. Once the expected model and hardware are known, compare the cost with the three-year worksheet.

Sizing rule of thumb

Repeatable sizing worksheet

Record the exact model artifact, quantization, maximum context, prompt length, output cap, concurrency, batch size, runtime, GPU and driver. Then measure loaded weights, peak device memory under the heaviest intended prompt, host RAM, cold-start time and latency. Repeat with OCR or workflow services running if they share the host. Keep each measurement separate: model file size, allocated memory and measured peak are different quantities.

MeasurementRecordWhy it matters
ArtifactFile size, model revision and checksumIdentifies the tested file, not its quality
ContextPrompt and output token limitsCache use changes with sequence length and concurrency
Device peakRuntime allocation under loadIncludes buffers beyond raw weights
Host peakSystem RAM under the full workflowOffload and OCR can compete with inference
WorkloadConcurrency, warm-up and prompt setMakes latency comparisons reproducible

Run both a cold start and a warm workload. If the host is near capacity, test what happens when the process restarts or a request exceeds the intended context. Keep headroom for the operating system, monitoring and recovery; do not plan to the last available gigabyte.

Evaluate quantization on the task

Quantization can reduce model storage or computation, but a smaller artifact does not guarantee equivalent output quality. Compare candidate configurations on a task-specific synthetic evaluation set. Check field accuracy, refusals, schema validity and stability. A setting that is adequate for a summary may not suit a strict classification task.

Keep comparisons fair: use the same model family, prompt, context, output limit and cases. Record runtime build and hardware. If any of these change, describe the result as a new configuration rather than a direct runtime comparison. Validate generated structured output in ordinary application code even when the server can constrain generation.

Plan scale and rollback

If the workload does not fit, first reduce unnecessary context or concurrency, then evaluate a smaller model or another quantization. Each option can change quality and latency. Multiple GPUs, CPU offload and batching are runtime-specific; verify current support and test the exact topology. A multi-GPU host adds driver, device health and memory balance failure modes.

Keep a known-good runtime and model package for rollback, and define how offline updates are approved and imported. Track disk space for model versions and temporary files. Estimates in this guide are arithmetic scenarios, not vendor-confirmed sizing recommendations. Reproduce the complete test before purchasing or approving a production host.

Use parameter-count arithmetic to reject an obviously impossible plan, not to approve a purchase. Add the cache and workspace assumptions you can explain, test the exact quantized model under realistic context and concurrency, then leave measured headroom for the rest of the host. If you cannot reproduce the measured setup later, the number is not a reliable capacity record.

*Vendor documentation checked on 24 November 2026: Ollama local FAQ and GPU guidance, vLLM structured-output documentation, and llama.cpp server documentation. The memory table is a transparent arithmetic scenario prepared for this article; it is not vendor-confirmed sizing guidance.*

Frequently asked questions

Does a 4-bit 7B model always fit in 4 GB VRAM?

No. A nominal raw-weight calculation is about 3.5 GB decimal before metadata, KV cache, runtime allocations, context and concurrency. Model files and runtime use vary, so measure the exact workload.

What is the KV cache?

It is memory used during generation to hold attention keys and values for the active context. Its size depends on model architecture, context length, precision and concurrent sequences, so it cannot be derived from parameter count alone.

Will quantization reduce answer quality?

It can change output quality and behaviour. Compare the quantized model against a fixed task-specific test set and involve reviewers; do not assume two quantizations are equivalent because both load.

Can system RAM replace VRAM?

Some runtimes can place some work in system memory or use CPU inference, but performance and supported paths vary. Verify the exact runtime and hardware rather than assuming a GPU will behave the same when a model does not fit.

What should I test before buying a GPU?

Use the selected model, quantization, context, output length and expected concurrency. Record peak memory, latency, quality, stability and fallback behaviour over a representative run, then add capacity for other workloads.

Was this helpful?