Deep Language Networks: Joint Prompt Training of Stacked LLMs using
  Variational Inference
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 .
6494ecf9a0438024d825ff47
Alessandro Sordoni
extracted_confirmed
2024-05-21T02:53:13.037Z
637c27e5e74a3e06aacfd7b4
/avatars/27dcca787b11d880c0ad851e83a84e87.svg
Alessandro Sordoni
user
sordonia
6494ecf9a0438024d825ff48
Xingdi Yuan
claimed_verified
2023-06-23T14:28:34.990Z
6495947b3eaaf416d924daeb
/avatars/2e79b75e0f5f54f11471affc2bb377b6.svg
Eric Yuan
user
eryua
6494ecf9a0438024d825ff49
Marc-Alexandre Côté
claimed_verified
2023-06-23T12:20:19.658Z
62960afb91760de5e547e544
/avatars/bebed5926b04d066d4c0e49d246acd78.svg
Marc-Alexandre Côté
user
MarcCote
6494ecf9a0438024d825ff4a
Matheus Pereira
admin_assigned
2023-06-23T11:49:36.498Z
63d1a31b2036e44c44fc72b8
/avatars/62eb3e4c79ff4fa642518db9ab99e0f5.svg
Matheus Pereira
user
mat-pereira
6494ecf9a0438024d825ff4b
Adam Trischler
6494ecf9a0438024d825ff4c
Ziang Xiao
claimed_verified
2023-06-26T07:33:14.621Z
6495d59b5e85f28106005976
/avatars/29f077c0da87a5db19a6b9fb53935981.svg
Ziang Xiao
user
ziangxiao
6494ecf9a0438024d825ff4d
Arian Hosseini
6494ecf9a0438024d825ff4e
Friederike Niedtner
6494ecf9a0438024d825ff4f
Nicolas Le Roux
claimed_verified
2023-06-23T14:28:09.571Z
6380eaa5b2552a70c4a19205
/avatars/99f601bf922996a51fe9782cd20afd28.svg
Nicolas Le Roux
user
nicolouchka
Deep Language Networks: Joint Prompt Training of Stacked LLMs using
  Variational Inference
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 .
A Deep Language Network (DLN) achieves high performance by stacking language layers and optimizing prompts through variational inference, outperforming single layers and sometimes matching few-shot GPT-4.
Deep Language Network (DLN) language layers prompts prompt optimization variational inference few-shot GPT-4