Cloud vs. Local Deployment: A Practical Guide to GPU Selection for Large Language Models

    Running large models locally can save money and protect sensitive data—but only if you pick the right hardware. This guide explains when to use a cloud API versus self-hosting on your own GPUs, breaks down the key specs that matter (VRAM capacity, memory bandwidth, compute power, and architecture features like Flash Attention and bf16), compares four common hardware options, and outlines a step-by-step selection process for real-world deployments.

    1. Start with the Basic Question: Cloud API or Local Deployment?

    There are two main ways to use large models. The first is calling model APIs provided by cloud vendors—for example, enterprise AI services on platforms like Baidu AI Cloud. This approach requires no hardware purchase; the vendor handles model updates and elastic scaling, making it ideal for teams that want to launch quickly without taking on operations work. The second is deploying models on your own GPUs, typically driven by three motivations: data must stay inside a private network, long-term API costs are too high, or you need to fine-tune on proprietary data.

    Neither route is inherently better. Evaluate five factors: request volume (monthly request count and average token consumption), latency requirements, whether data involves privacy or compliance constraints, whether fine-tuning is needed, and your team’s ops capabilities. At low volume, APIs are usually cheaper. Local deployment only pays off when volume is high, data is sensitive, or long-term customization is required. Also factor in migration costs, including API adaptation, prompt adjustments, and re-running evaluations.

    2. Key Specs to Check Before Buying GPUs

    VRAM size alone is not enough. Consider these four dimensions together.

    1. VRAM Capacity

    Model weight memory can be estimated as “parameter count × bytes per parameter.” FP16 uses 2 bytes per parameter, INT8 uses 1 byte, and INT4 uses roughly 0.5 bytes. For a 7B model, FP16 weights take about 14GB and INT4 about 3.5GB. A 14B model needs about 28GB in FP16 or 7GB in INT4. A 70B model needs about 140GB in FP16 or 35GB in INT4.

    These figures cover weights only. The KV cache grows with context length and concurrent requests, and the inference framework itself also consumes VRAM—so reserve several gigabytes of headroom. On a single 20GB card, a 7B model in FP16 can run, but usable context length is limited. A 14B model usually needs INT4 quantization to fit on one card. A 70B model generally requires multiple cards, or aggressive quantization plus CPU offloading—which significantly slows generation.

    2. Memory Bandwidth

    When generating text, most model weights must be read for every token produced. Bandwidth therefore largely caps generation speed. At batch size 1, you can estimate the theoretical ceiling as “memory bandwidth ÷ weight size in bytes.” For example, a card with 760GB/s bandwidth running a 7B FP16 model has a theoretical limit of roughly 54 tokens per second. Real-world speed will be lower, but bandwidth remains a reliable reference metric.

    3. Compute Power

    FP16 TFLOPS affects prefill speed (processing the prompt) and throughput in batched multi-request inference. Higher compute performs better with long inputs and high concurrency.

    4. Architecture Features and Interconnect

    Whether features like Flash Attention and bf16 are available depends on the GPU architecture, specific model, driver version, CUDA version, and inference framework version. Even within the same architecture, consumer and data-center variants may differ in support—so don’t draw conclusions from architecture names alone. For multi-GPU setups, NVLink typically offers better bandwidth and lower latency than PCIe communication, and the efficiency gap in tensor parallelism can be significant.

    3. Comparing Four Common Hardware Options

    Second-hand and modded GPUs on the market fall roughly into four categories. The table below lists key specs, based on information available at the time of writing.

    Option Architecture & Process VRAM Memory Bandwidth FP16 Compute Flash Attention bf16 Power Draw
    Older consumer modded card Turing, 12nm 22GB GDDR6 Not available Not available Not supported Not supported Not available
    Data-center compute card Volta, 12nm 16GB or 32GB HBM2 900GB/s Not available Not supported Not supported Not available
    Newer consumer modded card Ampere (GA102), 8nm 20GB GDDR6X ~760GB/s ~119 TFLOPS Supported (software conditions apply) Supported ~320W
    Consumer flagship card Ampere (GA102), 8nm 24GB GDDR6X 936GB/s ~142 TFLOPS Supported (software conditions apply) Supported ~350W

    Older consumer modded cards are inexpensive, carry more VRAM than the original stock versions, and support NVLink, making them suitable for low-cost multi-GPU builds. Their weakness: the Turing architecture lacks bf16 and official Flash Attention support. In inference frameworks that rely on these features, memory efficiency and generation speed are usually worse. Whether the extra 2GB of capacity compensates requires real-world testing.

    Data-center compute cards use HBM2 memory with 900GB/s bandwidth, support ECC error correction, and offer strong double-precision performance—well suited to traditional scientific computing. However, they also lack bf16 and Flash Attention support. Bare cards are cheap, but you’ll need separate cooling, adapter hardware, and a high-wattage PSU. At the time of writing, an estimated full build cost around 1,400–1,600 RMB, including cooling, a GPU riser dock, and power supply, but excluding variations in used-card condition and taxes. Used hardware prices fluctuate heavily, so treat this figure as a rough reference only, not a budget baseline.

    Newer consumer modded cards are based on Ampere’s GA102 core. Their 20GB of GDDR6X delivers about 760GB/s of bandwidth, and—provided CUDA version, drivers, and inference framework requirements are met—they support Flash Attention and bf16. Compared with Turing options, in scenarios where these features are effective, inference speed and memory efficiency typically improve noticeably, though the exact gain depends on the model, batch size, context length, drivers, and framework—verify with your own benchmarks. Modded cards also carry risks: no warranty, plus cooling and reliability concerns for long-term operation. Before buying, confirm the seller’s test records and return policies.

    Consumer flagship cards offer 24GB VRAM, 936GB/s bandwidth, and roughly 142 TFLOPS of FP16 compute, with support for Flash Attention, bf16, and NVLink. The extra 4GB of VRAM and higher bandwidth help run larger models or handle longer contexts—but power draw and cost are both higher. If the machine is only for personal research or entertainment, the additional performance may not justify the extra spend.

    4. The Real-World Impact of Two Key Technologies

    Flash Attention uses tiled computation to reduce the number of reads and writes between main memory (HBM) and on-chip cache (SRAM) during attention computation. This lowers peak VRAM usage for attention and speeds up long-context processing. Without hardware or framework support, long-context inference is far more likely to hit out-of-memory errors, and speed drops noticeably.

    bf16 is a 16-bit floating-point format whose exponent width matches FP32, giving it a larger numeric range and making it less prone to overflow than FP16. The trade-off is lower mantissa precision, which has limited impact on most inference tasks. bf16 needs hardware support to run fast—on unsupported hardware, it may only run through slow emulation paths, or not at all.

    5. A Step-by-Step Selection Process

    1. Determine your target model’s parameter count and quantization scheme, estimate weight VRAM, then add KV cache and framework overhead.
    2. Define your typical context length and number of concurrent requests.
    3. Check the official documentation for your candidate hardware and inference framework to confirm support for features like Flash Attention and bf16.
    4. Benchmark real workloads before committing—theoretical figures only tell part of the story.