Query-Key-Value (QKV) Numerical Playground
Interactive step-by-step matrix laboratory: inspect Q × Kᵀ dot products, division by √d_k, Softmax normalization, and weighted V sums.
Concept Breakdown: The Role of Query, Key, and Value Vectors
Query (Q) is what you type in the search bar. Key (K) is the title/tags of every video in the database. Value (V) is the actual video clip you watch.
The AI compares your Query against all Keys. The closer the match, the higher the score. It then pulls together a blend of the matching Values based on those scores.
Edit any cell in the Q, K, or V tables below. Watch the dot product scores, softmax percentages, and final blended outputs update instantly!
Final Contextualized Output: $A \times V$ (3 Tokens × 2 Dim)
Each token vector now contains a weighted blend of all other token Values based on attention weights:
Quick Reference & Instructions
Simple steps, pro tips, and execution details
Provide Inputs
Type, paste, or select your values in the form fields below.
Instant Live Analysis
Calculations and formatting happen automatically with zero delay as you type.
Copy or Use Output
Copy results or apply the clean output directly to your projects.
How It Works
Allows modifying small numerical matrix values to inspect intermediate products and see exactly how attention values are blended.
Formula & Logic
Frequently Asked Questions
Common questions about calculations, assumptions, and edge cases.
Yes, Query-Key-Value (QKV) Numerical Playground is 100% free with unlimited calculations and zero paywalls or subscriptions.
Related Tools
Explore all llm tools →Self-Attention Heatmap Visualizer
Interactive Scaled Dot-Product Attention matrix. Select any token to view real-time attention weights across the entire sentence.
Transformer Layer Architecture Visualizer
Interactive pipeline of a complete Transformer block: Embeddings, RoPE, RMSNorm, Multi-Head Attention, Residual Add, and SwiGLU FFN.
Softmax Activation Visualizer & Calculator
Convert real-valued logits into normalized probabilities. Inspect exponentiation, denominator summation, and temperature scaling.