Local Deployment Guide: Choosing the Right Small-to-Mid-Size LLM for an 8GB GPU

    Choosing between 4B, 8B, and 12B open-source models for local deployment can be tricky when you only have 8GB of VRAM. This guide shares real-world benchmark results—startup time, generation speed, and memory usage—for text and multimodal models, along with practical selection advice for different workloads, a local-plus-cloud routing architecture, and a reproducibility checklist. Whether you're building a RAG pipeline, a daily coding assistant, or a local vision helper, this article helps you match model size to your hardware constraints.

    Local Deployment Guide: Choosing the Right Small-to-Mid-Size LLM for an 8GB GPU

    As open-source large language models and multimodal models iterate rapidly, more developers want to run models on their own machines. Compared with calling cloud APIs, local deployment offers better data privacy, lower long-term costs, and easier customization and fine-tuning experiments. But consumer GPUs have limited VRAM, so choosing the right model under hardware constraints is an engineering problem that deserves careful attention.

    This guide focuses on models in the 4B to 12B parameter range and documents their deployment behavior on an 8GB GPU, along with a selection framework you can apply directly.

    1. Test Environment and Methodology

    All tests were run on the same laptop with the following configuration:

    • 64GB physical memory on the host, with 32GB allocated to a Linux subsystem (Ubuntu-based).
    • 8GB VRAM on the dedicated GPU.
    • Model weights stored in the system default directory.

    All data in this round came from GPU inference only. The inference framework detected and used the GPU, but the local CUDA build toolchain was incomplete, so self-compiled inference engines might not fully exploit the GPU. The speed figures should therefore be treated as reference values for this specific environment; a fully configured setup may perform better. CPU inference was not used as a baseline, and CPU data does not factor into any conclusions.

    One important caveat: the original test records did not fully preserve the following conditions—exact model versions, quantization formats, inference framework versions, CUDA and driver versions, context length, batch size, prompt and output lengths, and how VRAM was measured. This article does not fabricate that information. If you want to reproduce these results, fix these parameters first, then compare item by item.

    2. Core Performance Data

    Without any extreme optimizations, we ran a first round of hands-on tests on four models: two text-only models and two multimodal models. Metrics included on-disk model size, cold and warm startup times, text generation speed, and VRAM usage during warm runs.

    Model Type On-disk Size Cold Start Warm Start Generation Speed VRAM (Warm Run)
    4B text model Text-only ~2.5GB ~12.3s 0.13–0.16s 38–43 tok/s ~2.7–2.8GB
    8B text model Text-only ~5.2GB ~16.8s ~0.23s 22–26 tok/s ~4.9GB
    4B multimodal model Multimodal ~9.6GB ~14.4s 0.66–0.72s 54–56 tok/s ~3.1GB
    12B multimodal model Multimodal Not fully measured Noticeably slower Not measured Not measured Not measured

    A few notes on this table. First, the 4B multimodal model’s weights occupy 9.6GB on disk, but warm-run VRAM was only around 3.1GB. Disk size and VRAM usage do not correspond one-to-one; this gap typically comes from configurations such as weight offloading or memory mapping. Since the specific configuration was not recorded, readers should treat the 3.1GB figure as the result of a particular setup, not a fixed VRAM requirement of the model. Second, the 12B multimodal model was only observed qualitatively: it takes noticeably longer on long texts and complex images, but produces richer detail. It has no complete size, startup, VRAM, or speed data, so it should not be directly compared with the other three models.

    3. Choosing a Model by Use Case

    3.1 Everyday Text Interaction: The 8B Text Model Is Well Balanced

    If your goal is to keep a model resident locally for Q&A, coding assistance, or long-form writing, the 8B text model delivered the most balanced results in this round. Its warm-run VRAM is about 4.9GB, leaving headroom for the operating system and GUI. Warm startup takes roughly 0.23 seconds, so switching back to the model is essentially instantaneous. Generation speed of 22–26 tok/s keeps pace with human reading. In Chinese-language scenarios, its output was reasonably stable, though no systematic quality evaluation was performed—treat that as a preliminary observation only.

    Note that long contexts cause the KV cache to grow continuously, pushing VRAM usage upward. If you plan to run the 8B model as your long-term daily driver, test VRAM behavior at different context lengths first, identify where you approach the VRAM ceiling, and set your maximum usable context length accordingly.

    3.2 Lightweight Pipeline Tasks: The 4B Text Model Uses Fewer Resources

    In pipelines such as RAG preprocessing, common tasks include intent classification, title generation, short-text rewriting, and entity extraction. These tasks don’t demand deep reasoning but are sensitive to throughput and resource consumption. The 4B text model uses about 2.7–2.8GB of VRAM during warm runs, starts in 0.13–0.16 seconds when warm, and generates at 38–43 tok/s—making it a solid candidate node in a pipeline.

    One caveat: VRAM numbers alone cannot tell you whether multiple instances can run concurrently on the same GPU. Assessing concurrency requires additional benchmarks of concurrent request count and throughput. It’s also recommended to constrain the output format (e.g., a fixed JSON schema) and validate accuracy against labeled samples to confirm the model actually works for your specific task.

    3.3 Local Vision Assistance: The 4B Multimodal Model Handles Basic Tasks

    For basic vision tasks such as describing architecture diagrams or extracting amount fields from screenshots, the 4B multimodal model produced usable output in this round. Its generation speed of 54–56 tok/s is higher than either text-only model. However, its performance depends on several factors: image resolution, how the vision encoder is loaded, and context length. This round only assessed usability—no recognition accuracy was measured—so you cannot infer its reliability on specific image types from these results.

    3.4 Complex Visual Understanding: The 12B Model Needs Further Testing

    For dense-text OCR reconstruction or reasoning about data relationships in complex charts, the 12B multimodal model is the stronger candidate because it produces richer detail. But its cold start is slow and long outputs take considerable time, making it a poor default service. One viable architecture: route requests to the 4B multimodal model first, then invoke the 12B model for a second-pass confirmation when confidence is low or human review flags a need for deeper parsing. Confidence thresholds should be determined using labeled data, not set by gut feeling.

    4. Combining Local and Cloud Resources

    Purely local deployment offers high autonomy, but 8GB of VRAM on a single machine strains quickly under bursty concurrency or complex inference workloads. A common pattern is “local first, cloud fallback.” Concretely, wrap the model endpoints behind a unified API gateway with routing rules such as:

    • Route routine requests to the local 4B or 8B model.
    • Set the timeout threshold based on your locally measured P95 latency, not guesswork.
    • Fall back to the cloud when VRAM runs out or an OOM error occurs.
    • Cap the local queue length; when exceeded, return a queue notification or reject the request to avoid overwhelming the local service.
    • Log every routing decision and its latency, and adjust thresholds based on that data.

    For the cloud side, you can pick a platform offering GPU compute—for example, Baidu AI Cloud’s deep learning compute platform or its Qianfan model platform. These platforms provide higher-spec compute, but keep two things in mind. First, these are illustrative examples, not recommendations; compare pricing, API compatibility, and data compliance terms before committing. Second, one of the original reasons for local deployment is privacy—before routing sensitive data to the cloud, establish a clear data classification policy that only allows non-sensitive requests to fall back to the cloud.

    5. Common Issues and Troubleshooting

    • Thinking you’re using the GPU when you’re not: Confirm the framework logs show the GPU was loaded, and watch whether VRAM usage changes during inference.
    • Disk space filling up: Model weights are stored in system directories by default, and multiple models add up quickly. Plan your storage paths in advance.
    • Slow cold starts: The first load must read all weights from disk. A resident service avoids paying the cold-start cost on every request.
    • VRAM numbers don’t match expectations: Check whether weight offloading, quantization, or memory mapping is enabled—these settings significantly change VRAM usage.
    • Inference engine can’t use the GPU: Verify the driver version matches your CUDA version, and confirm the build toolchain is complete when compiling yourself.

    6. Reproducibility Checklist

    Before reproducing the data in this article, record and fix the following:

    1. Model name and version
    2. Quantization format
    3. Inference framework and version
    4. CUDA and driver versions
    5. Context length
    6. Batch size
    7. Prompt length and output length
    8. Measurement script
    9. VRAM sampling method and interval
    10. Number of repetitions and how results are aggregated (e.g., median)

    Only when all of these conditions are fixed will data from different machines be comparable.

    7. Conclusion

    With 8GB of VRAM, model selection should always start from the task at hand. The 8B text model works well as a daily generalist, the 4B text model fits lightweight pipeline nodes, the 4B multimodal model supports basic vision assistance, and the 12B multimodal model is best reserved as a second-pass candidate. Quantization techniques and inference frameworks continue to evolve, and the local experience will likely improve along with them—but real results still need to be validated in your own environment with your actual workloads.