ChatPaper.aiChatPaper

PowerInfer-2: 스마트폰에서의 고속 대규모 언어 모델 추론

PowerInfer-2: Fast Large Language Model Inference on a Smartphone

June 10, 2024
저자: Zhenliang Xue, Yixin Song, Zeyu Mi, Le Chen, Yubin Xia, Haibo Chen
cs.AI

초록

본 논문은 스마트폰에서 대규모 언어 모델(LLM)의 고속 추론을 위해 설계된 PowerInfer-2 프레임워크를 소개합니다. 특히, 이 프레임워크는 모델 크기가 장치의 메모리 용량을 초과하는 경우에 효과적으로 작동합니다. PowerInfer-2의 핵심 통찰은 스마트폰의 이기종 계산, 메모리 및 I/O 자원을 활용하기 위해 기존의 행렬 계산을 세분화된 뉴런 클러스터 계산으로 분해하는 것입니다. 구체적으로, PowerInfer-2는 LLM 추론의 다양한 단계에 맞춰 계산 전략을 조정하는 다형성 뉴런 엔진을 특징으로 합니다. 또한, 세그먼트된 뉴런 캐싱과 세분화된 뉴런 클러스터 수준의 파이프라이닝을 도입하여 I/O 작업으로 인한 오버헤드를 효과적으로 최소화하고 숨깁니다. PowerInfer-2의 구현 및 평가 결과, 두 대의 스마트폰에서 다양한 LLM 모델을 지원하며 최신 프레임워크 대비 최대 29.2배의 속도 향상을 달성할 수 있음을 보여줍니다. 특히, PowerInfer-2는 스마트폰에서 TurboSparse-Mixtral-47B 모델을 초당 11.68 토큰의 생성 속도로 서비스하는 최초의 시스템입니다. 메모리에 완전히 적합한 모델의 경우, PowerInfer-2는 llama.cpp 및 MLC-LLM과 비슷한 추론 속도를 유지하면서 메모리 사용량을 약 40% 줄일 수 있습니다. 더 자세한 내용과 데모 비디오는 프로젝트 사이트(www.powerinfer.ai/v2)에서 확인할 수 있습니다.
English
This paper introduces PowerInfer-2, a framework designed for high-speed inference of Large Language Models (LLMs) on smartphones, particularly effective for models whose sizes exceed the device's memory capacity. The key insight of PowerInfer-2 is to utilize the heterogeneous computation, memory, and I/O resources in smartphones by decomposing traditional matrix computations into fine-grained neuron cluster computations. Specifically, PowerInfer-2 features a polymorphic neuron engine that adapts computational strategies for various stages of LLM inference. Additionally, it introduces segmented neuron caching and fine-grained neuron-cluster-level pipelining, which effectively minimize and conceal the overhead caused by I/O operations. The implementation and evaluation of PowerInfer-2 demonstrate its capability to support a wide array of LLM models on two smartphones, achieving up to a 29.2x speed increase compared with state-of-the-art frameworks. Notably, PowerInfer-2 is the first system to serve the TurboSparse-Mixtral-47B model with a generation rate of 11.68 tokens per second on a smartphone. For models that fit entirely within the memory, PowerInfer-2 can achieve approximately a 40% reduction in memory usage while maintaining inference speeds comparable to llama.cpp and MLC-LLM. For more details, including a demonstration video, please visit the project site at www.powerinfer.ai/v2.

Summary

AI-Generated Summary

PDF395December 8, 2024