Open-Source LLM Local Deployment: Capability, Cost, and Security Questions

    This article explains how to select an open-source LLM for local deployment by evaluating real capability boundaries, estimating VRAM requirements, and calculating monthly cost against existing API bills. It provides task-based evaluation steps, a weight-memory table for different model sizes and quantization levels, and a rough cost formula.

    How Should You Evaluate the Real Capability Boundaries of an Open-Source Model?

    Community discussions and early experience posts often mention that a new model performs well on front-end, 3D, or long-horizon tasks. However, these claims usually lack version numbers, test conditions, and scores, so they cannot be used directly for model selection. To determine whether a model fits your use case, you should test it yourself.

    Recommended evaluation steps:

    1. Fix the model version, quantization method, and inference parameters (temperature, maximum output length, and context window) so that results across different models are comparable.
    2. Collect 50 to 200 real tasks that cover your business scenario. Public benchmarks such as MMLU and HumanEval can serve as references, but they cannot replace testing within your own business context.
    3. Define pass criteria for each task. For code tasks, check whether the code compiles and passes unit tests. For documentation tasks, use a scoring rubric. For front-end page generation, check whether the rendered result meets the requirements.
    4. For long-horizon tasks, separately track completion rate, average number of steps, and whether the model can backtrack and correct errors on its own.
    5. When recording results, save the input, output, and failure reason together so you can review them later and compare new versions.

    Evaluation results from a quantized version cannot directly represent the capability of the original weights. The gap depends on the task type and quantization bit width, so you need to compare them on your own tasks.

    How Much VRAM Does Local Deployment Need?

    VRAM is mainly consumed by three parts: model weights, KV cache (which grows with context length and concurrency), and the overhead of the inference framework itself. The weight portion can be estimated with the following formula:

    Weight VRAM (GB) ≈ parameter count (billions) × bit width (bits) ÷ 8

    The table below calculates weights only. It does not include KV cache or framework overhead. In actual deployment, it is advisable to reserve an additional 20% to 30%; long-context or high-concurrency scenarios require even more.

    Model size 4-bit quantization 8-bit quantization 16-bit original precision
    7B About 3.5 GB About 7 GB About 14 GB
    30B About 15 GB About 30 GB About 60 GB
    100B About 50 GB About 100 GB About 200 GB

    Based on this estimate, a 24 GB consumer-grade GPU can run a 7B model at 8-bit fairly comfortably and can also run a 30B model at 4-bit, but the margin becomes very tight with long contexts. A 100B-level model requires about 50 GB of VRAM for weights even with 4-bit quantization, so multiple GPUs or a large-memory server are usually required.

    For mixture-of-experts (MoE) models, distinguish between two numbers. The total parameter count determines VRAM usage, while the active parameter count affects the computation and speed of a single inference. Check both numbers during model selection.

    How Should Costs Be Calculated?

    Hardware costs need to be compared with existing API bills. You can use the following rough formula to estimate monthly cost:

    Monthly cost = hardware purchase cost ÷ amortization period in months + electricity + operations labor

    Electricity is calculated as: average whole-system power (kW) × daily operating hours × 30 days × local electricity price. For example, with an average whole-system power of 0.45 kW, 8 hours of operation per day, and an electricity price of RMB 0.6 per kWh, the monthly electricity cost is about RMB 65.