这篇论文提出了一种在手机上跑大模型的新思路:不加载全部神经元,只算有用的部分。效果不错,内存和计算都省很多,关键是精度没掉。
SelectInfer是一个神经元级优化框架,通过离线分析识别任务特定和通用神经元,实现选择性加载和动态计算。在多个数据集上评估,内存占用减少40%-60%,计算量降低30%-50%,同时保持任务性能。该方法无需重新训练或微调,适用于资源受限的边缘设备。
SelectInfer: Selective Neuron Loading and Computation for On-Device LLMs
Large Language Models (LLMs) have demonstrated remarkable capabilities across a range of Natural Language Processing (NLP) tasks, but their high computational and memory demands pose significant challenges for deployment on resource-constrained edge devices. Existing approaches to model compression and optimization often rely on coarse-grained pruning or quantization, which can compromise accuracy or require re-training and fine-tuning. In this work, we introduce SelectInfer, a neuron-level optimization framework that enables efficient LLM inference on edge devices through selective neuron loading and computation. By profiling and identifying both task-specific and general-purpose neurons using an offline LLM profiler, SelectInfer implements two key optimizations: selective loading, which reduces memory footprint by selectively loading a subset of neurons that were identified to be most important during the offline stage, and selective computation, which dynamically computes only the most relevant neurons at runtime. Evaluation across multiple datasets shows that SelectInfer achieves significant reductions in memory footprint and computation while preserving task performance, making it a practical step towards enabling LLM deployment on edge devices