AI Lesson & Submodule

Query, Key and Value

Deconstruct the role of projection matrices in generating Q, K, and V.

Why This Matters

Q, K, and V map inputs into separate spaces, allowing models to query context patterns mathematically.

What You Will Learn

  • Explain QKV projections
  • Verify vector shapes
  • Define projection weights

Concepts Covered

QKV linear projectionsWeights matrices shapesLinear mapping transforms

Mapped Foundation Project: Mini Attention Notebook

Self-contained interactive workbook computing step-by-step scaled dot-product attention scores from raw matrices input.

Architecture Preview

Dynamic math workbook running forward projections, scaling matrix outputs, and plotting soft heatmaps.

Character Tokens ArrayQKV Projections WeightsQK Dot Product Score
Tech Stack Planned
ReactTypeScriptMath.js
In Progress

Technical Interview Value

  • ?Explain the physical analogy of Query, Key, and Value vectors using database terminology