liveBook · Manning

Sequence prediction

Sequence prediction is the task of predicting or generating elements of an ordered sequence from preceding elements or contextual input.

How 3 Manning books explain it

Build a Text-to-Image Generator (from Scratch)

A prediction task in which a model generates or estimates elements of an ordered sequence.

How it is used
Frames translation and multimodal generation as ordered, autoregressive prediction tasks.
How deep it goes
Explains iterative decoding, BOS and EOS tokens, attention, and multimodal pipelines, but stops short of training equations.
Examples
Uses German-to-English translation, image patches, and DALL-E-style text-to-image generation as concrete sequence-prediction examples.
What you can do after
Evaluate how models generate translations or images by tracing encoded inputs, prior outputs, next-element predictions, and stopping conditions.

Read how Build a Text-to-Image Generator (from Scratch) explains sequence prediction →

Learn Generative AI with PyTorch

A learning setup where a model predicts the next element in an ordered sequence from earlier elements.

How it is used
Frames text generation as predicting successive tokens from preceding context.
How deep it goes
Explains tokenization, indexing, shifted targets, iterative generation, and sampling, but does not derive the underlying training mathematics.
Examples
Uses indexed text windows, the “Anna and the” prompt, and temperature or top-K sampling.
What you can do after
Build and operate an LSTM text generator that predicts and appends tokens sequentially.

Read how Learn Generative AI with PyTorch explains sequence prediction →

Graph Neural Networks in Action

A prediction task in which a model uses ordered past observations to predict subsequent observations or events.

How it is used
Frames forecasting as predicting future node positions or events from ordered observations in dynamic graph workflows.
How deep it goes
Builds an RNN-based training and testing workflow, including memory, preprocessing, optimization, and multi-step rollout.
Examples
Uses autocomplete, search, sensor positions, pose frames, and predicted future movements as concrete examples.
What you can do after
Apply it via an RNN to train models and generate multi-step predictions from sensor sequences.

Read how Graph Neural Networks in Action explains sequence prediction →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.