Local Deployment and Inference Capabilities of Small-to-Medium Multimodal Models
This article explores the local deployment and inference capabilities of small-to-medium parameter multimodal models. It discusses why smaller models are gaining attention, the required scale for visual understanding tasks, and strategies for enhancing model capacity through post-training. Additionally, it addresses the "overthinking" problem in reasoning, tool-calling implementations, open-source adaptation, and practical recommendations for developers to deploy these models effectively in local environments.
I. Why Small-Scale Models Are Gaining Attention
When developers run models locally, the primary constraint is GPU memory capacity. Estimating by parameter count, the space occupied by model weights at different precisions is roughly as follows: 16-bit floating point takes about 2GB per billion parameters, 8-bit integer takes about 1GB, and 4-bit integer takes about 0.5GB. These figures only account for the weights. Inference-time activations, KV cache, and runtime overhead require additional reserved space. Therefore, models with 5 to 12 billion parameters can typically run in quantized formats on consumer-grade GPUs or unified memory devices, whereas larger versions often require multi-GPU setups or server resources.
This is even more evident in image generation models. While larger models generally offer higher generation quality, local users cannot frequently invoke them. Smaller models are well-suited for rapid sketch iteration, batch asset generation, and processing sensitive content that cannot be uploaded to the cloud. Consequently, a common industry practice is to offer multiple specifications under the same technical approach, allowing users with varying hardware conditions to find a viable option.
The open-source community’s expectations for models also center on three points: local deployability, self-fine-tuning capability, and reproducible results. A small model with clear specifications and comprehensive documentation often drives community practice more effectively than a large model merely pushing the upper limit of parameters.
II. What Scale is Required for Visual Understanding?
When discussing visual capabilities, it is necessary to first distinguish the task levels. A common breakdown is as follows:
- Perception layer: Recognizing text, objects, and basic layout. Typical tasks include OCR and object detection.
- Description layer: Summarizing image content using natural language, such as generating an image caption.
- Reasoning layer: Answering questions based on screenshots or charts that require comparison, calculation, or judgment. For example, determining which quarter had the fastest growth based on a line chart, or explaining the steps required to complete an operation based on a UI screenshot.
The first two layers have relatively lower requirements for model scale, primarily relying on the quality of the visual encoder. The third layer of tasks depends on both the accurate extraction of visual information and language reasoning capabilities. If a model can only recognize numbers in a chart but cannot perform multi-step calculations based on them, its practical value is significantly diminished.
In terms of model architecture, the Mixture of Experts (MoE) architecture distinguishes between “total parameters” and “active parameters.” Total parameters determine the knowledge capacity stored in the model, while active parameters determine the scale of actual computation during each inference. The judgment provided by the team during discussions is that a sparse model with around 3 billion active parameters is already capable of handling reasoning tasks for UI screenshots and charts. This judgment is based on internal team experience, and specific benchmark numbers are not cited in this article.
To verify this conclusion, readers can build an evaluation set using their own business data. It is recommended to cover the following four categories of tasks, with tens to hundreds of samples per category:
- UI screenshot Q&A, such as asking about the status or location of a specific button;
- Chart value comparison, such as determining in which category the maximum value occurs;
- Multi-step process reasoning, such as inferring the sequence of steps to complete a task based on a UI;
- Anomaly detection, such as pointing out missing required fields in a form.
The evaluation process is illustrated below:
dataset = load_eval_set("ui_and_chart_reasoning")results = []for sample in dataset:start = now()answer = model.generate(image=sample.image, prompt=sample.question)latency = now() - startscore = judge(answer, sample.reference)results.append((sample.category, score, latency))report(aggregate_by_category(results))
The scoring method should be selected based on the question type. Numerical answers can use rule-based matching, while open-ended answers can be evaluated by a stronger model or manual spot-checking. Looking only at overall accuracy can easily mask shortcomings in a specific category of tasks, making category-based statistics more valuable.
III. Model Capacity Limits: Parameter Scale and Post-Training
When asked whether the model has “absorbed” all the capabilities its scale can accommodate, the team’s core response was that there is still significant room for improvement, especially in the post-training stage.
Pre-training and post-training serve different responsibilities. In the pre-training stage, the model learns basic representations of language and vision from massive data, determining the breadth of its knowledge. The post-training stage includes supervised fine-tuning, reinforcement learning, and preference alignment, which determine how the model organizes and utilizes its existing capabilities—for instance, whether it reasons step-by-step, follows instruction formats, or refuses to answer when uncertain.
Therefore, there are two paths to enhancing model capabilities. The first is to scale up parameters, which typically improves long-tail knowledge and fine-grained representation. The second is to invest more in data quality control and reinforcement learning at a given scale, which often improves reasoning stability and user experience. The team stated that both paths will be pursued: they plan to train larger models while continuing post-training on existing scales.
For developers, diagnosing the cause of failures helps in choosing an optimization direction:
- If errors primarily stem from broken reasoning chains, such as miscalculating intermediate steps or skipping conditions, prioritize adjustments to post-training and reasoning strategies.
- If errors mainly come from missing information, such as the model never having learned specific domain terminology or being unable to recognize small-font content in charts, it is more likely that a larger-scale model or higher-resolution input is needed.
IV. Overthinking: An Unresolved Issue in Post-Training
Overthinking refers to the model generating lengthy reasoning processes for simple questions. This causes three direct problems: increased response latency, higher inference costs, and self-denial during intermediate reasoning, which can ultimately lead to a worse final answer. The team acknowledged that this issue remains unresolved in post-training.
The root cause is closely related to reward design. If reinforcement learning only rewards based on whether the final answer is correct, the model lacks the motivation to compress its reasoning process. When longer reasoning improves accuracy, the model tends to trade more length for a higher score.
Common mitigation strategies in the industry include the following:
- Length-aware rewards: Penalizing reasoning processes that exceed a reasonable length, provided the answer is correct.
- Difficulty stratification: Grouping training data by difficulty, allowing simple questions to correspond to short reasoning and difficult questions to retain longer reasoning.
- Reasoning budget: Setting a maximum thinking length during inference; if exceeded, requiring the model to directly provide a conclusion.
- Dual-mode design: Supporting both quick answers and deep reasoning within the same model, determined by prompts or routing strategies.
An illustrative implementation of a length-aware reward is as follows:
def shaped_reward(answer_correct, reasoning_tokens, budget):if not answer_correct:return 0.0overflow = max(0, reasoning_tokens - budget)penalty = min(0.5, overflow / budget)return 1.0 - penalty
The penalty intensity must be set carefully. If the penalty is too strong, the model will end prematurely on difficult questions, causing a drop in accuracy. In practice, you should monitor both accuracy and average reasoning length simultaneously to find a balance between the two, and use an independent validation set to verify the effect, avoiding the optimization of only training set metrics.
V. Local Deployment, Tool Calling, and Open-Source Adaptation
The team also addressed issues regarding local deployment, tool calling, and open-source adaptation. These three aspects directly affect whether developers can put the model into practical use.
Regarding tool calling, the model needs to output structured function calling parameters for external programs to execute. Developers typically need to do three things: define clear function descriptions, validate whether the model’s output parameters conform to the format, and design retry or degradation strategies for parsing failures. An example of a function description is as follows:
{"name": "get_chart_value","description": "Read the value of a specified data series at a certain x-coordinate in the chart","parameters": {"series": "string","x": "string"}}
The more specific the function description, the less likely the model is to misuse the tool. Parameter names should directly correspond to business meanings, and units and value ranges should be specified in the description.
In terms of open-source adaptation, inference environment consistency is an often overlooked aspect. The model’s quantization method, input image resolution handling, and prompt templates all affect the output results. The team recommends that developers fix these configurations during deployment and record the checksum of the model files. This way, when an abnormal result occurs, it can be investigated whether it was caused by a model change or an environment change.
VI. Deployment Recommendations for Developers
Synthesizing the above content, actual projects can proceed in the following order:
- First, reverse-engineer the acceptable parameter scale and quantization precision based on your hardware budget before deciding on candidate models.
- Build categorized evaluation sets using proprietary business data and analyze results by task category rather than looking only at overall accuracy.
- Monitor output length and response latency simultaneously to determine reasoning budgets before deployment.
- Perform strict format validation on tool calling outputs and design appropriate fallback strategies.
