Local Deployment and Performance Comparison of Small Multimodal Models: A Quantized Inference Perspective

    This article explores the local deployment of small-scale, open-source multimodal models (1B+ parameters), specifically comparing a Mixture of Experts (MoE) model with a dense model of similar size. It covers practical steps from model acquisition and quantization format selection to inference framework configuration and GPU/VRAM monitoring. Readers will gain insights into optimizing local deployment through quantization strategies, multimodal module loading, startup parameters, and objective performance and quality evaluation.

    Local Deployment of Small Models: From Installation to Performance Evaluation

    Recently, I deployed an open-source multimodal model with parameters in the billion-level range and a Mixture of Experts (MoE) architecture in a local environment. I also conducted a preliminary comparison with a dense model of a similar scale. The entire process involved model acquisition, quantization format selection, inference framework startup parameters, and observing VRAM and GPU usage. This article organizes these experiences into a general practice guide for developers needing local deployment.

    I. Why Focus on Small-Scale Models?

    While large-parameter models offer superior capabilities, their consumption of VRAM, computing power, and electricity is prohibitive for many use cases. The value of small-scale models (4B to 10B level) lies in:

    • Low Deployment Threshold: They can run on consumer-grade GPUs or even pure CPUs, making them suitable for personal developer machines and edge devices.
    • Fast Response Speed: Low prefill and decoding latency provides a near-instant interactive experience.
    • Low Cost per Token: Obvious throughput advantages in batch tasks.

    Of course, small models are usually weaker than large models in complex reasoning, long-context understanding, and knowledge breadth. Therefore, “good enough and affordable” is their true positioning.

    II. Quantization: The Core Variable for Resource Consumption

    Local deployment almost invariably relies on quantization. A common practice is to use mixed-precision quantization schemes widely adopted in the industry, such as compressing most weights to around 4-bit while retaining higher precision for specific sensitive layers, balancing size and quality. The performance differences of the same model under different quantization precisions can be significant:

    • Q4 Level: Small size and fast speed, making it the preferred choice for most consumer-grade scenarios.
    • Q8 / F16: Minimal quality loss, but VRAM usage doubles.
    • Mixed Strategy: Retaining high precision on key tensors often yields quality closer to the original model at a cost similar to Q4.

    When making an actual choice, it is recommended to run a set of benchmarks using your own typical tasks rather than just looking at the parameter count.

    III. Loading Multimodal Capabilities

    If the model supports image recognition, it usually requires loading an additional vision projection module. In local inference frameworks, a common practice is to specify the module’s path and precision (e.g., loading in F16 to preserve visual quality) in the startup command. An example command is as follows:

    1. llama-server -m model.gguf --mmproj mmproj.gguf --port 8080

    Note that the precision of the vision module directly affects image recognition quality. Compressing it too much may lead to noticeable degradation in OCR or chart understanding capabilities.

    IV. An Easily Overlooked Startup Parameter

    Some models require the --jinja parameter at startup. This parameter enables the inference framework to use a template engine to render the dialogue template instead of using the framework’s built-in simplified template. For new models with complex dialogue structures, system prompts, tool calls, or multi-turn history, enabling this ensures the prompt format matches the model’s training format, preventing output quality degradation. If you find the model’s response format abnormal or tool calls ineffective, check this parameter first.

    V. Observation Dimensions for Performance Comparison

    When comparing two models, do not just rely on a feeling of “seems a bit faster.” It is recommended to fix the following conditions and conduct quantitative observations:

    1. Same Quantization Precision and same context length configuration;
    2. Prefill Speed (prompt tokens/s): Affects the first token latency in long input scenarios;
    3. Generation Speed (tokens/s): Affects the interactive experience;
    4. VRAM Usage and GPU Utilization: Collect steady-state values via system monitoring tools;
    5. Reasoning Task Time: After enabling deep thinking mode, observe the cost differences during the reasoning chain generation phase.

    In this practice, the small MoE model showed certain advantages in speed and resource usage over a dense model of the same level, with costs approaching those of a dense model with fewer parameters. This aligns with the theoretical expectation of the MoE architecture: “large total parameters, few activated parameters.”

    VI. Evaluating the “Smartness”

    Resource consumption is only half the story; quality is the key factor determining whether a model can go live. It is recommended to build a small evaluation set:

    • Prepare 20 to 50 tasks closely related to your business (code, summary, QA, image recognition, etc.);
    • Run both models using the same prompts;
    • Manually score them on three dimensions: accuracy, format adherence, and hallucination rate.

    Avoid drawing conclusions based solely on occasional conversational impressions, as the margin of error for subjective feelings from small samples is very large.

    VII. Summary

    The process of locally deploying small models is not complicated. The real challenges lie in the selection of quantization schemes, the correct configuration of template parameters, and the establishment of an objective quality evaluation system. The maturity of the Mixture of Experts (MoE) architecture has allowed small models to find a new balance between cost and capability, making it a technical route worth serious evaluation for individual developers and teams requiring privatized deployment.