딥 랭귀지 네트워크: 변분 추론을 활용한 스택형 대형 언어 모델의 통합 프롬프트 학습
Deep Language Networks: Joint Prompt Training of Stacked LLMs using Variational Inference
June 21, 2023
저자: Alessandro Sordoni, Xingdi Yuan, Marc-Alexandre Côté, Matheus Pereira, Adam Trischler, Ziang Xiao, Arian Hosseini, Friederike Niedtner, Nicolas Le Roux
cs.AI
초록
우리는 대규모 언어 모델(LLM)을 네트워크 내의 확률적 언어 계층으로 간주하며, 각 계층에서 학습 가능한 매개변수는 자연어 프롬프트입니다. 우리는 이러한 계층을 두 개 쌓아 하나의 계층 출력을 다음 계층으로 전달합니다. 이 쌓인 구조를 딥 언어 네트워크(Deep Language Network, DLN)라고 부릅니다. 먼저, 1계층 언어 네트워크(DLN-1)에서 프롬프트 최적화를 효과적으로 수행하는 방법을 보여줍니다. 그런 다음 두 개의 프롬프트를 학습해야 하는 2계층 DLN(DLN-2)을 훈련하는 방법을 설명합니다. 첫 번째 계층의 출력을 주변화해야 할 잠재 변수로 간주하고, 이를 위해 공동 프롬프트 훈련을 위한 변분 추론 알고리즘을 고안합니다. DLN-2는 단일 계층보다 더 높은 성능을 달성하며, 네트워크 내 각 LLM이 더 작고 덜 강력한 경우에도 가끔은 few-shot GPT-4에 필적하는 성능을 보입니다. DLN 코드는 오픈 소스로 제공됩니다: https://github.com/microsoft/deep-language-networks.
English
We view large language models (LLMs) as stochastic language layers in
a network, where the learnable parameters are the natural language
prompts at each layer. We stack two such layers, feeding the output of
one layer to the next. We call the stacked architecture a Deep Language
Network (DLN). We first show how to effectively perform prompt optimization
for a 1-Layer language network (DLN-1). We then show how to train 2-layer DLNs
(DLN-2), where two prompts must be learnt. We consider the output of the first
layer as a latent variable to marginalize, and devise a variational inference
algorithm for joint prompt training. A DLN-2 reaches higher performance than a
single layer, sometimes comparable to few-shot GPT-4 even when each LLM in the
network is smaller and less powerful. The DLN code is open source:
https://github.com/microsoft/deep-language-networks .