One walkthrough, two tabs. See how the original video-token sequences are rearranged into 8 × 8 tiles, how much padding is introduced, and why both finish at 500 blocks.
A single, step-by-step view of how an original 1D Q sequence is interpreted as video frames, divided into 8 × 8 patches, padded, and flattened into 64-slot blocks.
It covers 1 spatial row × 8 adjacent columns. The number printed inside is the number of real tokens, not a cell ID.
Before any padding, these are all real tokens. Each complete video frame is 45 rows × 80 tokens per row = 3,600 tokens.
Frame 9 is a partial frame: 896 = 11 complete rows × 80 + 16 additional tokens in row 12. The first eight frames are full.
This happens to every one of the first eight frames. You see one representative frame below.
Each frame has 50 full tiles and 10 edge tiles. Each edge tile contains 40 real tokens + 24 padding slots.
Q ends partway through row 12. Fixed-height 8-row tiles still occupy two tile rows: rows 1–8 and 9–16.
Tile row #2 covers all rows 9–16 because each tile's height is 8. Even if rows 13–16 contain no real Q tokens, their slots belong to the allocated tiles.
The 384 padded slots are 48 coral cells × 8 slots. Those coral cells are what the extra tile rows and row-12 remainder introduce.
Each outlined 8 × 8 tile becomes one contiguous block of 64 slots in the tiled Q sequence. Click any tiny block to inspect its real-token count.
A step-by-step view of how the original 1D key/value sequence is interpreted as video frames, divided into 8 × 8 spatial patches, padded, and flattened into 64-slot KV blocks. Just like the Q visualizer, each smallest cell explicitly tells you how many real tokens it contains.
It covers 1 spatial row × 8 adjacent columns. The printed number is the count of real tokens, never a cell index. K and V are separate tensors using the same token-position layout; counts below are per sequence.
Before padding, all 30,080 positions are real tokens. Each full frame has 45 rows × 80 tokens per row = 3,600 tokens.
Frame 9 is shorter than a full 45-row frame, but its 1,280 real tokens = 16 complete rows × 80. Unlike Q's final frame, it stops exactly on an 8-row tile boundary.
This step is identical to Q for each of the first eight complete frames. One representative frame is drawn below.
Each full frame has 50 full tiles (64 real each) and 10 edge tiles (40 real + 24 padded slots each).
The final 1,280 K/V tokens fill 16 complete rows. Sixteen is exactly two groups of eight rows, so frame 9 needs no padding.
Every blue 8 above means eight actual token positions, not eight padded positions. Each outlined tile contains 8 cells × 8 real tokens = 64 real tokens.
Outlined blue cells show the 384 additional real K/V tokens: 8 cells in row 12 + 40 cells in rows 13–16. That's 48 cells × 8 = 384.
Each outlined 8 × 8 tile becomes one contiguous 64-slot KV block in tile order. Click a block to inspect its real-token count.
block_sizes look like for this K/V layout?420 full blocks have block_sizes[b] = 64. 80 edge blocks have block_sizes[b] = 40. Those 80 short blocks all belong to the first eight complete 45-row frames; all 20 blocks in frame 9 are full. In the cuDNN BSA contract, the value describes valid KV positions, so padded KV keys can be masked.