liveBook · Manning

Encoder-decoder architecture

As explained in Effective Conversational AI

An encoder-decoder architecture is a language-model architecture that encodes an input sequence and decodes a separate output sequence.

An encoder-decoder architecture handles both generative and non-generative tasks by encoding an input sequence and decoding a separate output sequence. It fits problems where the input is large but the desired output is relatively small. section 4.1.4

Translation and summarization

A long source passage can be encoded and converted into a shorter translation or summary. This contrasts with encoder-only architectures, which focus on extracting context, and decoder-only architectures, which generate text by predicting subsequent tokens. section 4.1.4

Figure 4.4 Traditional classification models use supervised learning to predict one of several predefined classifications. They look for the intent, or meaning, of a user input. Generative models use decoding transformers to create a text completion. They predict the next sequence of tokens (loosely, words or characters) that are most likely to occur after the user input.
figure

Compare classification models, which select among predefined intents, with generative models, which decode likely continuations. section 4.1.4

How Effective Conversational AI covers it

How deep it goes
Defines the architecture and contrasts it with encoder-only and decoder-only designs without detailing implementation internals.
Examples
Uses translation and summarization as examples of large-input, small-output tasks.
What it assumes
Assumes familiarity with input sequences, output sequences, classification, and generative AI use cases.
What you can do after
Evaluate and select an architecture for generative or non-generative sequence-transformation tasks.
How it connects
Connects encoder-only architectures, decoder-only architectures, classification models, generative models, translation, and summarization.

Also explained in

Compare how 10 books explain encoder-decoder architecture →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Effective Conversational AI. The section links point to the parts of the book it draws on.