AI by Hand ✍️

AI by Hand ✍️

Seq2Seq

RNNs by Hand, in Excel

Prof. Tom Yeh's avatar
Prof. Tom Yeh
Sep 27, 2026
∙ Paid

Library › RNNs by Hand, in Excel

  1. Recurrence

  2. Size

  3. Outputs

  4. Depth

  5. Seq2Seq

  6. Tokens

  7. Autoregressive

  8. Loss

  9. Small Language Model

In the last article, our network read a sequence and gave its answers along the way. In this article, the answer is a sequence too. How does a network turn one sequence into another? We build it from two halves. An encoder reads the input sequence into one vector. A decoder turns that vector into an output sequence. Together, they form a sequence-to-sequence network, or seq2seq.

d=1, h=2, y=3, seq=5, many-to-one

We start with the encoder. It is a many-to-one RNN, as in the Outputs article. We label it Encoder, at the top left. Its one output, y, is what the encoder knows about the whole sequence. Compare y with the Outputs article, and you find the last output of its y=3 example.

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2026 Tom Yeh · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture