[논문 리뷰] FederatedScope-LLM: A Comprehensive Package for Fine-tuning Large Language Models in Federated Learning
FS-LLM 패키지는 LLM의 엔드-투-엔드 연합 미세조정 과정을 제공하며 벤치마킹, PEFT 알고리즘, 프라이버시 보호 옵션 및 FederatedScope 생태계 내의 학습 가속기를 포함합니다. 전체 모델 접근이 있거나 없는 경우에도 LLM의 FL 기반 적응을 가능하게 합니다.
LLMs have demonstrated great capabilities in various NLP tasks. Different entities can further improve the performance of those LLMs on their specific downstream tasks by fine-tuning LLMs. When several entities have similar interested tasks, but their data cannot be shared because of privacy concerns regulations, federated learning (FL) is a mainstream solution to leverage the data of different entities. However, fine-tuning LLMs in federated learning settings still lacks adequate support from existing FL frameworks because it has to deal with optimizing the consumption of significant communication and computational resources, data preparation for different tasks, and distinct information protection demands. This paper first discusses these challenges of federated fine-tuning LLMs, and introduces our package FS-LLM as a main contribution, which consists of the following components: (1) we build an end-to-end benchmarking pipeline, automizing the processes of dataset preprocessing, federated fine-tuning execution, and performance evaluation on federated LLM fine-tuning; (2) we provide comprehensive federated parameter-efficient fine-tuning algorithm implementations and versatile programming interfaces for future extension in FL scenarios with low communication and computation costs, even without accessing the full model; (3) we adopt several accelerating and resource-efficient operators for fine-tuning LLMs with limited resources and the flexible pluggable sub-routines for interdisciplinary study. We conduct extensive experiments to validate the effectiveness of FS-LLM and benchmark advanced LLMs with state-of-the-art parameter-efficient fine-tuning algorithms in FL settings, which also yields valuable insights into federated fine-tuning LLMs for the research community. To facilitate further research and adoption, we release FS-LLM at https://github.com/alibaba/FederatedScope/tree/llm.
연구 동기 및 목표
- 연합 설정에서 프라이버시, 효율성 및 커스터마이제이션 제약을 고려한 LLM 미세조정의 도전과제를 제시하고 해결합니다.
- 다양한 데이터셋과 작업에 걸쳐 연합 LLM 미세조정을 평가하는 엔드-투-엔드 벤치마킹 파이프라인을 제공합니다.
- 저통신/계산 비용 및 비공개 모델 접근을 가능하게 하는 연합 PEFT 알고리즘과 인터페이스의 라이브러리를 제공합니다.
- 소비자용 하드웨어에서 가능하도록 가속기 및 자원 효율적 학습을 가능하게 합니다.
- LLMs를 위한 FL 내에서 개인화 FL(pFL) 및 FedHPO와 같은 학제간 연구를 위한 확장성을 촉진합니다.
제안 방법
- FederatedScope(FS) 기반의 FS-LLM을 세 가지 모듈: LLM-Benchmarks, LLM-AlgZoo, 및 LLM-Trainer로 소개합니다.
- 연합 데이터셋과 해당 평가 과제를 활용한 엔드-투-엔드 LLM 미세조정 벤치마크를 제공합니다(Fed-CodeAlpaca, Fed-Dolly, Fed-GSM8K-3).
- 스토어된 프라이버시 보호 옵션(FedOT/offsite-tuning)과 함께 연합 PEFT 알고리즘(LoRA, P-tuning, Prompt tuning) 세트를 구현합니다.
- 메모리, 시간, 통신 비용을 줄이기 위해 혼합 정밀도, DeepSpeed 데이터 병렬성, 양자화, 스트리밍, 압축 등의 가속 및 자원 효율적 연산자를 도입합니다.
- 전체 모델 접근 여부와 무관하게 연합 미세조정을 위한 통합적이고 이벤트 구동형 인터페이스를 제공하여 pFL 및 FedHPO와의 확장 및 통합을 쉽게 합니다.
실험 결과
연구 질문
- RQ1다양한 도메인과 데이터 이질성을 가진 상황에서 PEFT 알고리즘을 사용한 연합 미세조정이 LLM에 얼마나 효과적인가요?
- RQ2제한된 자원으로 전체 모델 접근 없이도 연합 미세조정이 효율적으로 수행될 수 있나요?
- RQ3개인화 FL(pFL) 및 FedHPO와 같은 고급 FL 작업을 연합 LLM 미세조정에 통합했을 때 어떤 통찰이 나오나요?
- RQ4벤치마크 데이터셋과 평가 과제가 연합 LLM 미세조정에서 현실 세계의 이질성과 분포 변화를 어떻게 반영하나요?
- RQ5FL 기반 LLM 미세조정에서 통신, 계산, 정확도 사이의 트레이드오프는 무엇인가요?
주요 결과
- PEFT를 이용한 연합 미세조정은 로컬 미세조정보다 크게 우수하며 전역 미세조정 성능에 근접합니다.
- LoRA는 코드, 일반 언어 및 수학 과제에서 연합 설정에서 일관되게 가장 강력한 성능을 제공합니다.
- PEFT 기반 FL은 통신 및 메모리 요구를 줄여 자원 제한 클라이언트에서도 연합 적응을 가능하게 만듭니다.
- FedOT은 전체 모델 접근 없이도 프라이버시 보호 미세조정을 가능하게 하여 비공개 소스 LLM의 적응을 촉진합니다.
- FS-LLM 벤치마크 스위트는 컨테이너화된 평가 환경 및 비용 관련 지표로 재현 가능한 결과를 제공합니다.
- 워크플로우는 시뮬레이션, 분산, 클러스터링 모드를 지원하며 pFL 및 FedHPO 연구에 대한 확장성을 가능하게 합니다.
이 논문 읽기
누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.
누빈트에서 이 논문 읽기이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.