Back to home

Compare

Comparing: On-Device Inference: From 596 Seconds to 10, but Not Through Smaller Models & 端侧模型从596秒压到10秒,瓶颈其实不在参数规模

AEN
MiniMaxon-device modelsGPU·

On-Device Inference: From 596 Seconds to 10, but Not Through Smaller Models

Reducing latency from 596 seconds to 8–11 seconds did not hinge on making the model smaller; it required rebuilding the inference pipeline. Quantization contributed less than half of the speedup, while the runtime and GPU backend each delivered an order-of-magnitude improvement, and narrowing the output fields barely changed the model itself. We believe competition in on-device AI is shifting from parameter count to systems engineering.

What This Is

This is a retrospective on optimizing an on-device screenshot-recognition model. The team first applied 8-bit quantization (reducing the precision of model weights to lower memory and compute requirements), bringing latency down to 208 seconds. Switching to the official on-device runtime reduced it to 61.9 seconds, and moving to the GPU backend brought it down further to 17.4 seconds. Finally, the team restricted the output to four necessary fields, lowering latency to 8–11 seconds.

Notably, the final step did not improve the model’s capabilities; it merely reduced the amount of content it had to generate. Vision-language models generate text fragments one Token at a time (a Token is the basic unit of text generated by a model), so the more complete the output, the longer the processing time. Constrained decoding (generating only from a predefined set of permitted results) can also reduce formatting errors and rework.

Industry View

The value of on-device models goes beyond faster responses. If balances, order numbers, and the last four digits of card numbers in payment screenshots never leave the device, teams no longer have to continually explain why the data needs to be uploaded. But this approach comes with trade-offs: without cloud OCR (Optical Character Recognition, or extracting text from images) or full-screen access, the task must be handled by a smaller, less accurate model.

The risks are equally clear. Without fixed test samples and minimum accuracy thresholds, speed gains may come at the cost of recognition quality. Differences in on-device chips, memory, and thermal performance also make it difficult to reproduce laboratory results directly on real users’ devices. We believe parameter scale is more like an entry ticket; runtimes, backends, decoding constraints, and quality testing determine whether a product is actually usable.

Impact on Regular People

For enterprise IT: Applications involving internal screenshots, transaction records, or customer data should prioritize evaluating on-device processing. However, acceptance criteria should include recognition accuracy, retry latency, and device-to-device differences rather than benchmark scores alone.

For individual work: High-frequency, small-scale tasks such as offline summarization and image classification may become faster and less dependent on cloud services. Complex recognition tasks may still require an internet connection, while permission and privacy design will directly shape the user experience.

For the consumer market: More smartphone functions will be completed locally, but on-device models are not inherently more accurate. What consumers ultimately experience will depend on whether response speed, recognition quality, and privacy commitments can all hold at once.

Source: juejin.cn
BZH
MiniMax端侧模型GPU·

端侧模型从596秒压到10秒,瓶颈其实不在参数规模

596 秒降到 8 至 11 秒,关键并不是把模型做得更小,而是重做推理链路:量化贡献不到一半提速,运行时和 GPU 后端各带来一次数量级变化,最后裁剪输出字段几乎没有改动模型。我们认为,端侧 AI 的竞争正在从参数规模转向系统工程。

这是什么

这是一次手机端截图识别模型的优化复盘。团队先采用 8bit 量化(把模型权重精度压低,以减少内存和计算负担),耗时降至208秒;换成官方端侧运行时后降至61.9秒;切到 GPU 后端后为17.4秒;最后把输出限制为4个必要字段,耗时进一步降至8至11秒。

值得注意的是,最后一步没有提升模型能力,只减少了需要生成的内容。视觉大模型逐个生成文本片段(Token,模型输出文本的基本单位),输出越完整,耗时越长。约束解码(只在预先允许的结果中生成)还能减少格式错误和返工。

行业怎么看

端侧模型的价值不只是响应更快。支付截图中的余额、订单号和卡号后四位如果不上传,团队就不必持续解释数据为何需要离开设备。但这一路线也有代价:不能调用云端 OCR(光学字符识别,即从图片中提取文字),不能读取全屏权限,只能依靠更小、精度更低的模型承担任务。

风险同样明确。没有固定的测试样本和通过率门槛,速度提升可能伴随识别质量下降;而端侧芯片、内存和散热差异,会让实验室数据难以直接复制到真实用户设备。我们认为,参数规模更像入场券,运行时、后端、解码约束与质量测试,才决定产品是否可用。

对普通人的影响

对企业 IT:涉及内部截图、交易记录或客户资料的应用,可以优先评估端侧处理,但应把识别准确率、重试耗时和设备差异纳入验收,而不是只看跑分。

对个人职场:离线摘要、图片分类等高频小任务可能更快,也更少依赖云端服务;但复杂识别仍可能需要联网,权限与隐私设计会更直接影响使用体验。

对消费市场:手机功能会更多在本地完成,但端侧模型不等于天然更准。消费者最终感受到的,将是响应速度、识别质量与隐私承诺能否同时成立。

Source: juejin.cn