text stringlengths 398 6.11k |
|---|
Power Infer-2: Fast Large Language Model Inference on a Smartphone Zhenliang Xue*, Yixin Song*, Zeyu Mi , Le Chen, Yubin Xia, and Haibo Chen Institute of Parallel and Distributed Systems (IPADS), Shanghai Jiao Tong University Abstract This paper introduces Power Infer-2, a framework designed for high-speed inference o... |
such as asymmetric big. LITTLE CPU cores, GPU, and NPU. Inference procedures without fully utilizing hardware features lead to suboptimal generation speed. Another challenge is the inevitable I/O overhead caused by cache misses. Although Power Infer-2 utilizes sparse activation to reduce the amount of weights required ... |
1071081091010 FLOPs0102103104105Execution Time (s) CPU (4 mid-cores) CPU (5 mid-cores + 1 big-core) CPU (8 cores)GPU NPU(a)Execution time of different FLOPs (multiplication of a 4096×4096 matrix with a vector under different batch size) on CPU, GPU and NPU. 48121620242832 48 64 Block Size (KB)0. 751. 001. 251. 501. 752... |
Flash DRAM Neuron Cache x PU CPU (I/O) CPU GPU NPU Flexible Neuron Loading Calculating Neuron Cluster Cold Neurons Hot Neurons Neuron Cluster Pipeline ... User Input H/W Spec -CPU:... -Mem:... -I/O:... Execution Plan + +Online Offline Profiler & Planner Predicated Activation Figure 2: The architecture overview of Power In... |
Flash L32 L1... DRAM Shared Mem L1 L2 L3 L4 L2 CPU (I/O) CPU NPU NPU /gid609 Dequant /gid608 I/O Read /gid610 Matmul Neuron Cache CPU CPU (I/O) CPU CPU CPU...... CPU Flash DRAM Neuron Cache /gid608 I/O Read /gid609 Pred&Cal (b) CPU-Centric Decoding (a) NPU-Centric Prefill Figure 3: Two computing workflows for prefill a... |
to selectively load weights during inference. It also bundles co-activated neurons and loads them together from Flash to reduce I/O operations. However, this method overlooks the skewed distribution of neuron activations, where a few hot neurons activate more frequently and are highly connected to most other neurons. T... |
Gate P P P PC CC C GIO CC C CC CC C CC C CUp C CC C UIO DIO CC C CDown C CC C CC C CC CC C UDIO CC C CP P P PC CC C GIO CC C CC C (Calculation) G (Gate) U (Up) D (Down) Wait UD /gid11Up+Down) (b) (a) CPU CPU CPU CPU CPU (I/O) CPU CPU CPU CPU CPU (I/O) P P (Predictor) Figure 4: Two types of pipelines that combine matrix... |
constraints, memory limit, and lower bound of decoding speed. Model: Parameters about the model collected by an of-fline profiler, such as the size of the model, sparsity levels and caching characteristics, etc. To accurately measure hardware and model characteristics, the planner utilizes an offline profiler to determ... |
Table 3: Hardware specifications of smartphones we used in the evaluation. “DRAM” is the physical memory size. “Available” is the maximum memory size that can be occupied by an application. Device Name DRAM / Available Storage So C One Plus 12 24GB / 19GB UFS 4. 0 Snapdragon 8 Gen 3 One Plus Ace 2 16GB / 11GB UFS 3. 1 ... |
Llama-13B Llama-7B Mistral-7B Mixtral-47B0255075Prefill Speed (tokens/s)397468 1036 5 3 4 6 6 7 Llama-13B Llama-7B Mistral-7B Mixtral-47B0255075 4888 87 30 49 74 4 7 73 Llama-13B Llama-7B Mistral-7B Mixtral-47B Prompt Length = 12802040 254542 8 35 4 3 3 4 52 Llama-13B Llama-7B Mistral-7B Mixtral-47B Prompt Length = 512... |
19181716151413121110987 Memory Size (GB)0. 02. 55. 07. 510. 012. 5Decoding Speed (tokens/s) 11. 68 3. 74Power Infer-2 LLMFlashllama. cpp Figure 9: Decoding speeds on various memory configurations with Turbo Sparse-Mixtral-47B on One Plus 12. Role-play Dialog Math Coding051015Decoding Speed (tokens/s)11. 8 11. 4 11. 5 1... |
No offload 50% offload One Plus 1205101520Decoding Speed (tokens/s)16. 4 10. 5 9. 3 0. 58. 4 No offload 50% offload One Plus Ace 205101520 10. 7 6. 37. 0 0. 34. 9 Power Infer-2 llama. cpp MLC-LLMFigure 11: Decoding speeds of Power Infer-2, llama. cpp, and MLC-LLM on Turbo Sparse-Mistral-7B with different offloading set... |
[12] Yichao Fu, Peter Bailis, Ion Stoica, and Hao Zhang. Break the sequential dependency of LLM inference using lookahead decoding, 2024. [13] Georgi Gerganov. ggerganov/llama. cpp: Port of Face-book's LLa MA model in C/C++. https://github. com/ ggerganov/llama. cpp, 2024. [14] i OS. https://www. apple. com/ios/ios-17/... |
[39] Zhengyan Zhang, Yankai Lin, Zhiyuan Liu, Peng Li, Maosong Sun, and Jie Zhou. Mo Efication: Transformer feed-forward layers are mixtures of experts. In Findings of ACL 2022, 2022. [40] Zhengyan Zhang, Yixin Song, Guanghui Yu, Xu Han, Yankai Lin, Chaojun Xiao, Chenyang Song, Zhiyuan Liu, Zeyu Mi, and Maosong Sun. Re... |
README.md exists but content is empty.
- Downloads last month
- 6