Running Ultra-Large Language Models Locally: Hardware Requirements and Costs

    This guide explains how to estimate GPU and memory needs for running ultra-large language models locally. It covers weight sizes, KV Cache, interconnects, storage, and power. It also shows how dynamic quantization shrinks model files and compares three deployment paths: CPU inference with large RAM, owned or rented multi-GPU servers, and on-demand cloud instances. A selection checklist closes the guide.

    1. How Much GPU Memory the Original Weights Need

    Inference memory usage has four components:

    Memory usage ≈ weights + KV Cache + activations + framework overhead

    Weights are the easiest part to estimate. Each parameter takes 2 bytes in BF16 and 1 byte in FP8. A model with 1 trillion parameters therefore needs about 2TB in BF16 and about 1TB in FP8.

    The table below counts only the weights. Use it to check whether a hardware setup can hold the model at all.

    Model and precision Weight size 8×80GB (640GB) 8×141GB (about 1.13TB) 16×80GB (1.28TB)
    320B, BF16 About 640GB Fits exactly, with no headroom Fits, with about 490GB to spare Fits
    1T, FP8 About 1TB Does not fit Fits, with about 130GB to spare Fits, with about 280GB to spare
    1T, BF16 About 2TB Does not fit Does not fit Does not fit. Needs 16×141GB (about 2.26TB)

    The table shows that 640GB across eight 80GB GPUs can hold only about 320B parameters in BF16, or about 640B parameters in FP8. The original trillion-parameter model does not fit in that tier. The less space left after the weights, the less room remains for the KV Cache, and the shorter the context length the system can support.

    2. Three Easily Overlooked Thresholds

    1. KV Cache grows with context. Its memory use increases linearly with context length and the number of concurrent requests. In long-context workloads, it can take tens or even hundreds of gigabytes more, depending on the model’s layer count, attention design, and precision.

    2. Interconnect determines throughput. Within a single 8-GPU server, NVLink-class high-speed links support tensor parallelism. Across multiple servers, communication runs over InfiniBand or high-performance Ethernet. When interconnect bandwidth is insufficient, each generated token waits on communication, and throughput drops noticeably. Switches and network adapters add cost, and prices depend on actual quotes.

    3. Storage is often underestimated. Plan for the base weights, quantized copies, swap space, and logs together. A 1-trillion-parameter FP8 model takes about 1TB. If you keep two or three versions and add swap space, an NVMe SSD of 2TB or more is a reasonable starting configuration.

    4. Power and cooling. A fully loaded 8-GPU server can draw several kilowatts, which a typical residential circuit often cannot supply. Before you start, confirm the data center’s power capacity, cooling capability, and noise limits.

    3. How Much Dynamic Quantization Can Compress

    3.1 Quantization-aware training provides the foundation

    Some recent models use quantization-aware training (QAT) during training. Their weights are stored in micro-block floating-point formats such as MXFP4, and their activations use formats such as MXFP8. Because the model adapts to low-precision representation during training, the accuracy loss from post-training quantization is usually smaller than with conventional post-training quantization (PTQ). Whether a specific model uses QAT depends on the publisher’s documentation.

    3.2 Allocating bits by layer

    The core idea of dynamic quantization is that layers contribute differently to output quality. Each layer should get its own precision instead of being compressed to one uniform bit width. A common approach looks like this:

    • Keep critical attention projection layers and the first and last layers at 6 to 8 bits to protect output quality.
    • Compress the redundant FFN weights in MoE experts, which account for most of the parameters, to 1 to 2 bits.
    • Set the precision of the embedding and output layers separately, based on their sensitivity.

    At the same average bit width, allocating bits by layer usually preserves quality better than uniform compression. The exact gap must be measured on the same test set, such as perplexity (PPL). The key question is which layers are pushed to low bit widths.

    3.3 Estimating file size

    Use this formula to estimate file size:

    File size ≈ number of parameters × average bit width ÷ 8

    For a model with 1 trillion parameters:

    Average bit width Theoretical size
    1 bit About 125GB
    2 bits About 250GB
    4 bits About 500GB
    8 bits About 1TB

    Dynamic quantization keeps some layers at higher bit widths, so the actual average bit width is usually higher than the nominal value. The files also contain metadata and unquantized parts, so the actual size will exceed the theoretical figure. When you choose a model, use the file size the publisher provides, and check it against the formula.

    Higher bit widths mean larger files and output quality closer to the original model. As a rough guide, the 1-bit tier is useful for checking whether a model runs at all. The 2-bit tier becomes usable. The 4-bit tier is a common starting point for production. The 8-bit tier is close to lossless. These are qualitative judgments. Evaluate actual quality on your own tasks.

    4. Calculating Deployment Costs

    The cost of local deployment depends mainly on three variables: memory capacity, memory bandwidth, and available budget. The three paths below cover each approach.

    4.1 Path A: CPU inference with more RAM

    RAM capacity must exceed the weight size and leave room for the KV Cache and the operating system. For a 1-trillion-parameter model quantized to 2 bits (about 250GB), 256GB or more of RAM can hold the weights. Longer contexts require additional headroom.

    CPU inference speed is mainly limited by memory bandwidth. For an MoE model, each generated token activates only part of the expert parameters. You can estimate the theoretical ceiling with this formula:

    Theoretical ceiling (tokens/s) ≈ memory bandwidth ÷ bytes read per token

    For example, assume about 32B active parameters at an average of 4 bits. Each token then reads about 16GB. With a memory bandwidth of 400 GB/s, the theoretical ceiling is about 25 tokens/s. Actual speed will be lower because of scheduling, caching, and expert switching. This approach suits offline batch processing. It does not suit latency-sensitive interactive use.

    4.2 Path B: Buying or renting a multi-GPU server

    The cost of a multi-GPU server includes the GPUs, the server itself, networking, electricity, and data center space. Purchase prices vary widely with market supply and demand and with GPU model, so check actual quotes.

    You can estimate rental costs with this formula:

    Monthly cost ≈ hourly price per GPU × number of GPUs × hours actually used + storage fees + traffic fees

    Suppose a platform charges CNY 8 per hour for each GPU in an 8×80GB instance, and the instance runs 24 hours a day for a month. The GPU rental cost is about 8 × 24 × 30 × 8 = CNY 46,080. This figure is only an example. Check the platform’s current pricing for real numbers. For workloads that do not need to run continuously, on-demand rental is usually more economical.

    4.3 Path C: On-demand cloud usage

    Major cloud platforms bill by the hour. Storing weight snapshots in object storage, launching an inference environment quickly with containers, and setting monitoring and alerts to control the budget is a cost-effective approach for small teams during experimentation. When a job finishes, release the instance so that idle compute incurs no charges.

    5. Selection Checklist

    Before you start, review these items:

    1. Define the use case. Everyday Q&A and coding assistance usually do not require an ultra-large model. At 4-bit quantization, the weights of a 30B-class model are about 15GB. That model fits on a single 24GB GPU, but the context length is limited. The weights of a 70B-class model are about 35GB, which does not fit on a single 24GB GPU, so you need multiple GPUs or memory offloading.
    2. Rent ultra-large models on demand. For batch evaluation or research validation, release resources when the task finishes.
    3. Prioritize memory bandwidth for local extreme-quantization setups. In these scenarios, the bottleneck is usually bandwidth rather than compute.
    4. When in doubt, choose a higher bit width. Use 1 to 2 bits for validation. For production, use at least 4 bits, and compare quality on the same test set.
    5. Plan storage for the full pipeline. Count the weights, quantized copies, swap space, and logs.
    6. Verify current information. Model versions, GPU models, and prices change quickly. Check the official model card and the platform’s current pricing before you start.

    Deploying ultra-large models locally comes down to trading off capacity, bandwidth, and budget. Dynamic quantization reduces weight size from the terabyte range to about half a terabyte, which makes it feasible for individuals and small teams to run these models. Running them well and at reasonable cost still requires a clear comparison of the costs of owning hardware versus renting it.