How Powerful Can an Open-Source LLM Be on a Single 24GB GPU?

    This article explains the practical upper limit for running open-source large language models on a single 24GB consumer GPU. It covers model architecture, quantization, VRAM budgeting, KV-cache management, inference frameworks, long-context use cases, and evaluation. For interactive single-user scenarios, the most realistic configuration is a 30B-class sparse mixture-of-experts model with about 3B active parameters per token, quantized to 4-bit and served with paged KV-cache management. The article also describes when a single GPU is no longer enough.

    1. Conclusion First: The Practical Ceiling of a 24GB Single GPU

    In the open-source LLM community, a single 24GB consumer GPU has long been a cost-effective deployment platform. It can be installed in a personal workstation or rented by the hour as a cloud host. For this class of hardware, the recent answer has been fairly consistent: a sparse mixture-of-experts (MoE) model with around 30B total parameters and about 3B active parameters per token.

    Recent iterations of this model class have appeared as well. The total parameter count remains in the 30B range, and the new versions claim to lead their peers in overall performance. The comparison targets include the previous generation of the same class and some 20B-class dense models released by overseas vendors.

    To judge how strong a model a 24GB GPU can run, parameter count alone is not enough. Three factors determine the practical result:

    1. Model architecture: dense or sparsely activated;
    2. Quantization precision: FP16, FP8, or INT4;
    3. Inference framework: how VRAM is allocated and how the KV cache is managed.

    1.1 Precision determines whether the model can fit

    For a 30B-class model, the weight size at three precision levels can be estimated as follows, assuming 1 byte = 8 bits:

    Precision Bits per parameter Approximate weight size Can a single 24GB GPU hold it?
    FP16/BF16 16-bit ~56 GiB No
    FP8 8-bit ~28 GiB No
    4-bit integer quantization ~4.x bits, including quantization metadata ~15–18 GiB Yes

    Even if some models provide native FP8 weights, the total size after adding the KV cache and runtime overhead still exceeds the capacity of a single GPU. Therefore, the only realistic path for running a 30B-class model on one GPU is 4-bit quantization.

    1.2 Architecture determines whether it can run efficiently

    At 4-bit precision, both dense models and sparse MoE models can fit into 24GB of VRAM. However, during token generation:

    • A dense model must read all weights for every token;
    • A sparse MoE model activates only a small subset of experts.

    In a single-user interactive scenario, decoding speed is mainly limited by memory bandwidth. Because of this, an MoE model can achieve several times the generation speed of a dense model of the same total size.

    Recommended configuration: a 30B-class MoE model, a calibrated 4-bit quantized version, and an inference framework that supports paged KV-cache management. If long context is required, add KV-cache quantization.

    Practical limits:

    • On a single 24GB GPU, a 30B-class 4-bit model is a realistic upper bound;
    • Models with larger parameter counts require multiple GPUs or accelerator cards with more VRAM;
    • If the goal is full fine-tuning rather than inference, 24GB of VRAM is essentially insufficient; parameter-efficient fine-tuning or a multi-GPU setup should be considered instead.

    The following sections explain the full reasoning behind this configuration.

    2. VRAM Budget: Check Whether It Fits Before Downloading

    Running a VRAM budget before deployment helps avoid the repetitive cycle of downloading a quantized model only to discover that it does not fit. On a single GPU, VRAM is mainly occupied by four things:

    • Model weights;
    • The KV cache;
    • The inference framework’s own context and buffers;
    • VRAM fragmentation.

    2.1 Weight estimation

    The basic formula for weight size is:

    Weight bytes ≈ parameter count × bytes per parameter

    4-bit quantization does not mean that every parameter occupies exactly 4 bits:

    • In block quantization, every 32 or 64 weights share a set of scale factors and zero points, which adds overhead;
    • Some implementations keep token embeddings, the output layer, or certain sensitive layers at higher precision;
    • Therefore, the actual weight size is usually slightly larger than the theoretical value.
    1. # VRAM estimation example (order-of-magnitude estimates, not measured for a specific model)
    2. def estimate_vram_gb(params_b: float, bits: float = 4.3,
    3. layers: int = 48, kv_heads: int = 8,
    4. head_dim: int = 128, ctx: int = 32768,
    5. kv_bits: int = 16) -> dict:
    6. """Estimate single-GPU VRAM usage by parameter count and KV-cache dimensions (GiB).
    7. params_b: total parameter count (in billions)
    8. bits: effective weight precision (including quantization metadata)
    9. kv_bits: KV-cache precision (16 means FP16, 8 means 8-bit quantization)
    10. """
    11. g = 1024 ** 3
    12. weights = params_b * 1e9 * bits / 8 / g
    13. # KV cache per token = 2 (K and V) × layers × KV heads × head dim
    14. kv_per_token = 2 * layers * kv_heads * head_dim * kv_bits / 8
    15. kv_cache = kv_per_token * ctx / g
    16. kv_per_1k = kv_per_token * 1024 / (1024 ** 2) # MiB per 1K tokens
    17. reserved = 1.5 # framework context, temporary buffers, etc.
    18. overhead = (weights + kv_cache) * 0.05 # fragmentation and similar overhead
    19. return {
    20. "weights_gb": round(weights, 1),
    21. "kv_per_1k_tokens_mib": round(kv_per_1k, 0),
    22. "kv_cache_gb": round(kv_cache, 1),
    23. "total_gb": round(weights + kv_cache + reserved + overhead, 1),
    24. }
    25. if __name__ == "__main__":
    26. for ctx in (8192, 32768):
    27. r = estimate_vram_gb(30, ctx=ctx)
    28. print(f"Context {ctx // 1024}K: {r}")
    29. # Context 8K: {'weights_gb': 14.0, 'kv_per_1k_tokens_mib': 180.0, 'kv_cache_gb': 1.4, 'total_gb': 17.0}
    30. # Context 32K: {'weights_gb': 14.0, 'kv_per_1k_tokens_mib': 180.0, 'kv_cache_gb': 5.5, 'total_gb': 21.1}

    2.2 Interpreting the results

    The example above corresponds to a typical architecture with 48 layers, 8 KV heads, head_dim of 128, and grouped-query attention. This is a general example; in real deployments, you should read the model’s configuration file.

    The results show:

    • At 4-bit precision, the weights occupy about 14 GiB. With a 32K context, the KV cache occupies about 5.5 GiB, for a total of about 21 GiB, leaving about 3 GiB of headroom;
    • The KV cache occupies about 180 MiB per 1K tokens. Based on this, doubling the context from 32K to 64K adds about 5.5 GiB of KV-cache overhead alone, which quickly consumes the remaining headroom;
    • If the KV cache is changed from FP16 to 8-bit quantization, the KV cache for a 32K context can be reduced to about 2.75 GiB, bringing total usage down to about 18.3 GiB and leaving more room for concurrent requests.

    The KV cache grows linearly with the number of concurrent requests. When serving multiple users:

    Total KV cache ≈ single-request KV cache × concurrency

    A practical rule is to set the model’s “upper limit” to 65%–75% of total VRAM, leaving the rest for the KV cache and fragmentation. Under this principle:

    • A 14 GiB weight footprint is about 58% of 24GB, leaving room for relatively high concurrency;
    • An 18 GiB weight footprint is about 75%, leaving noticeably less space for the KV cache.

    3. Why Sparse MoE Is Better Suited to a Single GPU

    3.1 VRAM is determined by total parameters, while compute is determined by active parameters

    An MoE model consists of multiple parallel expert feed-forward networks. Each token is routed by a router, which scores the experts and activates only a small number of them. Using the “30B-A3B” naming convention as an example:

    • 30B is the model’s total parameter count, which determines VRAM usage;
    • A3B means about 3B parameters are activated per token on average, which determines compute demand.

    In other words, MoE decouples knowledge capacity from per-token compute cost. During single-GPU inference, all experts must remain resident in VRAM, so VRAM pressure is determined by the total parameter count. However, computation for each token only occurs in a small number of experts, so compute pressure is determined by the active parameter count.

    3.2 Bandwidth perspective: generation speed is determined by how much data must be moved

    During single-user autoregressive decoding, generating each token requires moving the participating weights from VRAM to the compute units once. This process is limited by memory bandwidth rather than compute throughput. The following formula gives a rough estimate of the upper bound on generation speed:

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

    1. def estimate_decode_tps(bandwidth_gbs: float, active_params_b: float,
    2. bits: float = 4.3) -> float:
    3. """Estimate single-request decode speed from memory bandwidth (illustrative, not measured).
    4. bandwidth_gbs: memory bandwidth (GB/s)
    5. active_params_b: active parameters per token (in billions)
    6. """
    7. bytes_per_token = active_params_b * 1e9 * bits / 8
    8. return bandwidth_gbs / bytes_per_token
    9. if __name__ == "__main__":
    10. bw = 1008 # a single GPU with roughly 1TB/s memory bandwidth
    11. print(estimate_decode_tps(bw, active_params_b=3)) # about 648 tokens/s
    12. print(estimate_decode_tps(bw, active_params_b=30)) # about 65 tokens/s

    The results show:

    • With memory bandwidth around 1TB/s, an MoE model activating 3B parameters has a theoretical decode speed about 10 times higher than a dense model activating all 30B parameters;
    • Real-world speed will be lower because of router computation, random access to expert weights, sampling overhead, and framework scheduling overhead;
    • Even if real speed is halved, the sparse model still has a clear advantage for single-GPU interactive experiences.

    3.3 Differences under batch concurrency

    The analysis above applies to a single request. When serving multiple concurrent requests:

    • Dense models: all requests share the same weight reads. Larger batches improve hardware utilization, and throughput continues to increase;
    • MoE models: different tokens are routed to different experts. A batch spreads access across more experts. When the number of tokens in a batch is large, more experts become active, total reads approach reading all weights, and decoding gradually becomes compute-bound.

    Therefore, the throughput advantage of MoE models is most obvious in low- and medium-concurrency ranges. In high-concurrency scenarios, mechanisms such as expert parallelism and capacity factor need to be evaluated together.

    3.4 Two cautions for MoE on a single GPU

    1. Higher VRAM pressure: because the total parameter count is large, MoE models are more sensitive to both VRAM capacity and quantization quality. Structures with many experts and smaller per-expert matrices may produce more “small matrices” under 4-bit quantization, and quantization error accumulation cannot be ignored. It is better to choose a well-calibrated quantized version than to quantize arbitrarily yourself.
    2. Uneven routing load: hot experts can become bandwidth bottlenecks. This also explains why the measured speed of MoE models does not always scale perfectly with the active parameter count.

    3.5 A quick comparison

    Dimension Dense model (30B-class) Sparse MoE model (30B total, ~3B active)
    VRAM usage Similar to MoE Similar to dense
    Single-request decode speed Slower Several times faster
    Medium/low concurrency throughput Average Clearly higher
    High concurrency throughput Improves steadily with batch size Advantage narrows
    Long-context KV cache Similar for the same architecture Similar for the same architecture
    Quantization robustness Relatively more stable Requires higher calibration quality

    Conclusion: for “single GPU, personal use, interactive scenarios”, a sparse MoE model is the better choice.

    4. Quantization: From Fitting In to Running Reliably

    4.1 Three common quantization approaches

    Type Representative methods Main optimization goal Typical use case
    Group-wise symmetric quantization GPTQ-like methods Control precision loss at low bit widths Single-GPU or multi-GPU serving
    Activation-aware weight quantization AWQ-like methods Protect a small number of salient weight channels Balance precision and speed
    Post-training quantization bitsandbytes NF4 Easy loading with little or no calibration Fast local loading, parameter-efficient fine-tuning
    • GPTQ: quantizes layers based on second-order information and compensates for quantization error;
    • AWQ: observes that a small number of “salient weight channels” have a large impact on outputs. It scales those channels before quantization based on activation distributions, using an equivalent transformation to preserve important precision;
    • NF4: a non-uniform 4-bit data type designed for normally distributed weights. It is often combined with double quantization to further reduce the overhead of quantization constants.

    4.2 Weight-only quantization vs. weight-activation quantization

    • Weight-only quantization (such as W4A16): only weights are compressed, while activations remain FP16. This has manageable precision loss and is simple to implement, making it the default choice for single-GPU deployment. However, in small-batch scenarios, the amount of weight data read is small and the matrix multiplication itself becomes the bottleneck, so the bandwidth benefit of 4-bit weights is reduced.
    • Weight-activation quantization (such as W8A8 or W4A4): both weights and activations are reduced to low bit widths, which can improve compute utilization by leveraging low-precision compute units. However, activations contain outliers, and aggressive low-bit quantization can easily cause a noticeable precision drop. Techniques such as SmoothQuant, which “move quantization difficulty from activations to weights,” may be needed. This approach is better suited to batch serving; the benefit for personal single-GPU use is limited.

    4.3 Additional techniques for long-context scenarios

    In long-context scenarios, the KV cache often exhausts VRAM before the weights do. Common techniques include:

    1. KV-cache quantization: reduce the cache from FP16 to 8-bit or even 4-bit. The cost is that long-text retrieval and exact-copy capabilities may decline, so testing is required.
    2. Sliding-window or attention-retention methods: concentrate attention outside the window on a small number of “key tokens” and keep full cache only for those tokens.
    3. Paged cache and prefix reuse: allocate the cache in blocks to reduce fragmentation; for repeated system prompts or repository context, directly reuse already computed cache.

    4.4 Evaluating quantization quality: do not rely on one score

    • Choose appropriate calibration data: the calibration set should be close to the real use case. Use code corpora for code scenarios and Chinese corpora for Chinese scenarios.
    • Test with real tasks: do not rely only on general benchmark rankings. Run your own tasks, such as code generation, document summarization, and multi-turn dialogue.
    • Watch for length effects: some models behave normally at short context but accumulate and amplify quantization errors at long context. Retest at the target length.
    • Pay attention to sensitive layers: token embeddings, output layers, and some attention projection layers are more sensitive to quantization. Prefer quantized versions that retain mixed precision for these layers.

    5. Inference Frameworks and Deployment Modes: Making Full Use of One GPU

    5.1 Two deployment modes

    • Embedded inference: locally load quantized weights and complete inference within a single process. This is suitable for personal scripts and desktop applications. Common formats include GGUF, GPTQ, and AWQ.
    • Serving inference: built-in continuous batching, paged KV cache, prefix reuse, tensor parallelism, and other capabilities. This is suitable for exposing an API. Representative engines include vLLM, SGLang, and TensorRT-LLM.

    5.2 Key capabilities for single-GPU scenarios

    Capability Problem it solves Is it critical for single GPU?
    Paged KV-cache management Cache fragmentation and concurrent allocation Very critical
    Continuous batching GPU idle time when request lengths vary Critical for concurrent scenarios
    Prefix reuse Repeated system prompts and fixed context Critical for coding assistants and multi-turn dialogue
    Quantized kernel acceleration 4-bit weight decoding efficiency Critical
    Speculative decoding Serial decoding latency Helpful, but use caution when VRAM headroom is insufficient
    Tensor parallelism Splitting a model across GPUs Not needed on a single GPU

    Speculative decoding is worth expanding on. It uses a small draft model, or a shallow version of the model itself, to predict several tokens in a row, then has the large model verify them in one parallel forward pass. Verified tokens can be accepted directly. Because verification can process multiple positions in one forward pass, it can theoretically reduce average decode latency. However, on a VRAM-constrained single GPU, the draft model itself also consumes VRAM, and the benefit depends heavily on the draft model’s hit rate. It is best to validate on a small scale before enabling it.

    5.3 What can be tuned when VRAM is limited

    Inference engines usually expose parameters such as VRAM utilization ratio, maximum number of concurrent sequences, KV-cache quantization, and CPU offloading. The following function shows how to calculate the maximum concurrency in order:

    1. def max_concurrency(total_gb: float, weights_gb: float, reserve_gb: float,
    2. ctx_len: int, kv_per_1k_mib: float,
    3. max_batch: int = 64) -> int:
    4. """Allocate in order: weights → reserve → KV cache → concurrency limit."""
    5. usable = total_gb - weights_gb - reserve_gb # Space available for KV cache
    6. per_req_gib = kv_per_1k_mib * (ctx_len / 1024) / 1024
    7. return max(1, min(max_batch, int(usable // per_req_gib)))
    8. if __name__ == "__main__":
    9. # 24GB card, 14GiB weights, 2GiB reserve, 32K context per request
    10. print(max_concurrency(24, 14.0, 2.0, ctx_len=32768, kv_per_1k_mib=180))
    11. # Output 6: if every request reserves the full 32K context, the maximum concurrency is about 6

    This result reveals an often-overlooked fact: if every request is charged the full maximum context, concurrency capacity can be severely underestimated. Paged cache allocation and continuous batching are designed to break the static assumption of “maximum context × concurrency.” Therefore, with the same amount of VRAM, frameworks that use these mechanisms effectively can achieve noticeably higher real concurrency.

    6. Long Context on a Single GPU: Coding and AI Coding Scenarios

    AI coding tools are one of the most valuable high-usage scenarios for single-GPU LLMs. Typical requirements include:

    • Long system prompts;
    • Multi-turn conversations;
    • Cross-file understanding;
    • Low-latency streaming completions.

    These scenarios place different demands on the model than ordinary chat scenarios.

    6.1 Reallocating the context budget

    Using 24GB of VRAM and 14 GiB of weights as an example, reserving 6–8 GiB for the KV cache can support roughly 30K–40K tokens of context with an FP16 cache. If the cache is quantized to 8-bit, the same space can support roughly twice the context length. For real deployment, it is recommended to:

    1. First use an estimation script to determine how much VRAM remains after weights and reserve;
    2. Then convert “cache overhead per 1K tokens” into usable context length;
    3. Finally, leave 10%–20% headroom for fragmentation and burst requests.

    6.2 Techniques for coding scenarios

    • Prefix reuse: unchanged content such as repository documentation, coding standards, and fixed examples can be cached after a prefix-cache hit, avoiding repeated computation and significantly reducing first-token latency.
    • Structured prompts: organize prompts into sections such as “related file summary → task description → output format requirements” to make it easier for the model to follow format constraints.
    • Prefer external retrieval: for very large repositories, do not force everything into the context. Use vector retrieval and code indexing to send only relevant snippets to the model.
    • Streaming output: perceived latency depends on time to first token. Streaming responses can significantly improve the experience. Time to first token is mainly determined by the prefill phase, which is compute-intensive and differs from decoding, which is bandwidth-limited.

    6.3 Precision selection

    Coding tasks are sensitive to format compliance, bracket matching, and long-range dependencies. Quantization error can be amplified in these areas, so:

    • For code generation, prefer 4-bit weights with an FP16 KV cache;
    • If the context must be extended, consider an 8-bit KV cache and verify with a set of code-completion tasks whether the output is still compilable and executable.

    7. How to Judge “the Strongest”: From Leaderboards to Your Own Evaluation

    Every new model release is often accompanied by claims of being “the strongest in its class.” For engineering adoption, a more valuable approach is to build your own evaluation framework.

    7.1 First define what “strong” means

    Dimension Key question Evaluation method
    Instruction following Can it strictly follow the required format? JSON mode, format-check pass rate
    Coding ability Can it complete, fix, and understand code across files? Internal code-snippet test set
    Long context Is it still accurate beyond 32K tokens? Needle-in-a-haystack, long-document summarization
    Quantization robustness How much score drops after 4-bit quantization? Compare FP16 and 4-bit on the same test set
    Inference efficiency First-token latency, decode speed, concurrency Stress-test tools with real measurements

    7.2 A minimal evaluation example

    1. import json
    2. EVAL_CASES = [
    3. {
    4. "name": "Instruction following",
    5. "prompt": "Output JSON only: {\"city\": ..., \"temp\": ...} without extra text",
    6. "check": lambda out: json.loads(out)["city"] == "Beijing",
    7. },
    8. {
    9. "name": "Code completion",
    10. "prompt": "Complete the function: def add(a, b):",
    11. "check": lambda out: "return a + b" in out.replace(" ", ""),
    12. },
    13. ]
    14. def run_eval(predict_fn, cases=EVAL_CASES):
    15. passed = 0
    16. for case in cases:
    17. out = predict_fn(case["prompt"])
    18. ok = case["check"](out)
    19. print(f"[{'PASS' if ok else 'FAIL'}] {case['name']}")
    20. passed += ok
    21. return passed / len(cases)
    22. # Replace predict_fn with a function that calls your local inference service

    7.3 Common evaluation mistakes

    1. Only looking at the overall score: a model with a high overall score may not necessarily perform better on a specific language or task.
    2. Ignoring differences between quantized versions: different quantized versions of the same model can differ more in practice than different models.
    3. Ignoring length effects: passing a short-context test does not mean the model remains reliable at 32K context.
    4. Looking only at speed, not quality: speculative decoding and aggressive quantization can improve speed, but may sacrifice output stability. They should be compared in pairs.

    8. When to Give Up on a Single GPU

    Single-GPU deployments have clear boundaries. Consider upgrading hardware or moving to cloud deployment when:

    • You need to run models with more than 70B parameters, where 4-bit weights already approach or exceed single-GPU capacity;
    • You need to serve many concurrent users, and KV-cache demand exceeds the available headroom;
    • You need full fine-tuning or long-sequence training;
    • You have hard SLA requirements for long context or extremely low latency.

    At that point, you can use cloud GPU instances to obtain more VRAM or multi-GPU resources on demand, run inference engines in containers, and expose model capabilities through APIs. Object storage can hold model weights, and monitoring can track latency and VRAM usage. This makes it easier to transition smoothly from single-machine experimentation to production serving.

    9. Deployment Checklist: Seven Steps to Run It on One GPU

    1. Calculate the budget: use an estimation script to clarify the proportions of weights, KV cache, and reserve, and confirm that the target context length and concurrency fit.
    2. Choose the architecture: for single-GPU interactive use, prioritize a 30B-class MoE model, followed by a well-quantized dense model.
    3. Choose quantization: prefer a well-calibrated 4-bit version such as GPTQ or AWQ; choose FP16 or 8-bit KV cache as needed.
    4. Choose the engine: use embedded inference for a single process; for serving, choose a framework that supports paged cache, continuous batching, and prefix reuse.
    5. Tune parameters: set VRAM usage limits, maximum sequence count, cache quantization, and scheduling policies in order, leaving room for fragmentation.
    6. Build an evaluation set: compare “FP16 vs. 4-bit,” different context lengths, and speculative decoding on vs. off using your own task set.
    7. Plan an exit path: understand the limits of a single GPU and plan a cloud upgrade path in advance.

    Conclusion

    The question “how strong a model can a single GPU run?” is essentially a VRAM budgeting problem. A 30B-class sparse model with 4-bit quantization sits comfortably within the limits of 24GB VRAM. The real engineering barrier is not whether the model can fit, but whether it can remain stable, fast, and sustainable after it fits.

    By focusing on VRAM allocation, quantization quality, inference engines, and evaluation, even a consumer-grade GPU can become a reliable private model compute node.