How to Choose Open-Source LLMs for a Single 24GB VRAM GPU
This article explains how to select open-source large language models (LLMs) for a single 24GB VRAM GPU. It walks through VRAM budgeting (model weights, KV cache, and runtime overhead), explains why sparse mixture-of-experts models often fit constrained setups, covers low-bit quantization and its risks, and describes inference framework choices, deployment strategies, evaluation methods, and common mistakes. Rather than chasing the largest parameter counts or the highest leaderboard scores, readers will get a practical, engineering-oriented framework for judging which models can actually run reliably on limited hardware.
1. Background: Local Inference Under Limited VRAM
For private deployment, offline inference, development and debugging, coding-assistant validation, and knowledge Q&A, a single high-end consumer GPU is still the hardware many developers rely on. A typical high-end consumer GPU has around 24GB of VRAM. That is enough to hold many small and mid-sized models, but running a larger open-source LLM forces a real question: is there enough VRAM?
Many developers pick models by first looking at leaderboard scores, then parameter size, and only later considering deployment cost. But on a single GPU, what actually determines whether a model runs stably is rarely one metric. It is the balance between weight footprint, context cache, runtime overhead, concurrency, and inference-framework efficiency.
So “which open-source LLM should I choose under a single-GPU VRAM limit” is not a ranking question. It is an engineering selection problem. This article approaches it from several angles: technical principles, VRAM budgeting, model architecture, quantization strategy, service deployment, evaluation methods, and common pitfalls, and offers a more actionable decision framework.
2. The Real Constraint Is “What Fits in VRAM,” Not “The Largest Model”
People often assume that a larger total parameter count automatically means a stronger model. That is partly true in the ideal case, but in a single-GPU scenario, parameter count alone does not determine usability. What actually decides whether a model runs is whether the VRAM budget satisfies this inequality:
Available VRAM ≥ model weights + key-value cache + runtime activations and temporary buffers + inference-framework overhead
This means that even a model with excellent benchmark results is unsuitable for long-term single-GPU use if the combined weight, context-cache, and runtime overhead exceeds the VRAM ceiling.
Within that budget, the first thing to estimate is model weights.
If the model is stored in 16-bit floating point, each parameter takes about 2 bytes. For a model with roughly 30 billion total parameters, the weights alone need about 60GB of VRAM. For a 24GB-class high-end consumer GPU, such a model obviously cannot be loaded in full on a single card.
With 8-bit integer quantization, each parameter takes about 1 byte, so a 30B model’s weights take about 30GB. That is still close to or above the 24GB ceiling, so it typically requires very conservative limits on context length, concurrency, and runtime overhead, and real-world usability is unstable.
With 4-bit low-bit quantization, each parameter takes about 0.5 bytes, so a 30B model’s weights take about 15GB. That leaves roughly 9GB of theoretical headroom in 24GB for the KV cache, runtime activations, temporary buffers, and inference-framework overhead. This is exactly why low-bit quantization matters so much in single-GPU deployment.
However, low-bit quantization is not simply dividing VRAM usage by four. After quantization, you still need to watch for precision loss, instruction-following ability, code-generation stability, long-context behavior, and how well the inference framework supports the quantized format.
3. Why Sparse Expert Models Fit VRAM-Constrained Scenarios Better
In recent years, a technique called the mixture-of-experts (MoE) model has become an important direction for open-source LLMs. Unlike traditional dense models, a sparse expert model can have a large total parameter count yet activate only a subset of its experts at inference time, so the core parameters that actually participate in computation are often far fewer than the total.
This structure offers several clear benefits for single-GPU deployment.
First, it reduces computational pressure to some degree. In a traditional dense model, every parameter participates in each forward pass. A mixture-of-experts model typically uses a routing mechanism to select a subset of experts. In other words, the model has a large knowledge capacity, but each inference pass actually invokes a much smaller set of parameters.
Second, it can improve response speed under limited compute. On a single GPU, both memory bandwidth and compute capacity are bottlenecks. If a model has a large total parameter count but a small activated subset, then when the hardware can load it, the per-inference compute load may be lower than that of a dense model with the same total parameter count.
Third, it balances greater knowledge capacity with smaller compute cost. Many applications need more than simple question answering; they also need reasoning ability, code understanding, and multi-turn conversation. A larger total parameter count usually means stronger knowledge representation, while smaller activated parameters help keep the compute cost of a single inference lower.
But note: a mixture-of-experts model is not a synonym for “VRAM-friendly.”
The reason is that although only some experts are activated at inference time, all experts’ weights still need to be stored in VRAM or memory. In other words, a small activated-parameter count mainly affects compute load and does not necessarily reduce weight VRAM. If the total parameter count is too large, the weight footprint can still exceed single-GPU VRAM even when the activated count is small.
So the prerequisite for a mixture-of-experts model to fit single-GPU deployment is: the total parameter count cannot be too large, the activated-parameter scale should be low, and there must be a mature, low-loss quantization scheme.
Take a sparse expert model with roughly 30B total parameters and about 3B activated parameters as an example. After 4-bit low-bit quantization, its weights come to roughly 15GB. If the inference framework supports efficient loading, KV-cache management, and VRAM reuse, then a 24GB-class device has room for further testing and optimization.
4. How to Estimate the VRAM Budget Precisely
To judge whether a model fits single-GPU deployment, developers should build their own VRAM budget table. This table should not look only at the model file size, because actual runtime VRAM usage is usually higher than the raw weight file size.
4.1 Weight VRAM
Weight VRAM is directly tied to total parameter count and quantization precision. A simplified estimate is:
Weight VRAM = total parameters × bytes per parameter
At 16-bit floating point, each parameter is about 2 bytes; at 8-bit integer quantization, about 1 byte; at 4-bit low-bit quantization, about 0.5 bytes.
The following pseudocode gives a quick estimate:
param_count = 30_000_000_000bytes_per_param = 0.5 # 4-bit low-bit quantizationweight_gib = param_count * bytes_per_param / (1024 ** 3)print(f"Estimated weight VRAM: {weight_gib:.2f} GiB")
This result is only the lower bound for weights and does not represent the actual usable VRAM requirement.
4.2 Key-Value Cache VRAM
When a model processes context, it needs to cache the key-value tensors for historical tokens. The longer the context and the larger the batch, the more KV-cache VRAM is consumed. The influencing variables usually include number of layers, number of KV heads, head dimension, context length, batch size, and cache precision.
A schematic estimate looks like this:
kv_cache_bytes = (2* num_layers* kv_heads* head_dim* seq_len* batch_size* cache_bytes_per_element)
The key point here: long context and high concurrency significantly push up VRAM usage.
Many developers find that a model runs fine for a single request, but once they enter multi-turn conversations, long-document summarization, code-file understanding, or multi-user concurrency, they hit out-of-memory errors, slower responses, or even process crashes. The cause is usually not that the weights don’t fit, but that the KV cache and runtime overhead exceed expectations.
4.3 Runtime Overhead
Runtime overhead includes framework initialization, temporary tensors, attention-computation caches, scheduler structures, communication buffers, and activation caches. This part is hard to compute precisely with a single formula, because it depends on the inference framework, concurrency strategy, batching method, dynamic-graph optimization, and hardware driver state.
In practice, it is advisable to reserve at least 1GB to 3GB of elastic VRAM, depending on the model structure and framework implementation. If the model is already close to the VRAM ceiling, it is not recommended to keep pushing for high concurrency or very long context.
5. The Value and Risks of Low-Bit Quantization
Under a single 24GB VRAM card, low-bit quantization is often unavoidable.
5.1 From 16-bit to 8-bit: Half the VRAM, but Possibly Still Not Enough
For a model with roughly 30B total parameters, the weights take about 60GB at 16-bit floating point and about 30GB after 8-bit integer quantization. Although 8-bit quantization usually preserves precision better than 4-bit, in a 24GB VRAM scenario it is often still too tight.
5.2 4-bit Low-Bit Quantization: A Key Option for Single-GPU Deployment
4-bit low-bit quantization can compress the weights to about half the size of 8-bit quantization, giving a roughly 30B model a chance to fit within single-GPU VRAM. Its advantage is low VRAM usage and a lower deployment barrier, making it suitable for local inference and moderate concurrency.
But 4-bit quantization also carries risk. It may produce more noticeable quality fluctuations in tasks such as:
- Complex logical reasoning;
- Code generation and repair;
- Structured output;
- Long-context retrieval and summarization;
- Tool-call argument generation;
- Multi-turn instruction following.
So you cannot assume that a model which loads after low-bit quantization performs consistently across all tasks.
5.3 Mixed Precision and Critical-Layer Protection
In resource-constrained but quality-sensitive scenarios, you can consider a mixed-precision strategy. For example, keep sensitive layers, embedding layers, output layers, or key attention paths at higher precision while quantizing the rest to low bit.
The goal of this approach is not theoretical optimality, but a more balanced result across VRAM, latency, and quality.
5.4 KV-Cache Quantization
Beyond weight quantization, KV-cache quantization is another important way to reduce the cost of long contexts. If the inference framework supports storing the KV cache at lower precision, it can significantly reduce the VRAM pressure from context length.
However, KV-cache quantization can also affect long-text understanding and multi-turn conversation stability. So before going live, you should run comparison tests using real business data.
6. Inference Frameworks and Deployment Strategy
Whether a model runs stably on a single GPU depends not only on the model itself, but also on the inference framework and deployment strategy.
6.1 Weight Loading Methods
Common loading methods include full loading, chunked loading, memory-mapped loading, and lazy loading. Full loading is simple to implement, but peak VRAM and startup time can be higher. Chunked or memory-mapped loading helps reduce startup pressure, but may introduce additional overhead during actual inference.
For a single-GPU device, it is recommended to first run a loading test with a minimal context length during startup. Once the basic pipeline is confirmed to work, gradually increase context length and concurrency.
6.2 Batching and Concurrency Control
An inference service should not focus only on single-request quality but also on concurrency. High concurrency significantly increases KV-cache and runtime VRAM usage. So the service layer needs sensible parameters, such as maximum batch size, maximum context length, maximum tokens per user, timeout, and rate-limiting thresholds.
Without concurrency control, a single-GPU environment can easily suffer from VRAM fragmentation, request queuing, rising latency, and interrupted tasks.
6.3 Streaming Output and Timeout Mechanisms
For scenarios like coding assistants, intelligent Q&A, and document assistants, streaming output can noticeably improve the experience. But streaming output also needs to be paired with timeout, retry, and fallback strategies.
For example, when generation exceeds a threshold, the system can return partial results, switch to a backup model, or prompt the user to retry. For production environments, these mechanisms matter more than simply chasing a larger parameter count.
6.4 Logging, Monitoring, and Alerting
When deploying open-source models locally or in the cloud, you should establish basic observability. Logs should record request IDs, input length, output length, time to first token, total elapsed time, error type, and peak VRAM. Monitoring should cover GPU utilization, VRAM usage, process liveness, request-queue length, and abnormal restart counts.
If you use cloud infrastructure, you can combine common capabilities such as container platforms, object storage, logging services, and monitoring and alerting to handle model-file management, runtime tracking, and fault diagnosis.
7. How to Judge Whether a Model Fits Your Actual Business
Model evaluation should not rely only on general leaderboards. A meaningful evaluation builds a small-sample test set around business tasks and looks at quality, latency, stability, and resource usage.
7.1 Quality
Quality evaluation can include:
- Instruction-following accuracy;
- Code-generation runnability rate;
- Structured-output compliance rate;
- Multi-turn conversation consistency;
- Long-context summarization completeness;
- Factual accuracy;
- Hallucination rate;
- Safety and compliance behavior.
For code scenarios, focus on whether output formats are stable, whether they pass basic syntax checks, and whether the model can repair based on error messages.
7.2 Performance
Performance evaluation can include:
- Time to first token;
- Average time per generated token;
- Output tokens per second;
- Long-context time to first token;
- Throughput under multiple concurrent requests;
- Peak VRAM;
- Process stability;
- Memory-growth trend after prolonged running.
In single-GPU deployment, long-context performance is especially critical. A model may perform well in short conversations, but once the context exceeds a certain length, latency and VRAM usage can rise sharply.
7.3 Business Value
Ultimately, you have to return to business value. Developers should answer these questions:
- Does the model significantly reduce manual processing time?
- Is the error rate acceptable?
- Does the output require a lot of manual correction?
- Is it suitable for 24/7 operation?
- Does it meet content-safety and audit requirements?
- Can it run stably on existing hardware?
If these questions cannot be answered, then even a model that stands out on leaderboards may not be ready for production.
8. Common Mistakes
Only looking at total parameter count. A large total parameter count does not mean usability. Single-GPU deployment must consider VRAM usage and the quantization scheme.
Only looking at leaderboard scores. Leaderboard scores usually reflect general ability, but business tasks often care more about specific capabilities such as code, formatting, long text, and instruction following. Different models can vary markedly across tasks.
Only looking at weights, not context. Many models run at short context, but once long context or multi-turn conversation is enabled, VRAM usage rises sharply.
Only looking at single requests, not concurrency. A successful single request does not mean a stable service. Production must account for concurrency, timeouts, retries, rate limiting, and fallback.
Blindly chasing the strongest model. In engineering practice, “strongest” is not a static concept. A more reasonable definition is: the model that performs best overall under a given hardware, task, latency, and cost constraint.
9. Recommended Selection Process
If you need to choose an open-source LLM under a single 24GB VRAM card, you can follow this process.
Step 1: Define the task type. For intelligent Q&A, prioritize instruction following and factual consistency; for coding assistance, prioritize code generation, format stability, and error-repair ability; for long-document processing, prioritize context length and caching strategy.
Step 2: Filter by parameter scale. For 24GB VRAM, a model with too-large a total parameter count may lack enough headroom for long context and concurrency even after quantization. So prioritize sparse expert models with moderate total parameters and low activated parameters, and evaluate whether their low-bit quantized versions are mature.
Step 3: Build a VRAM budget. Separately calculate weight VRAM, KV-cache VRAM, and runtime overhead, and reserve a safety margin. Rely on actual framework testing, not theoretical formulas alone.
Step 4: Run a small-sample evaluation. Prepare 20 to 100 real task samples covering common questions, edge cases, and long-context problems. Compare models on quality, latency, peak VRAM, and stability.
Step 5: Gradually increase the load. Start with a single request, then progressively increase context length and concurrency. Watch whether VRAM approaches its limit, whether latency stays stable, and whether output quality degrades.
Step 6: Complete the service layer. Add logging, monitoring, alerting, rate limiting, timeouts, and fallback mechanisms. For critical business, prepare backup models or a human-in-the-loop fallback.
10. Conclusion
Under a single 24GB VRAM card, choosing an open-source LLM should not come down to “who has the most parameters” or “who tops the leaderboard.” It should start from engineering usability and weigh model architecture, quantization precision, context capability, inference efficiency, and business-task fit together.
For a single-GPU environment, a relatively advantageous direction is to choose a sparse expert model with moderate total parameters and low activated parameters, then keep it running stably within limited VRAM through 4-bit low-bit quantization, KV-cache optimization, context-length control, and concurrency-scheduling strategies.
More precisely, the “strongest” model in a single-GPU environment is not the number one on an abstract leaderboard, but the one that strikes the best balance among quality, speed, stability, and cost under fixed hardware conditions. For developers, building an awareness of VRAM budgeting, mastering quantization trade-offs, and improving the evaluation and monitoring systems offer more long-term value than simply hunting for a particular model name.
