# Running Open-Source LLMs on a Single 24GB GPU: Model Selection and Deployment Guide
Selecting and deploying open-source large language models on a single 24GB consumer GPU is mainly an exercise in memory budgeting rather than chasing the largest parameter count. This guide explains how to calculate total VRAM demand — weights plus KV cache, framework overhead, multimodal encoders, and safety margin — how to judge whether a ~30B model will fit and stay stable, how to choose between 4-bit, 8-bit, and lower-precision quantization, what MoE architectures actually save, and what long context and multimodal inputs cost. It also includes a practical budget example, framework and quantization-format considerations, a post-deployment validation checklist, and answers to common questions such as how large a model a single 24GB card can serve.
Key Takeaways: The Answers First
- When choosing a model for a single 24GB GPU, don’t fixate on parameter count alone. What actually needs to be calculated is: weights + KV cache + framework overhead + multimodal overhead + headroom.
- A model with roughly 30 billion parameters has weights of about 15GB at 4-bit quantization, so it has a realistic chance of running on a 24GB card — but long-context headroom is limited.
- 4-bit quantization is the common starting point for single-GPU deployment, but it always requires spot checks. Smaller models are more sensitive to quantization, so heavier compression is not automatically better.
- The value of MoE is “large total parameter count, few parameters activated per token.” That lowers compute and memory-bandwidth pressure; it does not mean the weights are smaller.
- Long context, multimodality, and concurrency all consume additional VRAM, so any deployment plan should reserve elastic headroom.
1. How Do You Actually Calculate Single-GPU VRAM?
When running an open-source LLM on a single 24GB GPU, the first step is not picking the model with the largest parameter count, but establishing a memory budget mindset. A common mistake is to budget only for the model weights and ignore the dynamic runtime overhead. A more reliable estimate looks like this:
Total VRAM requirement ≈ weights + KV cache + framework overhead + multimodal/vision overhead + peak headroom
The weight component can be estimated first with a simplified formula:
Weight VRAM (GB) ≈ number of parameters (B) × bytes per parameter
Approximate bytes per parameter at different precisions:
| Precision / quantization | Bytes per parameter | Typical characteristics |
|---|---|---|
| FP16/BF16 | ~2 bytes | High precision, large VRAM requirement |
| INT8 | ~1 byte | Stable quality, moderate VRAM requirement |
| 4-bit | ~0.5 byte | Common for single GPU, needs spot checks |
| 3-bit and below | Lower | Saves more VRAM, but quality risk increases |
Take a model with about 30 billion parameters as an example:
- FP16: 30B × 2 bytes ≈ 60GB — generally beyond a single 24GB card;
- INT8: 30B × 1 byte ≈ 30GB — still over 24GB;
- 4-bit: 30B × 0.5 bytes ≈ 15GB — running becomes feasible.
One important caveat: the 15GB figure is only an estimate for the weight body. It excludes quantization metadata, routing and scheduling overhead, the KV cache, framework allocations, image encoding, and other extras. So once the framework and KV cache are added, a 4-bit 30B model leaves limited long-context headroom on a 24GB card, and the actual ceiling varies with the GPU model, the inference framework, the context configuration, and the concurrency level.
2. Can a ~30B Model Run? How to Decide
Many developers ask: how large a model can a 24GB card run? A more useful answer breaks the question down by scenario.
1. Plain text, short context
If the workload is mostly short Q&A and lightweight chat with no need for a long context window, a 30B-class model with 4-bit quantization does have a chance of running on a 24GB card. The priority here is making sure the weights, the framework, and a small KV cache all fit, while keeping some room for fluctuation.
2. Long documents, long conversations
If the task involves long text, long conversations, or multi-turn memory, the KV cache grows substantially. In that case, OOM can happen even when the weights are only 15GB, simply because the context is too long. Set a maximum context length based on the actual use case rather than enabling an extremely long window by default.
3. High concurrency or batched inference
Working for a single request does not mean it works under high concurrency. The more concurrent requests, the larger the KV cache and the greater the memory pressure. If the model needs to serve traffic, test peak scenarios first instead of only checking whether a single inference call succeeds.
3. How to Choose a Quantization Level? Is 4-Bit Always the Cheapest?
Quantization maps model weights from high-precision floating point to lower-bit representations, with the core goal of reducing VRAM usage. Common levels include 8-bit, 4-bit, and lower 3-bit or 2-bit options.
Quantization is not a “lower is better” game
4-bit is often used as the default starting point for single-GPU deployment because it strikes a relatively balanced tradeoff between VRAM compression and quality retention. But lower is not automatically better — the choice has to balance:
- VRAM usage;
- generation quality;
- inference speed;
- hardware compatibility;
- what the business can accept.
In most scenarios, the capability loss from 4-bit quantization is limited, but it still has to be validated by spot checks against real business data. This is especially true for tasks like logical reasoning, code generation, structured output, and long-document summarization, where low-bit quantization can degrade instruction following or make output expression less stable.
Smaller models are more sensitive to quantization
A detail that is easy to miss: a small model often loses more quality at 4-bit than a large model does. The reason is that small models carry less built-in redundancy, so after low-bit compression they lose detail-level capability more easily. As a result, for smaller models it is worth considering 8-bit or higher precision first, and only then evaluating whether 4-bit is good enough for larger models.
Suggested spot-check metrics
After quantization, don’t stop at “can it load.” At minimum, check:
- whether instruction following stays stable;
- whether long-document summaries drop key information;
- whether code or JSON output is still parseable;
- whether multi-turn conversations preserve context;
- whether factual answers degrade noticeably;
- whether refusal, safety, and boundary behavior match expectations.
4. Is MoE Suitable for a Single GPU?
Mixture of Experts (MoE) is one architecture worth attention when selecting a model for a single card. Its characteristic is a large total parameter count, while only a subset of experts is activated for each generated token.
For example, an MoE model might have around 30 billion total parameters but activate only about 4 billion per token. Such models are usually named with something like a “total parameters – activated parameters” label.
What does MoE actually save?
First, be clear about it: although an MoE model activates few parameters per forward pass, its total parameter count is large, and the weights generally need to be resident in VRAM as a whole. What MoE saves is the compute and memory bandwidth consumed per token — not the weight footprint.
Using an MoE model with 30B total and 4B activated as an example:
4-bit weight estimate: 30B × 0.5 bytes ≈ 15GB
That 15GB does not include quantization metadata, routing and scheduling overhead, or extra shared-layer allocations, so real deployments still need additional space.
The speed advantage of MoE is conditional
In single-stream generation, MoE can typically reduce the amount of weight read and computed per token, so it has the potential to improve generation speed. Actual performance, however, depends on:
- the GPU model;
- memory bandwidth;
- the inference framework;
- the batching strategy;
- the number of activated experts;
- context length;
- whether KV cache optimizations are enabled.
In batched or concurrent inference, MoE’s compute advantage is usually more pronounced, though throughput is still constrained by memory bandwidth. If more experts are activated per token, more weights must be read per token, and the speed advantage may shrink.
So MoE fits scenarios where you want greater knowledge capacity while still fitting on a single GPU. It should not be read as “more parameters automatically means faster.”
5. Context Length and KV Cache: Estimating the Overhead
Many deployment failures are not caused by weights failing to fit, but by a context that grows too long and lets the KV cache squeeze out the remaining VRAM. The KV cache stores the attention keys and values of already-generated tokens, and it scales with context length and concurrency.
A commonly used estimation formula is:
KV cache VRAM ≈ num_layers × 2 × num_kv_heads × head_dim × bytes_per_element × context_length × concurrency
In practice, this needs to be corrected against the model configuration and the inference framework. If the model uses GQA, MQA, or similar structures, it has fewer KV heads and the KV cache footprint may drop significantly. Enabling KV cache quantization can compress that footprint further.
Leave headroom for long-context scenarios
If the workload requires long-document summarization, long conversations, repository-scale code analysis, or multi-turn tasks, it is worth:
- defining an explicit maximum context length;
- budgeting separately for short and long tasks;
- avoiding a situation where weights plus KV cache hit the ceiling;
- enabling KV cache quantization where necessary;
- using mechanisms such as prefix caching and paged KV caching to cut repeated overhead.
“Fits in VRAM” is not the same as “runs long-context inference stably.” On a 24GB card, context length is often a tighter bottleneck than parameter count.
6. What Does Multimodal Support Require You to Reserve?
Some open-source LLMs support image-text understanding, multimodal Q&A, or image input. For applications that want to handle both text and images on one card, a multimodal model reduces the cost of maintaining multiple inference pipelines.
Multimodal capability, however, usually comes with additional overhead — especially the vision encoding part. When handling image input, you may need to reserve space for:
- the vision encoder;
- overhead that scales with image resolution;
- the cost of converting visual features into tokens;
- context growth after images and text are concatenated;
- higher peak VRAM fluctuation.
So if a multimodal model is on the plan, the vision encoder module belongs in the VRAM budget, not just the text backbone weights.
7. Deployment Tuning Checklist and a Worked Example
1. Recommended VRAM budget
A practical way to account for it:
weights + KV cache + framework overhead + multimodal overhead + 10%~20% headroom
The 10%~20% range is a common engineering practice for absorbing VRAM peaks, temporary buffers, batching fluctuation, and differences between framework versions. It is not an absolute guarantee; each project should adjust it based on actual load-test results.
2. An actionable budget example
Assume a model of about 30B parameters at 4-bit quantization:
- Weights: ~15GB;
- KV cache: roughly 1GB for short context, potentially 2GB–5GB for long context, depending on model structure and concurrency;
- Framework and runtime overhead: roughly 1GB–3GB;
- Multimodal vision overhead: additional reserve if enabled;
- Headroom: at least around 2GB recommended.
With short context, no multimodality, and low concurrency, total usage may land near 18GB–21GB, which is relatively manageable. With long context, high concurrency, or multimodality all enabled at once, 24GB can get very tight.
3. Choosing the framework and quantization format
Common inference options include:
- llama.cpp / Ollama: typically uses the GGUF format, suited to single-machine quantization, consumer GPUs, and lightweight deployment;
- vLLM: suited to high-throughput serving, with common quantization formats including GPTQ and AWQ, plus capabilities such as continuous batching;
- other inference backends: choose based on hardware, API requirements, and quantization-format compatibility.
When selecting, don’t only check whether the model loads. Also confirm:
- whether the quantization format is reliably supported by the current framework;
- whether the required context length is supported;
- whether concurrency, batching, and KV cache quantization are supported;
- whether observable logs and VRAM monitoring are available;
- whether quality spot checks and rollbacks are easy to perform.
4. What to do after deployment
- Run quality spot checks against real business corpora;
- Record VRAM usage at different context lengths;
- Record how latency and throughput change as concurrency rises;
- Focus validation on high-risk tasks such as long documents, code, and JSON output;
- If quality drops noticeably, consider raising precision, switching models, or reducing context length.
8. Frequently Asked Questions (FAQ)
Q1: How large a model can a single 24GB GPU run?
In most cases, look at 4-bit quantized versions of models in the 30B-parameter class, but judge the decision together with context length, concurrency, and framework overhead. A model of roughly 70B parameters is usually heavy on a single 24GB card, unless you use specialized quantization, a very small context window, or mixed precision — and even then, quality and stability need thorough validation.
Q2: How should I choose a model — should I look at parameter count first?
Parameter count is only basic information. A more complete set of selection dimensions includes: total versus activated parameters, quantization format, context length, model architecture, KV cache efficiency, framework support, the type of business task, and the VRAM budget. For MoE models, check both whether the total parameter count fits in memory and whether the activated parameter count suits the bandwidth of the current hardware.
Q3: What are the common mistakes?
Common mistakes include: counting only weights and not the KV cache; leaving no headroom for long-context scenarios; blindly choosing extremely low-bit quantization; ignoring the vision encoder overhead of multimodal models; checking only whether the model loads and not the output quality; insufficient concurrency load testing; and assuming MoE necessarily means a smaller weight footprint.
Q4: What should I do if VRAM runs out?
There are several directions to optimize: shorten the context; reduce concurrency; use a more efficient quantization format; enable KV cache quantization; pick a model that is friendlier to KV caching; use a framework that supports paged KV caching or prefix caching; move multimodal capability into a separate service; and finally, consider larger-VRAM cloud resources within budget.
9. Summary
Running open-source LLMs on a single 24GB consumer GPU is fundamentally an engineering optimization problem under a VRAM constraint. The key is not to blindly pursue a larger parameter count, but to build a reusable selection methodology around VRAM, quantization, MoE, KV cache, and multimodal overhead. With sensible budgeting, careful quantization, thorough spot checks, and targeted tuning, developers can find a balance between capability, speed, and stability on limited hardware. If you move to a cloud environment, it is also worth selecting inference resources by VRAM size, bandwidth, concurrency requirements, and budget rather than by unit price alone.
