评测压缩大模型在手机上的性能,兼顾速度、省电与安全
PalmBench: A Comprehensive Benchmark of Compressed Large Language Models on Mobile Platforms
- 构建自动化框架,在多种手机上测试压缩模型表现
- 发现量化显著降低内存和功耗,但影响生成质量
- 适合移动端AI部署研究者和开发者参考
将大语言模型(LLMs)本地部署于移动设备,可避免数据外传带来的隐私风险,也适用于网络条件差的场景。近年来,MLC(2023a)和Gerganov(2023)等技术推动了这一进程。然而,受限于手机硬件,如何在生成质量、延迟和吞吐量之间取得平衡仍是挑战。本文提出轻量级、一体化的自动化基准测试框架,系统评估多种主流压缩模型(含权值与激活量化)在不同硬件能力的移动平台上的表现。不同于传统在高端GPU集群测试完整模型的基准,本研究聚焦资源效率(内存与功耗)及有害内容生成情况。关键发现包括:一、各手机平台在能效与吞吐量上存在差异;二、量化对内存占用、GPU执行时间与功耗有显著影响;三、量化模型相较原模型在准确率与性能上出现下降;四、压缩模型在手机端产生幻觉和有毒内容的频率更高。
原文摘要 · Abstract (English)
Deploying large language models (LLMs) locally on mobile devices is advantageous in scenarios where transmitting data to remote cloud servers is either undesirable due to privacy concerns or impractical due to network connection. Recent advancements (MLC, 2023a; Gerganov, 2023) have facilitated the local deployment of LLMs. However, local deployment also presents challenges, particularly in balancing quality (generative performance), latency, and throughput within the hardware constraints of mobile devices. In this paper, we introduce our lightweight, all-in-one automated benchmarking framework that allows users to evaluate LLMs on mobile devices. We provide a comprehensive benchmark of various popular LLMs with different quantization configurations (both weights and activations) across multiple mobile platforms with varying hardware capabilities. Unlike traditional benchmarks that assess full-scale models on high-end GPU clusters, we focus on evaluating resource efficiency (memory and power consumption) and harmful output for compressed models on mobile devices. Our key observations include i) differences in energy efficiency and throughput across mobile platforms; ii) the impact of quantization on memory usage, GPU execution time, and power consumption; and iii) accuracy and performance degradation of quantized models compared to their non-quantized counterparts; and iv) the frequency of hallucinations and toxic content generated by compressed LLMs on mobile devices.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。