# Sequence-to-Sequence Model (Seq2Seq)

> A model with two parts. One reads the input, and the other writes a new output from it.

**Field:** Artificial Intelligence  
**Category:** NLP & Language  
**Also known as:** Seq2Seq, Encoder-Decoder Model, Sequence to Sequence

## Think of it like

It is like a friend who hears your whole sentence. Then she says it in French.

## Definition

A seq2seq model turns one string of words into a new one. It has two parts. The encoder reads the whole input and packs its meaning into numbers. The decoder then writes the output one piece at a time, using those numbers. The input and output can be different lengths, which suits translation and summaries. A paper in 2014 showed it working well for English to French.

## Example

A seq2seq model reads 'Where is the station?' in English. Its decoder writes 'Wo ist der Bahnhof?' in German, one word at a time.

## Why it matters

It made it possible to turn text into other text of any length. Translation and summary tools grew from it.

## Common mistake

Thinking every language model has these two parts. Most chat models now use just the writing half.

## Three principles

- **Encoder reads.** The whole input comes first.
- **Decoder writes.** One piece at a time.
- **Any length.** Input and output can differ.

## Related terms

- [Encoder (Transformer)](https://learn.benibix.com/term/ai/encoder)
- [Decoder (Transformer)](https://learn.benibix.com/term/ai/decoder)
- [Transformer](https://learn.benibix.com/term/ai/transformer)
- [Machine Translation](https://learn.benibix.com/term/ai/machine-translation)
- [Text Summarization](https://learn.benibix.com/term/ai/text-summarization)
- [Recurrent Neural Network (RNN)](https://learn.benibix.com/term/ai/recurrent-neural-network)

![An English sentence, 'Where is the station?', goes into an encoder box. A row of numbers passes to a decoder box, which writes 'Wo ist der Bahnhof?' one word at a time.](https://learn.benibix.com/diagrams/ai5-seq2seq.svg)

---

Source: https://learn.benibix.com/term/ai/sequence-to-sequence-model
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
