Selecting and Deploying Local LLMs on 8GB VRAM

    This article provides a practical framework for selecting and deploying local large language models (LLMs) on a machine with 8GB of VRAM. It evaluates four model categories—4B text, 8B text, efficient multimodal, and large multimodal—across key metrics like startup time, generation speed, and memory footprint. The guide offers concrete model-to-task mappings for daily use, automation pipelines, and visual understanding, along with deployment-level considerations for optimizing performance on resource-constrained hardware.

    Selecting and Deploying Local LLMs on 8GB VRAM

    The rapid advancement of open-source small language models has made it increasingly feasible for individual developers to run local LLMs on their laptops or workstations for tasks like writing assistance, coding support, text processing, and image understanding. However, a practical challenge remains: with limited VRAM and system memory, and significant performance variance across models, which one should you actually install?

    This article bypasses theoretical discussions and provides an actionable selection and deployment methodology based on a typical mobile development machine with 8GB of VRAM.

    Test Environment and Evaluation Criteria

    The test environment is a typical personal development machine: a host with 64GB of RAM, of which 32GB is allocated to a virtualized subsystem, paired with a mobile GPU featuring 8GB of VRAM. All models were loaded and run locally using a local inference runtime. All tests were conducted on the same machine under identical conditions to ensure comparability of results.

    Evaluating whether a local model is suitable for everyday use requires more than just looking at parameter count. The following four dimensions are recommended:

    1. Cold-start load time: The time required to load the model from disk into VRAM. This affects the experience of the first invocation and determines whether the model is suitable for on-demand start/stop usage.
    2. Warm-start load time: The startup time when the model is already cached. When this metric approaches zero, the model is suitable for frequent invocation by scripts or pipelines.
    3. Generation speed (tok/s): Directly determines interactive experience. Below 15 tok/s, long responses will noticeably test your patience.
    4. Hot-run VRAM footprint: Must leave headroom for the system and other processes. On an 8GB VRAM machine, keeping single-model usage within 5GB is recommended.

    Categorizing the Candidate Models

    The four model types compared in this article can be grouped into three tiers based on use case, which is more instructive than ranking them purely by parameter count.

    4B-Class Text-Only Model: Local size is approximately 2.5GB, with hot-run VRAM usage around 2.7GB. Generation speed reaches 38–43 tok/s, and warm-start time is roughly 0.15 seconds. Its positioning is not as a “primary brain” but as a lightweight node in pipelines—tasks such as title generation, short-text rewriting, intent classification, and tag extraction are ideal for this model, given its low cost and rapid response. It is important to define its boundaries: do not assign complex reasoning or long-chain tasks to it, as output quality will be noticeably insufficient.

    8B-Class Text-Only Model: Local size is approximately 5.2GB, with VRAM usage approaching 4.9GB. Generation speed ranges from 22–26 tok/s. This model delivers the most stable Chinese output among the four. It is the preferred choice when you need only one daily-use text model for everyday tasks: its capabilities sufficiently cover summarization, rewriting, Q&A, and code snippet explanations, while resource consumption remains within the acceptable range of 8GB VRAM.

    Efficient Multimodal Model: Although its local size is close to 9.6GB, its efficient architecture keeps hot-run VRAM usage at approximately 3.1GB, and its generation speed is the fastest among all four models (54–56 tok/s). Its core value lies in image understanding—reading screenshots, explaining charts, and describing interfaces—achieving a level that is practically useful for daily assistance. If your workflow involves visual input, this model offers exceptional cost-effectiveness.

    Large-Parameter Multimodal Model: This model produces more detailed image descriptions and better detail reconstruction, but the trade-offs are direct and apparent—slow cold startup, slow generation, and long outputs that easily exhaust patience. It is suitable for occasional complex visual understanding tasks but is not recommended as a default model.

    Use Case 1: Single Daily-Use Text Assistant

    Prioritize the 8B-class text-only model. Stability of Chinese output is the most critical factor, followed by VRAM headroom—a 4.9GB footprint leaves enough room to run a browser and editor simultaneously without triggering VRAM swapping. It is advisable to configure the context length to match actual requirements in the inference settings, avoiding the default oversized context windows that consume unnecessary VRAM.

    Use Case 2: Lightweight Node in Automated Pipelines

    Choose the 4B-class model. Its typical usage is as a preprocessing component:

    1. # Example: Using a lightweight model as a text preprocessing node
    2. def preprocess(text: str) -> dict:
    3. prompt = f"Classify the following text and extract keywords: {text}"
    4. result = local_model.generate(prompt, max_tokens=128)
    5. return parse(result)

    The key here is leveraging the model’s extremely short warm-start time, which validates the “invoke on demand, discard after use” pattern without requiring the model to remain resident in VRAM.

    Use Case 3: Screenshots, Charts, and Document Understanding

    Use the efficient multimodal model by default, as it balances speed and quality. Only when encountering highly information-dense complex charts requiring strict detail fidelity should you temporarily switch to the large-parameter multimodal model. A practical strategy is to first generate a quick draft with the smaller model, then decide whether to upgrade based on task complexity, thereby minimizing invocations of the slower model.

    Deployment-Level Considerations

    • GPU Detection: When deploying within a virtualized subsystem, first verify that the inference runtime can correctly identify the GPU. Otherwise, all performance discussions become meaningless.
    • CPU Baseline Is Reference Only: If the inference framework uses a CPU-built version, the performance data obtained serves only as a lower-bound baseline, not a final conclusion. The difference before and after compiling a GPU-enabled version can be substantial.
    • Cold-Start Optimization: For models with slow load times, consider using a persistent service mode or setting a reasonable keep-alive duration to avoid paying a load cost of over ten seconds per request.
    • Template Issues: Pay special attention to the default conversation templates of some models. Template mismatches can lead to noticeably degraded output quality, so this should be the first item checked during troubleshooting.

    Conclusion

    Under the constraint of 8GB VRAM, model selection is not about “which model is strongest” but rather “which model best fits this position.” The 4B-class model serves as a lightweight node, the 8B-class model handles daily Chinese text tasks, the efficient multimodal model covers vision-related workloads, and the large-parameter multimodal model remains a fallback for demanding tasks. This combination covers the majority of individual scenarios on a standard development machine. For scenarios requiring greater compute or team collaboration, a validated local solution can be migrated to cloud GPU instances or model service platforms to scale elastically, forming a complete workflow of “lightweight local validation plus elastic cloud expansion.”