ChatPaper.aiChatPaper

인터넷을 통한 대규모 언어 모델의 분산 추론 및 미세 조정

Distributed Inference and Fine-tuning of Large Language Models Over The Internet

December 13, 2023
저자: Alexander Borzunov, Max Ryabinin, Artem Chumachenko, Dmitry Baranchuk, Tim Dettmers, Younes Belkada, Pavel Samygin, Colin Raffel
cs.AI

초록

대규모 언어 모델(LLMs)은 다양한 자연어 처리(NLP) 작업에서 유용하며, 모델 크기가 커질수록 성능이 향상됩니다. 현재 최고의 오픈소스 모델들은 500억 개 이상의 파라미터를 가지고 있습니다. 그러나 이러한 500억 이상의 파라미터를 가진 모델을 사용하려면 고성능 하드웨어가 필요하며, 이는 대부분의 연구자들에게 접근하기 어려운 상황을 초래합니다. 본 연구에서는 LLM의 비용 효율적인 추론 및 미세 조정 방법을 탐구하며, 로컬 및 분산 전략을 비교합니다. 우리는 충분히 큰 모델(500억 이상)이 소비자 급 네트워크에서 지리적으로 분산된 장치에서도 효율적으로 실행될 수 있음을 관찰했습니다. 이는 여러 연구 그룹과 자원봉사자들의 유휴 컴퓨팅 자원을 모아 LLM을 효율적으로 실행할 수 있는 가능성을 시사합니다. 우리는 두 가지 미해결 문제를 다룹니다: (1) 어떤 장치가 갑자기 연결이 끊어져도 안정적으로 추론과 미세 조정을 수행하는 방법, (2) 하드웨어 성능이 불균일한 장치들 간에 LLM을 분할하고 자유롭게 참여 및 탈퇴할 수 있는 방법. 이를 위해, 우리는 특별한 내결함성 추론 알고리즘과 장치를 자동으로 할당하여 전체 시스템 처리량을 극대화하는 로드 밸런싱 프로토콜을 개발했습니다. 우리는 이러한 알고리즘을 Petals라는 분산 시스템에서 구현하여, Llama 2(700억)와 BLOOM(1,760억)을 인터넷을 통해 실행하며 인터랙티브 생성 작업에서 오프로딩보다 최대 10배 빠른 성능을 보여줍니다. 우리는 시뮬레이션 환경과 두 대륙에 걸친 실제 환경에서 시스템 성능을 평가합니다.
English
Large language models (LLMs) are useful in many NLP tasks and become more capable with size, with the best open-source models having over 50 billion parameters. However, using these 50B+ models requires high-end hardware, making them inaccessible to most researchers. In this work, we investigate methods for cost-efficient inference and fine-tuning of LLMs, comparing local and distributed strategies. We observe that a large enough model (50B+) can run efficiently even on geodistributed devices in a consumer-grade network. This could allow running LLM efficiently by pooling together idle compute resources of multiple research groups and volunteers. We address two open problems: (1) how to perform inference and fine-tuning reliably if any device can disconnect abruptly and (2) how to partition LLMs between devices with uneven hardware, joining and leaving at will. In order to do that, we develop special fault-tolerant inference algorithms and load-balancing protocols that automatically assign devices to maximize the total system throughput. We showcase these algorithms in Petals - a decentralized system that runs Llama 2 (70B) and BLOOM (176B) over the Internet up to 10x faster than offloading for interactive generation. We evaluate the performance of our system in simulated conditions and a real-world setup spanning two continents.
PDF284December 15, 2024