ChatPaper.aiChatPaper

정렬된 LLaMA: 정렬된 미세 조정(SoFT)을 활용한 대규모 언어 모델의 중간 계층 잠재력 개방 및 동적 추론

Sorted LLaMA: Unlocking the Potential of Intermediate Layers of Large Language Models for Dynamic Inference Using Sorted Fine-Tuning (SoFT)

September 16, 2023
저자: Parsa Kavehzadeh, Mojtaba Valipour, Marzieh Tahaei, Ali Ghodsi, Boxing Chen, Mehdi Rezagholizadeh
cs.AI

초록

대규모 언어 모델(LLM)의 급속한 발전은 자연어 처리(NLP) 분야에 혁신을 가져왔습니다. 이러한 모델들은 인간과 유사한 텍스트를 이해하고 생성하는 데 탁월한 성능을 보이지만, 광범위한 배포에는 막대한 비용이 발생할 수 있습니다. SortedNet은 최근에 개발된 심층 신경망을 위한 동적 추론을 가능하게 하는 훈련 기법입니다. 이 기법은 네트워크 모듈성을 활용하여 다양한 계산 부하를 가진 하위 모델을 생성하고, 이를 계산/정확도 특성에 따라 중첩 방식으로 정렬합니다. 우리는 SortedNet을 생성적 NLP 작업에 확장하여, 사전 훈련 없이도 대규모 언어 모델을 동적으로 만들고, 표준 지도 미세 조정(SFT)을 Sorted Fine-Tuning(SoFT)으로 대체함으로써 동일한 비용으로 이를 달성합니다. 우리의 접근 방식은 모델의 효율성을 높여 추론 과정에서 다양한 시나리오에 대해 여러 모델을 사용할 필요를 없앱니다. 이 방법을 사용하여 트랜스포머의 중간 계층이 목표 출력을 생성하는 데 있어 잠재력을 발휘할 수 있음을 보여줍니다. 우리의 하위 모델들은 원본 모델의 필수 구성 요소로 남아, 저장 공간 요구 사항과 다양한 계산/지연 예산 간 전환 비용을 최소화합니다. LLaMa 2 13B 모델에 이 접근 방식을 적용하여 Stanford Alpaca 데이터셋에 대해 튜닝하고, 일반 튜닝 및 PandaLM 벤치마크를 통한 조기 종료와 비교함으로써, Sorted Fine-Tuning이 원본 모델보다 두 배 빠르면서도 성능을 유지하거나 초과하는 모델을 제공할 수 있음을 보여줍니다.
English
The rapid advancement of large language models (LLMs) has revolutionized natural language processing (NLP). While these models excel at understanding and generating human-like text, their widespread deployment can be prohibitively expensive. SortedNet is a recent training technique for enabling dynamic inference for deep neural networks. It leverages network modularity to create sub-models with varying computational loads, sorting them based on computation/accuracy characteristics in a nested manner. We extend SortedNet to generative NLP tasks, making large language models dynamic without any pretraining and by only replacing standard Supervised Fine-Tuning (SFT) with Sorted Fine-Tuning (SoFT) at the same costs. Our approach boosts model efficiency, eliminating the need for multiple models for various scenarios during inference. We show that using this approach, we are able to unlock the potential of intermediate layers of transformers in generating the target output. Our sub-models remain integral components of the original model, minimizing storage requirements and transition costs between different computational/latency budgets. By applying this approach on LLaMa 2 13B for tuning on the Stanford Alpaca dataset and comparing it to normal tuning and early exit via PandaLM benchmark, we show that Sorted Fine-Tuning can deliver models twice as fast as the original model while maintaining or exceeding performance.
PDF231December 15, 2024