liveBook · Manning

Value

In attention, a value is a vector representation of input content that is combined with other values according to attention weights to produce an output.

How 8 Manning books explain it

Transformers in Action

In attention, a value is a vector representation containing the content aggregated according to attention weights.

How it is used
Supplies the content combined by attention weights to produce contextual output vectors.
How deep it goes
Explains the value role intuitively and implements its projection and weighted aggregation in simplified attention code.
Examples
Uses a sentence about a movie and a NumPy scaled dot-product attention listing.
What you can do after
Build it from scratch in NumPy by projecting embeddings into V and multiplying V by attention scores.

Read how Transformers in Action explains value →

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

A value is an attention vector whose information is combined according to attention weights.

How it is used
Carries the information that attention weights select and combine in transformer, vision-transformer, and diffusion U-Net computations.
How deep it goes
Traces value projection, scaled similarity, softmax weighting, head splitting, and output recombination through implementation-level detail.
Examples
Uses German-English token translation, four-head image attention, and four-head attention over diffusion U-Net feature maps.
What you can do after
Builds value projections and weighted attention outputs with PyTorch linear layers, softmax, matrix multiplication, and tensor reshaping.

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

Sutskever's List

How it is used
Uses projected representations as the information attention combines to form outputs during Transformer cross-attention.
How deep it goes
Defines values as projected representations combined by attention weights, but supplies no derivation or implementation details.
Examples
Illustrates query, key, and value interaction with a Transformer encoder-decoder schematic.
What you can do after
Understand how cross-attention uses values to contribute encoded information to a context vector guiding token generation.

Read how Sutskever's List explains value →

Learn Generative AI with PyTorch

How it is used
Uses projected values to form the output of self-attention in a Transformer for language translation.
How deep it goes
Traces values from input embedding through the W_V projection to their weighted combination in the attention output.
Examples
Illustrates values with recommended books in a library-search analogy and an English-to-French translation task.
What you can do after
Build self-attention from scratch by projecting inputs into values and combining them with attention weights.

Read how Learn Generative AI with PyTorch explains value →

Deep Learning with PyTorch, Second Edition

The transformed representation vectors that are combined using attention weights to produce the output for each position.

How it is used
Uses transformed content vectors to integrate context into each sequence position’s attention output.
How deep it goes
Explains linear value projection and weighted summation, while treating query-key weight calculation as the surrounding attention mechanism.
Examples
Demonstrates character embeddings, next-character prediction, and a PyTorch calculation using F.linear, softmax, and matrix multiplication.
What you can do after
Apply via PyTorch by projecting inputs into values and combining them with attention weights.

Read how Deep Learning with PyTorch, Second Edition explains value →

Build a Large Language Model (From Scratch)

The attention content vector combined according to attention weights to form the context output.

How it is used
Carries transformed token content into the weighted sum that produces each self-attention context vector.
How deep it goes
Explains W_value projection, tensor shapes, and weighted combination, stopping at a single-query example rather than multi-head construction.
Examples
Uses the six-word sentence “Your journey starts with one step,” second-input query x_2, and PyTorch tensors shaped [6, 2].
What you can do after
Build it from scratch in PyTorch by projecting inputs with W_value and combining values with attention weights.

Read how Build a Large Language Model (From Scratch) explains value →

Deep Learning with Python, Third Edition

How it is used
Combines source-content vectors according to attention scores to form the attention output.
How deep it goes
Explains weighted summation and separate value projections with parameterized attention code.
Examples
Uses photo retrieval as an analogy and projected source vectors in parameterized attention code.
What you can do after
Understand how attention scores weight value vectors to produce an output.

Read how Deep Learning with Python, Third Edition explains value →

Grokking AI Algorithms, Second Edition

A value vector is the vector representation carrying the content contributed by a token in an attention computation.

How it is used
Uses token content to build context-rich representations during self-attention.
How deep it goes
Explains projection, weighting, elementwise scaling, and summation, stopping short of deeper training mechanics.
Examples
Works through token 0’s four-dimensional Value vector, weighted results, and final context vector.
What you can do after
Apply it via Python by projecting embeddings into V and multiplying V by attention weights.

Read how Grokking AI Algorithms, Second Edition explains value →

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.